Skip to content

Universalize the <team>-<agent> seat marker: set the tmux pane title at every actas (opt-out via env) #369

Description

@fujibee

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)

  1. 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.
  2. 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.
  3. Hand-launched sessions stay covered by the existing best-effort path (/rename tip, -n at launch) — acceptable; they are human-attended by definition.

Notes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions