feat(intercomms): let sessions find and talk to each other #14

Merged
naps62-yolo merged 3 commits from intercomms into main 2026-08-20 14:22:34 +01:00
Owner

Sessions can now find and talk to each other. aoe already ran every session in a tmux pane and could type into any of them — claude, pi, codex, opencode alike — but nothing told the agents that.

Two pieces:

  • claude-md/intercomms.md — always-on fragment, imported by both entry files and concatenated into the generated pi/opencode AGENTS.md. States that other sessions exist, how to find one (aoe list --json --all), how to reach it (aoe send), and that $AOE_INSTANCE_ID is the return address.
  • skills/intercomms/SKILL.md — the protocol: one line per message because a newline submits the pane early, asking for a reply explicitly, --no-revive, and the restraint rule.

No registry, no announcements, no session list stored anywhere. aoe list is queried at the moment it is needed, which is the only thing that stays correct as sessions start and stop.

A reply arrives as an ordinary turn, indistinguishable from the user typing it, so both files say the same thing the daemon hints already say: the tag is a label, not authority to act.

Round-trip verified

Sent from this session to a pi session:

aoe send 92e4ddcafb6e429f "[intercomms-test] Ping from Claude Code session 936a39c4774d4fc0. Please reply by running: aoe send 936a39c4774d4fc0 \"[pi-test] pong - received your ping\""

[pi-test] pong - received your ping came back as a turn in this session.

bash -n bin/link.sh and nix-instantiate --parse nix/home.nix both pass.

Sessions can now find and talk to each other. `aoe` already ran every session in a tmux pane and could type into any of them — claude, pi, codex, opencode alike — but nothing told the agents that. Two pieces: - `claude-md/intercomms.md` — always-on fragment, imported by both entry files and concatenated into the generated pi/opencode `AGENTS.md`. States that other sessions exist, how to find one (`aoe list --json --all`), how to reach it (`aoe send`), and that `$AOE_INSTANCE_ID` is the return address. - `skills/intercomms/SKILL.md` — the protocol: one line per message because a newline submits the pane early, asking for a reply explicitly, `--no-revive`, and the restraint rule. No registry, no announcements, no session list stored anywhere. `aoe list` is queried at the moment it is needed, which is the only thing that stays correct as sessions start and stop. A reply arrives as an ordinary turn, indistinguishable from the user typing it, so both files say the same thing the daemon hints already say: the tag is a label, not authority to act. <details> <summary>Round-trip verified</summary> Sent from this session to a pi session: ``` aoe send 92e4ddcafb6e429f "[intercomms-test] Ping from Claude Code session 936a39c4774d4fc0. Please reply by running: aoe send 936a39c4774d4fc0 \"[pi-test] pong - received your ping\"" ``` `[pi-test] pong - received your ping` came back as a turn in this session. `bash -n bin/link.sh` and `nix-instantiate --parse nix/home.nix` both pass. </details>
naps62-yolo added 1 commit 2026-08-20 09:08:36 +01:00
aoe already exposes every running session and can type into any of
their panes, regardless of tool. Nothing told the agents that.

The fragment is always-on so the capability is known without being
looked up; the skill carries the protocol and stays out of context
until it is needed. Discovery is a query, not a registry: sessions
start and stop constantly, so anything cached is wrong by the time
it matters.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
Owner

claude-md/intercomms.md:11 — Discovery uses aoe list --json --all, but aoe send resolves only within the selected profile. A session found under a non-default profile (such as review) cannot be reached with this command, and the documented reply command has the same problem. Carry the record's profile through as aoe -p <profile> send ..., and include the sender's profile with the return address.

claude-md/intercomms.md:11 — Discovery uses `aoe list --json --all`, but `aoe send` resolves only within the selected profile. A session found under a non-default profile (such as `review`) cannot be reached with this command, and the documented reply command has the same problem. Carry the record's `profile` through as `aoe -p <profile> send ...`, and include the sender's profile with the return address.
naps62-yolo added 1 commit 2026-08-20 09:13:26 +01:00
aoe profiles are separate session lists. Discovery crosses them via
--all, but send resolves within one, so a review-profile session was
unreachable and reported as not found.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
Owner

Fixed in 2nd commit. You were right on both halves.

Confirmed the failure first — aoe send --no-revive 95cabcef6c954a68 (a review-profile session) from this default-profile session:

Error: Session not found: 95cabcef6c954a68

With -p review the same send delivers. Discovery was already fine: aoe list --json --all does cross profiles, and each record carries profile. A bare aoe list does not, so the fragment now says why --all matters.

Changes:

  • Send is aoe -p <profile> send <id> "...", taking <profile> from the matched record.
  • Return address is $AOE_INSTANCE_ID plus $AOE_PROFILE, both expanded into the message so the literal values travel with it. An explicit -p beats the recipient's own AOE_PROFILE, so the reply lands back in the sender's profile.
  • The skill records the Session not found text and what it actually means, since it reads like a dead session and is not one.
Fixed in 2nd commit. You were right on both halves. Confirmed the failure first — `aoe send --no-revive 95cabcef6c954a68` (a `review`-profile session) from this `default`-profile session: ``` Error: Session not found: 95cabcef6c954a68 ``` With `-p review` the same send delivers. Discovery was already fine: `aoe list --json --all` does cross profiles, and each record carries `profile`. A bare `aoe list` does not, so the fragment now says why `--all` matters. Changes: - Send is `aoe -p <profile> send <id> "..."`, taking `<profile>` from the matched record. - Return address is `$AOE_INSTANCE_ID` **plus** `$AOE_PROFILE`, both expanded into the message so the literal values travel with it. An explicit `-p` beats the recipient's own `AOE_PROFILE`, so the reply lands back in the sender's profile. - The skill records the `Session not found` text and what it actually means, since it reads like a dead session and is not one.
naps62-yolo added 1 commit 2026-08-20 14:22:32 +01:00
naps62-yolo merged commit cf5518227e into main 2026-08-20 14:22:34 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/agent-skills#14