← back to Ticket System
ticket-board /api/run: log real launch outcome from execFile callback (surface iTerm launch failures instead of optimistic success)
a57a664f2ef4d5bb256a929791b43fe502a195b3 · 2026-08-18 13:12:50 -0700 · Steve Abrams
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Files touched
Diff
commit a57a664f2ef4d5bb256a929791b43fe502a195b3
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Aug 18 13:12:50 2026 -0700
ticket-board /api/run: log real launch outcome from execFile callback (surface iTerm launch failures instead of optimistic success)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---
server.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/server.js b/server.js
index f72b1e92..84397dce 100644
--- a/server.js
+++ b/server.js
@@ -137,8 +137,13 @@ http.createServer((req, res) => {
let cwd = os.homedir();
const proj = t && t.project;
if (proj && /^[a-z0-9._-]+$/i.test(proj)) { const p = path.join(os.homedir(), 'Projects', proj); if (fs.existsSync(p)) cwd = p; }
- setTimeout(() => execFile('bash', [RUN_SH, id, cwd], { timeout: 25000 }, () => {}), i * 1300); // stagger ~1.3s
- withLock(() => append({ ts: new Date().toISOString(), type: 'action', id, agent: 'board', text: '▶ RUN NOW — launched iTerm2 Claude session from the board' }));
+ setTimeout(() => execFile('bash', [RUN_SH, id, cwd], { timeout: 25000 }, (err) => {
+ // Log the REAL outcome from the launch callback — never an optimistic "launched" before the window opens.
+ // If osascript/iTerm fails (app quit, Automation permission denied), surface it on the board instead of a false success.
+ withLock(() => append({ ts: new Date().toISOString(), type: 'action', id, agent: 'board',
+ text: err ? ('⚠ RUN NOW failed to launch iTerm2 session — ' + String(err.message || err).split('\n')[0])
+ : '▶ RUN NOW — launched iTerm2 Claude session from the board' }));
+ }), i * 1300); // stagger ~1.3s
launched.push(id);
});
json(res, 200, { launched, skipped });
← 67f3ea88 auto-data-snapshot: 2026-08-18T02:36:46 (1 data files) — TK-
·
back to Ticket System
·
run-ticket.sh: foreground-launch fix — explicit create/selec 9385a556 →