Fm/primary session window - #1255
Open
elirantism wants to merge 3 commits into
Open
Conversation
Keep one agent per tmux window (unchanged), but resolve WHICH session the window is created in so it lands in the primary session the captain is actually in, instead of a separate detached "firstmate"/"work" session. fm_backend_tmux_container_ensure now resolves the target session in order: the spawning shell's own session when it is inside tmux ($TMUX set); else the most-recently-active attached client's session (new fm_backend_tmux_primary_session helper), which handles the observed case where the spawn shell has empty $TMUX while a server with the captain's attached session exists; else the dedicated detached "firstmate" fallback (deterministic, fail-closed) when no server or no attached client resolves. Only session resolution changes: the window-per-agent model, window=<session>:<window> target, isolated worktrees, and task metadata are all unchanged. docs/tmux-backend.md and the verification record are updated; the smoke test covers the resolution order and the no-client fallback.
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.
No description provided.