Claude/agent teams communication yt18t#18
Open
amDosion wants to merge 8 commits intopengchengneo:mainfrom
Open
Claude/agent teams communication yt18t#18amDosion wants to merge 8 commits intopengchengneo:mainfrom
amDosion wants to merge 8 commits intopengchengneo:mainfrom
Conversation
Introduces Unix domain socket based communication allowing two independent Claude Code CLI terminals to exchange messages in real-time without polling. - pipeTransport.ts: PipeServer/PipeClient classes using Node.js net module - pipeRepl.ts: Interactive REPL with chat, remote cmd, ping, pipe discovery - pipe-demo.ts: Quick launcher script for testing https://claude.ai/code/session_01EAD69BAKKWnThvTZhMLK2N
Implements a full attach/detach protocol allowing one CLI terminal (master) to forward user input to another CLI terminal (slave) and receive streamed AI output back, while both can still operate independently when detached. Changes: - Extended pipe protocol with attach/detach/prompt/stream/done message types - Added pipeIpc state to AppState (role, serverName, attachedTo, attachedBy) - Created usePipeIpc hook (slave: auto-start PipeServer, handle attach, inject prompts) - Created useMasterRelay hook (master: receive slave output, inject into conversation) - Added /attach, /detach, /pipes slash commands - Mounted hooks in REPL.tsx alongside useInboxPoller and useMailboxBridge https://claude.ai/code/session_01EAD69BAKKWnThvTZhMLK2N
…output relay Closes the two remaining gaps in the pipe bridge: 1. Master-mode input intercept (REPL.tsx onSubmit): When role=master, user input is forwarded to the slave via pipe instead of being sent to the local AI. Slash commands still run locally so /detach works. 2. Slave-mode output relay (REPL.tsx onQueryEvent + turn-end): When role=slave, assistant text blocks are streamed back to the master as they arrive. A 'done' message is sent when the turn completes. Tool starts are also relayed. Uses globalThis.__pipeSendToMaster bridge to avoid circular deps between the REPL callbacks and the usePipeIpc hook. https://claude.ai/code/session_01EAD69BAKKWnThvTZhMLK2N
Add a complete inter-terminal communication system where: - Every CLI auto-starts a PipeServer (standalone by default) - Master CLI can /attach to multiple slaves, monitoring their sessions - Slave CLI auto-reports all session data (AI output, tool calls) to master - Master can /send tasks to slaves and review with /history, /pipe-status New commands: /attach, /detach, /pipes, /send, /history, /pipe-status New hooks: usePipeIpc (every CLI), useMasterMonitor (master only) Transport: NDJSON over Unix domain sockets (~/.claude/pipes/*.sock) https://claude.ai/code/session_01EAD69BAKKWnThvTZhMLK2N
Tests the complete master-slave communication flow with two independent processes over real Unix domain sockets: attach, prompt, session data relay (stream/tool_start/tool_result/done), detach, and re-attach. All 11 test cases pass. https://claude.ai/code/session_01EAD69BAKKWnThvTZhMLK2N
Comprehensive document covering requirements (12 items), architecture design (transport/state/hooks/commands), implementation details for all modified files, and test verification results. https://claude.ai/code/session_01EAD69BAKKWnThvTZhMLK2N
ee1bab0 to
17c20c7
Compare
… definitions Phase 1 — Pipe IPC master-slave system: - Named pipe transport (pipeTransport.ts) with NDJSON protocol - UDS client/messaging (udsClient.ts, udsMessaging.ts) - React hooks: usePipeIpc, useMasterRelay, useMasterMonitor, useSlaveNotifications - Commands: /attach, /detach, /peers, /send, /pipes, /pipe-status - Safe getPipeIpc() accessor with default state Phase 2 — 9 PARTIAL feature flag implementations (P0-P8) Phase 3 — 12 null tool stubs replaced with full buildTool() implementations All stub call() return explicit error/unavailable messages. All imports verified. Safe pipeIpc state access throughout. https://claude.ai/code/session_01EAD69BAKKWnThvTZhMLK2N
17c20c7 to
6d9cede
Compare
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.
No description provided.