Skip to content

feat: say who a message is from - #17

Merged
abruption merged 1 commit into
mainfrom
feat/15-sender-identity
Sep 7, 2026
Merged

abruption merged 1 commit into
mainfrom
feat/15-sender-identity

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

Closes #15.

Claude Code records a peer message posted to the socket with origin.from = "unknown" — it has a field for the sender and cc-peer gave it nothing. A same-machine SendMessage shows @api-worker; ours showed nothing, so every message had to introduce itself by hand. Forget once and the receiver cannot tell who is asking, which matters because the receiving Claude is told to treat a peer message as a teammate's request.

Sends now open with:

From: [email protected] (documents-57)

Built from the same detection the reply address uses, so the two cannot drift apart.

What it deliberately does not add

Claude Code already prefaces arriving peer messages and appends its own guidance about what a peer may and may not ask for. Repeating either here would put a duplicate paragraph in every message and compound with each hop, so the envelope carries only the two facts Claude Code lacks: the sender, and a return address that runs.

Confirmed on a real delivery — the receiving transcript reads:

Another Claude session sent a message:      ← Claude Code
From: [email protected] (documents-57) ← cc-peer
[body]
---
Reply: python3 ~/.claude/skills/cc-peer/cc_peer.py send --host … --no-reply-to

Flags

effect
default From: and Reply:
--no-reply-to keeps From: — knowing the sender is useful even when you can't answer
--no-from body and reply address only
both bare body, unchanged

Type

  • feat
  • fix
  • docs
  • chore / refactor / test / perf

Checklist

  • python3 cc_peer.py list works locally
  • python3 cc_peer.py list --host <a real host> works over SSH
  • --dry-run resolves a target without posting anything
  • Commits follow Conventional Commits
  • Docs updated if behavior changed (README / SKILL.md / CLAUDE.md)
  • No secrets, tokens, or session keys in the diff

Verified against

v2.1.263 — 34/34 tests passing (7 new), plus an end-to-end send to a KR worker with the receiving transcript inspected.

Claude Code records a peer message posted to the socket with
origin.from = "unknown" — it has a field for the sender and we give it
nothing. A same-machine SendMessage shows @api-worker; ours showed nothing,
so every message had to introduce itself by hand, and forgetting once left
the receiver unable to tell who was asking. That matters: the receiving
Claude is told to treat a peer message as a teammate's request.

Sends now open with From: <user>@<host> (<session>), built from the same
detection the reply address already uses so the two can't drift apart.
--no-from omits it; --no-reply-to no longer takes it with them, since
knowing who sent something stays useful when answering isn't possible.

What Claude Code already adds, this does not repeat. It prefaces arriving
peer messages and appends its own guidance about what a peer may ask for;
a second copy would ride along on every hop.
@abruption
abruption merged commit ed3dfcd into main Sep 7, 2026
6 checks passed
@abruption
abruption deleted the feat/15-sender-identity branch September 7, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identify the sender: peer messages arrive with origin.from = unknown

1 participant