send_message via the inbox socket #158
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lz/agent-nexus#158
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
"Tell session 2 to look at the auth bug." The highest-value tool and the one with the most measured detail behind it.
Depends on #154. Scope:
nexus:write.Use the inbox socket, not
sendNudgeEvery session exports
CLAUDE_CODE_MESSAGING_SOCKETandCLAUDE_CODE_MESSAGING_TOKEN. Measured inside one worker:A message delivered there arrives as a cross-session message, which never counts as consent and so cannot answer a pending permission prompt on the recipient's behalf.
sendNudgetypes raw text into the PTY and has no such guarantee — the hazard its own comment innexus/src/lib/server/artifacts/tmux-nudge.tsalready describes.That gap is tolerable today because the only sender is the operator approving their own artifact feedback. It becomes a hole the moment a second principal exists, which is the direction this milestone is heading: one principal's
send_messagecould answer a permission dialog in another's session. The socket is the option that survives.Integration details, each pinned by a test
docker exec, so it is not an "own-child" sender; the message goes through the receiving session'scrossSessionInboundcontrols.defaultMode: auto, which counts as prompting, so messages are delivered. A session runningbypassPermissionsholds them for approval instead. Pin this rather than discovering it later — it is the difference between a tool that works and one that silently queues.{"type":"auth","token":"<CLAUDE_CODE_MESSAGING_TOKEN>"}as the first line. Optional on Linux, required on Windows; send it always.Resolving the socket
Each session's socket is named for its claude pid. Resolution has to go from a
sessionsrow to that pid. Noteprocpsis not installed in the worker image (AGENTS.md fact #5) — walk/proc/[0-9]*/cmdlinedirectly, ascheckSessionHealthalready does, and reuse itskind-dispatching match:kind='session'matches the full--remote-control "<workspace> · <name>"argv precisely so one Remote Control process does not satisfy every session's probe.Out of scope
sendNudgestays where it is. Artifact feedback submission is not in scope; whether it should also migrate is a follow-up.Do not build a mailbox or session-to-session messaging. Claude Code already does it, and Nexus made its own fleet addressable without meaning to —
ListAgentsfrom inside a worker returned 28 peers, sibling sessions over a Unix socket plus sessions in other Nexus workers via Remote Control. A Nexus mailbox would be a worse copy of something with inbound controls, loop throttling, burst caps, a 100-message hold queue, and the no-consent guarantee above.Done when
A message sent through the tool appears in the target session as a cross-session message; a
bypassPermissionssession is observed to hold rather than deliver it; and the auth line, the 30s idle close and the pid resolution each have a test proven able to fail.