Repository navigation
feat(spawn): isolate crewmate windows in a dedicated firstmate session - #1
Merged
Merged
Conversation
… session Previously fm-spawn put crewmate windows in firstmate's own session when it ran inside the multiplexer, flooding the session the captain works in; only the outside-psmux path used a dedicated session. Now crewmate windows always go to a "firstmate" session, never the captain's active session. - fm-spawn.sh: drop the in-psmux "same session" branch; always target the firstmate session (lazy has-session guard preserved for pre-bootstrap spawns). - fm-bootstrap.sh: create the firstmate session eagerly at startup so it is ready to attach to immediately; best-effort, never blocks bootstrap. - fm-supervise-daemon.sh: drop the firstmate:0 positional fallback for the away-mode supervisor pane - "firstmate" is the crewmate session now, so a guess there would inject into a crewmate window. Fail loud instead. - CLAUDE.md: document the always-dedicated-session behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Crewmate windows now always live in a dedicated
firstmatepsmux session, never the session the captain is actively working in.Previously
fm-spawnonly used a dedicated session when firstmate ran outside the multiplexer; when it ran inside the captain's session, it dumped crewmate windows alongside the captain's own, flooding it.Changes
bin/fm-spawn.sh- drop the in-psmux "same session" branch; always target thefirstmatesession. The lazyhas-sessionguard is preserved for a crewmate spawned before bootstrap or after a restart.bin/fm-bootstrap.sh- create thefirstmatesession eagerly at startup so it is ready to attach to immediately. Best-effort: a missing/unhappy multiplexer never blocks bootstrap.bin/fm-supervise-daemon.sh- drop thefirstmate:0positional fallback for the away-mode supervisor pane.firstmateis the crewmate session now, so that guess would inject an escalation into a crewmate window. With neitherFM_SUPERVISOR_TARGETnorTMUX_PANEset, startup now fails loudly instead.CLAUDE.md- document the always-dedicated-session behavior in section 7.Notes
state/<id>.meta(window=firstmate:fm-<id>), so peek/send/teardown/watch are unaffected.TMUX_PANE; only the degraded no-discovery fallback behavior changed (loud failure vs. silent wrong-pane injection).