Skip to content

feat: carry tmux socket + session name on agent rows#60

Merged
jiunbae merged 1 commit into
mainfrom
feat/tmux-socket-session-on-wire
Jul 9, 2026
Merged

feat: carry tmux socket + session name on agent rows#60
jiunbae merged 1 commit into
mainfrom
feat/tmux-socket-session-on-wire

Conversation

@jiunbae

@jiunbae jiunbae commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Agent rows now disambiguate tmux servers and expose their session name on the wire — the muxa-side half of the amux integration (amux runs its sessions on a dedicated tmux -L amux server).

  • AgentId.tmux_socket (optional): hook adapters send the pane's server socket path from $TMUX.
  • Agent.tmux_socket + Agent.tmux_session (optional): backfilled by the reconciler's multi-socket pane scan each tick.
  • PaneInfo.socket: multi-socket scans tag each row with its server's socket short name.
  • Reconciler liveness + per-pane dedup are socket-aware (a socket-tagged agent is only alive while its server has the pane; same-numbered panes on different servers never dedup).

All fields additive — no protocol bump per the versioning policy. PROTOCOL.md / CHANGELOG updated.

Test plan

  • cargo test --workspace (735+ tests, includes 2 new reconciler regression tests)
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • Live: scratch muxad resolved an ingested -L amux pane to {tmux_socket: "amux", tmux_session: "agents"} after one reconcile tick

🤖 Generated with Claude Code

Pane ids are only unique per tmux server, but agent rows carried only
the bare pane id — so consumers (and muxa's own reconciler) could not
tell a pane on a dedicated server (e.g. amux's `tmux -L amux`) from a
same-numbered pane on the default one, and rows never exposed their
session name on the wire.

- AgentId gains optional `tmux_socket`: hook adapters now send the
  pane's server socket path from `$TMUX` (first comma-separated field).
- Agent rows gain optional `tmux_socket` (short socket name) and
  `tmux_session`, backfilled by the reconciler's multi-socket pane scan
  each tick. Both additive; no protocol bump per the versioning policy.
- PaneInfo rows are tagged with their server's socket short name by the
  multi-socket scans (list_panes aggregation and the dashboard scanner).
- Reconciler liveness and per-pane dedup are socket-aware: a
  socket-tagged agent is only alive while ITS server has the pane, and
  same-numbered panes on different servers never collapse as duplicates.
- Discovery/synthetic rows and muxad recents candidates carry the pane's
  socket/session directly.

Verified live: a scratch muxad resolved an agent ingested from a
dedicated `-L amux` server pane to {tmux_socket: "amux", tmux_session:
"agents"} after one reconcile tick. cargo test (735+), clippy -D
warnings, and fmt --check are clean.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jiunbae jiunbae force-pushed the feat/tmux-socket-session-on-wire branch from 00838c1 to 99f7209 Compare July 9, 2026 06:40
@jiunbae jiunbae merged commit 08b7b9e into main Jul 9, 2026
5 checks passed
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