Skip to content

feat: attach a reply address so the receiving session can answer #3

Closed

Description

@abruption

Motivation

Messages are fire-and-forget today, and SKILL.md tells the receiving Claude outright that it cannot answer. That instruction is what actually makes it one-way — the transport itself is fine. Measured just now: KR reaches this laptop over SSH (OK: abruptly.local, key auth), so a reply would work if the far side simply knew where to send it.

The address can be derived rather than typed. Claude Code exports CLAUDE_CODE_MESSAGING_SOCKET into each session, so a send running inside a session can read its own pid out of the socket path, look its name up in the registry, and pair it with this machine's tailnet address.

Note what this is and isn't: a reply address grants no access. If the far side can't SSH here it can't reply regardless, and if it can, it never needed the address. This is discovery — it tells the receiver that answering is possible at all.

Proposed behaviour

cc-peer send --host kr --to ontology "..."     # reply line attached automatically
cc-peer send --host kr --to ontology --no-reply-to "..."
cc-peer send --host kr --to ontology --reply-to 100.122.73.69 "..."

Appended to the message body:

---
Reply: cc-peer send --host <tailnet-ip> --to <this session>

Host resolution: --reply-to → CC_PEER_REPLY_HOST → tailscale ip -4 → interface scan for 100.64.0.0/10 → give up silently and send without the line.

Acceptance criteria

  • Own session resolved from CLAUDE_CODE_MESSAGING_SOCKET; absent outside a session, and then the line is skipped
  • Tailnet address detected on both macOS (interface scan; the app's CLI isn't on PATH) and Linux (tailscale ip -4)
  • Address is the sender's, not the remote's — the line must be built locally before dispatch, not on the far side
  • --no-reply-to and --reply-to <host> both work
  • SKILL.md stops claiming replies are impossible, and gains a loop guardrail: reply once, don't hold a conversation
  • Verified by an actual round trip between two machines

Activity

  1. added
    enhancement
    on Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions