agent-orchestrator/packages/web
Harshit Singh Bhandari 845fffdfd9
fix(runtime-tmux,web): keep tmux session alive after agent exit (#1758)
* fix: keep tmux session alive after agent exit (closes #1756)

Two related fixes:

1. runtime-tmux: append `exec "${SHELL:-/bin/bash}" -i` to the launch
   command so the pane drops to an interactive shell when the agent
   exits, instead of letting the empty pane take down the whole tmux
   session. The lifecycle still detects agent termination via
   `agent.isProcessRunning` and transitions the session to
   `agent_process_exited` — the runtime just stays usable so the user
   can run shell commands or manually re-launch the agent.

2. mux-websocket: add a `tmux has-session` guard at the top of
   `pty.onExit`. When the tmux session is genuinely gone (e.g. `ao
   stop` killed it out from under a still-subscribed dashboard), skip
   the three doomed `attach-session` spawns introduced by the
   MAX_REATTACH_ATTEMPTS bound in #1640 and notify subscribers
   immediately. The bound from #1640 still covers transient
   tmux-server hiccups where the session does still exist.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(mux): make tmuxHasSession async to avoid blocking the event loop

The has-session probe added in #1756 ran via execFileSync inside
node-pty's onExit callback, freezing every WebSocket connection,
HTTP request, and in-flight terminal for up to the 5 s subprocess
timeout whenever an agent exited and tmux was slow to respond.

Switch tmuxHasSession to promisified execFile and await it from the
onExit handler, mirroring the execFileAsync pattern in runtime-tmux.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 19:41:03 +05:30
..
e2e feat: seamless onboarding with enhanced documentation (#66) 2026-02-16 22:22:13 +05:30
public Fix web imports for service worker and project utils 2026-03-25 14:08:54 +05:30
screenshots fix: polish shimmer states, terminal PR inference, and gitignore .gstack 2026-04-06 22:49:09 -07:00
scripts fix: protect live dashboard artifacts (#1598) 2026-05-01 16:09:57 +05:30
server fix(runtime-tmux,web): keep tmux session alive after agent exit (#1758) 2026-05-10 19:41:03 +05:30
src feat(windows): complete Windows support (#1025) 2026-05-09 00:10:53 +05:30
.env.local.example feat: configurable terminal server ports for multi-dashboard support (#113) 2026-02-19 04:00:19 +05:30
.gitignore Normalize dashboard project filtering and align session layout 2026-03-25 14:34:55 +05:30
CHANGELOG.md chore: release 0.6.0 (#1723) 2026-05-08 02:37:44 +05:30
eslint.config.js fix: resolve three Next.js build warnings in web package (#1087) 2026-04-17 10:43:01 +05:30
next-env.d.ts feat: implement web dashboard with attention-zone UI and API routes (#1) 2026-02-14 14:26:59 +05:30
next.config.js feat(windows): complete Windows support (#1025) 2026-05-09 00:10:53 +05:30
package.json feat(windows): complete Windows support (#1025) 2026-05-09 00:10:53 +05:30
postcss.config.mjs feat: implement web dashboard with attention-zone UI and API routes (#1) 2026-02-14 14:26:59 +05:30
tsconfig.json fix: terminal servers compatible with hash-based architecture (#87) 2026-02-18 03:28:55 +05:30
tsconfig.server.json fix: scope node types to node packages 2026-04-13 18:25:21 +05:30
vitest.config.ts fix: register codex web activity plugin 2026-04-18 14:15:29 +05:30