feat(intercomms): let sessions find and talk to each other #14
Reference in New Issue
Block a user
Delete Branch "intercomms"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sessions can now find and talk to each other.
aoealready 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/opencodeAGENTS.md. States that other sessions exist, how to find one (aoe list --json --all), how to reach it (aoe send), and that$AOE_INSTANCE_IDis 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 listis 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:
[pi-test] pong - received your pingcame back as a turn in this session.bash -n bin/link.shandnix-instantiate --parse nix/home.nixboth pass.claude-md/intercomms.md:11 — Discovery uses
aoe list --json --all, butaoe sendresolves only within the selected profile. A session found under a non-default profile (such asreview) cannot be reached with this command, and the documented reply command has the same problem. Carry the record'sprofilethrough asaoe -p <profile> send ..., and include the sender's profile with the return address.Fixed in 2nd commit. You were right on both halves.
Confirmed the failure first —
aoe send --no-revive 95cabcef6c954a68(areview-profile session) from thisdefault-profile session:With
-p reviewthe same send delivers. Discovery was already fine:aoe list --json --alldoes cross profiles, and each record carriesprofile. A bareaoe listdoes not, so the fragment now says why--allmatters.Changes:
aoe -p <profile> send <id> "...", taking<profile>from the matched record.$AOE_INSTANCE_IDplus$AOE_PROFILE, both expanded into the message so the literal values travel with it. An explicit-pbeats the recipient's ownAOE_PROFILE, so the reply lands back in the sender's profile.Session not foundtext and what it actually means, since it reads like a dead session and is not one.