feat(framework/tools): inter-agent tmux comms — agent-send.sh + addressing standard #533

Merged
jason.woltje merged 1 commits from feat/tmux-interagent-comms into main 2026-06-11 18:01:45 +00:00
Owner

What

Adds tools/tmux/ to the framework source — inter-agent tmux comms tooling that
until now existed only in installed ~/.config/mosaic copies and was never
committed upstream.

Files

  • agent-send.sh (new) — inter-agent messaging wrapper. Auto-detects the
    sender's host:session and prepends the canonical addressing preamble
    [<src_host>:<src_session> -> <dst_host>:<dst_session>], then delivers to a
    local OR remote pane. Remote delivery ships send-message.sh over ssh and
    runs it local to the target pane, so the unreliable ssh → nested-tmux
    Enter/C-m submission swallow can't occur. Remote host needs only
    bash+tmux+base64 — no framework install required there.
  • send-message.sh — low-level reliable single-pane submitter (bracketed
    paste + Enter-flush + draft detection). Adds a -b <base64> input for ssh-safe
    transport.
  • README.md — documents the addressing standard (replies flip the
    preamble) and the submission gotcha the helper solves.

Why

After a tmux-session wipe, agents lost track of who was who. The addressing
preamble makes every cross-agent message self-identifying. The helper makes
delivery reliable across the ssh hop, which previously dropped messages silently
as unsubmitted drafts.

Standard

[<src_host>:<src_session> -> <dst_host>:<dst_session>] <message>

Recipients reply with the flipped preamble.

Verification

  • bash -n clean on both scripts; README is prettier-clean (prettier@3.8.4 --check).
  • Situational test, both paths, against live agents:
    • local → rev0-4: delivered; reviewer replied in the correct flipped format.
    • remote (ssh) → installer-1 on a separate host: queued correctly
      ("Press up to edit queued messages") — the exact case that failed before.
  • Shell scripts are outside the format:check glob (**/*.{ts,tsx,js,jsx,json,md});
    no shellcheck step in CI.

Distribution

Propagates to each host via install.sh rsync on next framework upgrade. Already
copied manually to active agent hosts in the interim.

🤖 Generated with Claude Code

## What Adds `tools/tmux/` to the framework source — inter-agent tmux comms tooling that until now existed only in installed `~/.config/mosaic` copies and was never committed upstream. ### Files - **`agent-send.sh`** (new) — inter-agent messaging wrapper. Auto-detects the sender's `host:session` and prepends the canonical addressing preamble `[<src_host>:<src_session> -> <dst_host>:<dst_session>]`, then delivers to a local OR remote pane. Remote delivery **ships `send-message.sh` over ssh** and runs it local to the target pane, so the unreliable `ssh → nested-tmux` Enter/`C-m` submission swallow can't occur. Remote host needs only bash+tmux+base64 — no framework install required there. - **`send-message.sh`** — low-level reliable single-pane submitter (bracketed paste + Enter-flush + draft detection). Adds a `-b <base64>` input for ssh-safe transport. - **`README.md`** — documents the addressing standard (replies flip the preamble) and the submission gotcha the helper solves. ## Why After a tmux-session wipe, agents lost track of who was who. The addressing preamble makes every cross-agent message self-identifying. The helper makes delivery reliable across the ssh hop, which previously dropped messages silently as unsubmitted drafts. ## Standard ``` [<src_host>:<src_session> -> <dst_host>:<dst_session>] <message> ``` Recipients reply with the flipped preamble. ## Verification - `bash -n` clean on both scripts; README is prettier-clean (`prettier@3.8.4 --check`). - Situational test, both paths, against live agents: - local → `rev0-4`: delivered; reviewer replied in the correct flipped format. - remote (ssh) → `installer-1` on a separate host: queued correctly ("Press up to edit queued messages") — the exact case that failed before. - Shell scripts are outside the `format:check` glob (`**/*.{ts,tsx,js,jsx,json,md}`); no shellcheck step in CI. ## Distribution Propagates to each host via `install.sh` rsync on next framework upgrade. Already copied manually to active agent hosts in the interim. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jason.woltje added 1 commit 2026-06-11 17:47:59 +00:00
feat(framework/tools): inter-agent tmux comms — agent-send.sh + standard
All checks were successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
91bf99efe1
Adds tools/tmux/ to the framework source (previously only present in installed
~/.config/mosaic copies, never committed):

- agent-send.sh: inter-agent messaging wrapper. Prepends the canonical
  addressing preamble [<src_host>:<src_session> -> <dst_host>:<dst_session>]
  (auto-detecting the sender), and delivers reliably to local OR remote panes.
  Remote delivery ships send-message.sh over ssh and runs it local to the target
  pane, sidestepping the ssh->nested-tmux Enter/C-m submission swallow; the
  remote needs only bash+tmux+base64 (no framework install required there).
- send-message.sh: low-level reliable single-pane submitter (bracketed paste +
  Enter-flush + draft detection). Adds a -b base64 input for ssh-safe transport.
- README.md: documents the addressing standard (replies flip the preamble) and
  the submission gotcha the helper exists to solve.

Propagates to each host via install.sh rsync on next framework upgrade.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
jason.woltje merged commit dfa0be42f6 into main 2026-06-11 18:01:45 +00:00
jason.woltje deleted branch feat/tmux-interagent-comms 2026-06-11 18:01:46 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#533