Summary
Found while stress-testing PR #326. When two MCP calls that create tabs run concurrently (e.g. two show_image calls with panel: "new_tab" issued from two SSE sessions at the same time), one or both of the created tabs can end up permanently dead: the pane renders empty, the shell never prints its first prompt, and content injected via dataStream never appears in the buffer.
Repro
- Open two MCP SSE sessions to the same BossTerm instance.
- From both simultaneously, call
show_image with panel: "new_tab" (any image).
- Both calls return
ok: true with distinct tabIds.
read_scrollback on the new tabs returns zero non-blank lines — no shell prompt, no injected caption — and re-checking minutes later shows the same. Sequential calls (even back-to-back with no delay) work fine; 8/8 in the same test session.
Observations
- The tab exists in
list_tabs and shows in the sidebar; its buffer is just permanently empty.
- Since even the OSC payload appended to
dataStream never materializes, the session's PTY/emulator pipeline appears never to have started — pointing at a race in tab/session creation or PTY init when two creations interleave, not at rendering.
- Possibly related in spirit to the plugin-restore race fixed in BossConsole#821 (async init vs. use).
Environment
🤖 Generated with Claude Code
Summary
Found while stress-testing PR #326. When two MCP calls that create tabs run concurrently (e.g. two
show_imagecalls withpanel: "new_tab"issued from two SSE sessions at the same time), one or both of the created tabs can end up permanently dead: the pane renders empty, the shell never prints its first prompt, and content injected viadataStreamnever appears in the buffer.Repro
show_imagewithpanel: "new_tab"(any image).ok: truewith distincttabIds.read_scrollbackon the new tabs returns zero non-blank lines — no shell prompt, no injected caption — and re-checking minutes later shows the same. Sequential calls (even back-to-back with no delay) work fine; 8/8 in the same test session.Observations
list_tabsand shows in the sidebar; its buffer is just permanently empty.dataStreamnever materializes, the session's PTY/emulator pipeline appears never to have started — pointing at a race in tab/session creation or PTY init when two creations interleave, not at rendering.Environment
🤖 Generated with Claude Code