Skip to content

Fm/primary session window - #1255

Open
elirantism wants to merge 3 commits into
kunchenguid:mainfrom
elirantism:fm/primary-session-window
Open

Fm/primary session window#1255
elirantism wants to merge 3 commits into
kunchenguid:mainfrom
elirantism:fm/primary-session-window

Conversation

@elirantism

Copy link
Copy Markdown

No description provided.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant