Repository navigation
feat: say who a message is from - #17
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-machineSendMessageshows@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:
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:
Flags
From:andReply:--no-reply-toFrom:— knowing the sender is useful even when you can't answer--no-fromType
Checklist
python3 cc_peer.py listworks locallypython3 cc_peer.py list --host <a real host>works over SSH--dry-runresolves a target without posting anythingVerified 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.