Motivation
#339/#344's <team>-<agent> seat marker is applied only at spawn time (name_arg), so tmux-resurrect seat restoration misses: (1) agent types with no display-name flag (codex — its pane restored as a plain shell in the first kill-server drill even though its role-session record existed), (2) hand-launched sessions.
An earlier draft of this issue proposed writing the tmux pane title at every actas. Rejected by design principle: agmsg must not actively mutate the user's tmux state. Reading tmux state (as the resurrect matcher already does) is fine; writing it is an intervention and must never be default behavior.
Proposal (passive-first)
- Smarter matcher, zero writes:
resurrect-panes.sh already parses each saved pane's full argv. Spawn-launched panes of EVERY type carry the actas boot prompt in that argv (<cmd_prefix><cmd> actas <name> — e.g. $agmsg actas <name> for codex). Add this as a third match key alongside the existing title-exact and -n <name> marker. This alone makes codex seats resurrect-restorable with no environment mutation.
- Opt-in (never default) pane title: users who WANT visible seat labels can set e.g.
AGMSG_PANE_TITLE=on to have actas set tmux select-pane -T <team>-<agent>. Default remains: agmsg never touches pane titles.
- Hand-launched sessions stay covered by the existing best-effort path (
/rename tip, -n at launch) — acceptable; they are human-attended by definition.
Notes
Motivation
#339/#344's
<team>-<agent>seat marker is applied only at spawn time (name_arg), so tmux-resurrect seat restoration misses: (1) agent types with no display-name flag (codex — its pane restored as a plain shell in the first kill-server drill even though its role-session record existed), (2) hand-launched sessions.An earlier draft of this issue proposed writing the tmux pane title at every actas. Rejected by design principle: agmsg must not actively mutate the user's tmux state. Reading tmux state (as the resurrect matcher already does) is fine; writing it is an intervention and must never be default behavior.
Proposal (passive-first)
resurrect-panes.shalready parses each saved pane's full argv. Spawn-launched panes of EVERY type carry the actas boot prompt in that argv (<cmd_prefix><cmd> actas <name>— e.g.$agmsg actas <name>for codex). Add this as a third match key alongside the existing title-exact and-n <name>marker. This alone makes codex seats resurrect-restorable with no environment mutation.AGMSG_PANE_TITLE=onto have actas settmux select-pane -T <team>-<agent>. Default remains: agmsg never touches pane titles./renametip,-nat launch) — acceptable; they are human-attended by definition.Notes
/and$command prefixes (spawn: boot script hardcodes / prefix for skill command — wrong for codex ($cmd) #283).