feat: carry tmux socket + session name on agent rows#60
Merged
Conversation
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>
00838c1 to
99f7209
Compare
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.
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 amuxserver).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.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 warningscargo fmt --all -- --check-L amuxpane to{tmux_socket: "amux", tmux_session: "agents"}after one reconcile tick🤖 Generated with Claude Code