You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Worker peer messaging and a shared task list (agent teams) #277
Inspired by Claude Code Agent Teams and the multi-agent framework survey (the 2026 production default per Addy Osmani et al.).
Today everything flows through the orchestrator. Add: (1) a shared task list workers self-claim from, with dependency auto-unblocking; (2) peer messaging so workers exchange artifacts directly (backend worker sends the frontend worker the API contract) instead of routing through the lead; (3) handoffs-as-artifacts (MetaGPT SOP idea): structured docs (plan.md, contract.md) passed through the worktree, not chat history. Include loop guardrails: iteration caps and a forced 'what failed / am I repeating myself' reflection before retries.
Deep-dive detail (Synara Agent Gateway): two properties worth copying into the design — (1) idempotency: batch thread creation takes stable requestIds so retries replay the durable operation instead of duplicating threads; (2) privilege monotonicity: an approval-required orchestrator cannot spawn or steer a MORE privileged worker.
Design + work split (in progress on coder/worker-peer-messaging-and-a-shared-task--ca6e83)
Crew = the orchestrator thread at the top of the handoffFrom chain plus every orchWorker under it. That id keys everything, so all workers of one orchestration self-claim from the same list.
Dependency auto-unblocking is derived, not stored: blocked is computed from needs on read, so completing a task unblocks its dependents with no second write to go stale. completeCrewTask returns exactly the tasks that just became claimable, and that list is what wakes the crew.
Loop guardrails: CREW_TASK_ATTEMPT_CAP = 3 refuses a fourth claim of the same task; crewTaskNoteFor injects a forced "what failed / am I repeating myself" reflection into the dispatch prompt whenever a held task has prior attempts or the thread's last run failed. CREW_AUTO_TURN_CAP = 25 caps consecutive machine-delivered turns.
electron/runner.js — deliverNotice({threadId, line}) generalized out of the existing orchestrator wake-up queue (peer messages and unblock wake-ups reuse one mechanism), the iteration cap, the reflection note in dispatch, and claim release on a failed run.
Renderer — threads:crewTasks IPC + the task list in AgentsPanel.
Handoffs-as-artifacts: no new artifact store. Worktrees of one repo share a git object store, so the hand-off is "commit contract.md on your branch, send the peer a branch:path ref" (in the task note or a peer message); the peer reads it with git show. That is the convention the MCP instructions now state.
Implemented on coder/worker-peer-messaging-and-a-shared-task--ca6e83
Three grok workers in parallel worktrees, disjoint files, all three branches merged in. 2557 insertions across 21 files.
(1) Shared task list.store.tasksByCrew[rootThreadId], keyed by the crew root (crewRootOf walks handoffFrom while orchWorker). Agents call task_add / task_list / task_claim (omit taskId to self-claim the next unblocked one) / task_complete / task_release. blocked is derived from needs on every read, so completing a task opens its dependents with no second write to go stale; completeCrewTask returns exactly what became claimable and that wakes the crew root.
(2) Peer messaging.peer_send({ toThreadId, message }) delivers straight to the peer thread, no round trip through the lead — verified in crew-seam.test.js by asserting the lead's transcript stays empty. Delivery is runner.deliverNotice, which is the existing orchestrator wake-up queue generalized (one queue, one rule: idle thread runs immediately, busy thread flushes at its terminal) rather than a second mechanism.
(3) Hand-offs as artifacts. No artifact registry. Worktrees of one repo share a git object store, so the hand-off is: commit contract.md on your branch, send a branch:path ref in the task note or peer message, peer reads it with git show <branch>:<path>. Stated in the coder-threads MCP instructions, so every agent gets it on every dispatch.
(4) Loop guardrails. All three are refusals, not advice:
CREW_TASK_ATTEMPT_CAP (3) — a fourth claim of the same task is refused; attempts[] records who tried and what each gave back.
crewTaskNoteFor rides every dispatch of a thread holding a task and, when it was attempted before or the thread's last run failed, forces the "what failed / am I repeating myself" answer before the retry.
CREW_AUTO_TURN_CAP (25) consecutive machine-delivered turns, refused through the same undeliverable path as the orchestration budget gate; any user turn resets it.
A failed run releases the thread's claims with the error as the outcome, so a crashed worker never strands a task.
UI: threads:crewTasks → task rows in the Agents panel (id, title, status/blocked pill, owner, done note, attempt count once >1). Read-only; agents own the list.
Tests: core 38/38, renderer 883/883, electron 1094 pass / 1 fail — the pre-existing web-integration reconnect baseline that fails on main too. New: crew-tasks (12), orch-crew-tools, crew-notices, crew-seam (3, real handlers × real runner), crewTasks.test.tsx.
Not merged to main, not pushed. Architecture notes in docs/ARCHITECTURE.md.
Deep-dive framing (harness roadmap round): the vendors are absorbing orchestration INTO their CLIs (Claude SendMessage peer messaging, Codex session forks, Kimi /goal) — but only within their own harness, and they are poaching each other's users (Codex imports Claude sessions). Solenta's durable position is the neutral switchboard: your Claude session can message your Codex session. No vendor will ever build cross-vendor SendMessage.
Research notes: (1) Codex agent mail (#34852): durable inter-agent mailboxes that WAKE sleeping threads on message — re-activation, not just delivery. (2) The August arXiv orchestration paper measured artifact-first coordination at 42% fewer tokens with no coordinator agent — steer handoffs through files and memory records, not agent-to-agent chat, wherever possible.
From the CLI doc-mines: opencode's noReply:true injection and Codex's thread/inject_items — append context into a session WITHOUT consuming a turn or appearing as a user message. The clean way to seed sibling-agent progress or orchestrator state into a worker.
Round 20: Claude Code 2.1.224–2.1.232 made cross-session messaging a product, not a research preview.
Type @ in the prompt to mention another live Claude session by name; SendMessage delivers.
ListAgents discovers sessions on this machine and Remote Control sessions on other machines.
New /config rows: inbound accept / hold / refuse, plus dialog expiry.
Security rule we should copy: inbound messages to a session running with bypassed permissions are held for approval, not auto-delivered (crossSessionInbound in 2.1.224). Auto-mode also runs SendMessage through the permission classifier before dispatch (2.1.222).
Hardened the cross-session socket dir on shared /tmp against a pre-planted symlink.
Our peer_send / #277 is the same shape across vendors. The missing piece is the inbound policy when the target thread is in bypassPermissions — do not silently inject into an unsupervised run.
Round 22 intel: Anthropic shipped the cross-session version of this (v2.1.224): sessions discover each other with a ListAgents tool and send with SendMessage, either when the user asks ("tell the session on the payments API that users.name is now users.display_name") or proactively when one session's change affects another's work. Two constraints they chose that are worth keeping in Solenta's worker messaging: messages are text the agent writes, never raw conversation history or files (bounded, reviewable), and the read receipt is visible to the user ("Message from" row, Ctrl+O to expand). The proactive trigger (notify on cross-session impact) is the interesting frontier: it needs the orchestrator to know which threads touch which files, which connects to the shared-index work.
Activity
currentbits commentedon Aug 17, 2026
Deep-dive detail (Synara Agent Gateway): two properties worth copying into the design — (1) idempotency: batch thread creation takes stable requestIds so retries replay the durable operation instead of duplicating threads; (2) privilege monotonicity: an approval-required orchestrator cannot spawn or steer a MORE privileged worker.
currentbits commentedon Aug 17, 2026
Design + work split (in progress on
coder/worker-peer-messaging-and-a-shared-task--ca6e83)Crew = the orchestrator thread at the top of the
handoffFromchain plus everyorchWorkerunder it. That id keys everything, so all workers of one orchestration self-claim from the same list.Contract commit (landed,
electron/test/crew-tasks.test.js, 12/12):store.tasksByCrew[rootThreadId]+getCrewTasks/setCrewTasks.services:crewRootOf,listCrewTasks,addCrewTasks,claimCrewTask,completeCrewTask,releaseCrewTasks,crewTaskNoteFor.blockedis computed fromneedson read, so completing a task unblocks its dependents with no second write to go stale.completeCrewTaskreturns exactly the tasks that just became claimable, and that list is what wakes the crew.CREW_TASK_ATTEMPT_CAP = 3refuses a fourth claim of the same task;crewTaskNoteForinjects a forced "what failed / am I repeating myself" reflection into the dispatch prompt whenever a held task has prior attempts or the thread's last run failed.CREW_AUTO_TURN_CAP = 25caps consecutive machine-delivered turns.Three parallel grok workers, disjoint files:
electron/orchServer.js— MCP toolstask_add/task_list/task_claim/task_complete/task_release/peer_send.electron/runner.js—deliverNotice({threadId, line})generalized out of the existing orchestrator wake-up queue (peer messages and unblock wake-ups reuse one mechanism), the iteration cap, the reflection note in dispatch, and claim release on a failed run.threads:crewTasksIPC + the task list in AgentsPanel.Handoffs-as-artifacts: no new artifact store. Worktrees of one repo share a git object store, so the hand-off is "commit
contract.mdon your branch, send the peer abranch:pathref" (in the task note or a peer message); the peer reads it withgit show. That is the convention the MCP instructions now state.currentbits commentedon Aug 17, 2026
Implemented on
coder/worker-peer-messaging-and-a-shared-task--ca6e83Three grok workers in parallel worktrees, disjoint files, all three branches merged in. 2557 insertions across 21 files.
(1) Shared task list.
store.tasksByCrew[rootThreadId], keyed by the crew root (crewRootOfwalkshandoffFromwhileorchWorker). Agents calltask_add/task_list/task_claim(omit taskId to self-claim the next unblocked one) /task_complete/task_release.blockedis derived fromneedson every read, so completing a task opens its dependents with no second write to go stale;completeCrewTaskreturns exactly what became claimable and that wakes the crew root.(2) Peer messaging.
peer_send({ toThreadId, message })delivers straight to the peer thread, no round trip through the lead — verified increw-seam.test.jsby asserting the lead's transcript stays empty. Delivery isrunner.deliverNotice, which is the existing orchestrator wake-up queue generalized (one queue, one rule: idle thread runs immediately, busy thread flushes at its terminal) rather than a second mechanism.(3) Hand-offs as artifacts. No artifact registry. Worktrees of one repo share a git object store, so the hand-off is: commit
contract.mdon your branch, send abranch:pathref in the task note or peer message, peer reads it withgit show <branch>:<path>. Stated in the coder-threads MCP instructions, so every agent gets it on every dispatch.(4) Loop guardrails. All three are refusals, not advice:
CREW_TASK_ATTEMPT_CAP(3) — a fourth claim of the same task is refused;attempts[]records who tried and what each gave back.crewTaskNoteForrides every dispatch of a thread holding a task and, when it was attempted before or the thread's last run failed, forces the "what failed / am I repeating myself" answer before the retry.CREW_AUTO_TURN_CAP(25) consecutive machine-delivered turns, refused through the same undeliverable path as the orchestration budget gate; any user turn resets it.UI:
threads:crewTasks→ task rows in the Agents panel (id, title, status/blocked pill, owner, done note, attempt count once >1). Read-only; agents own the list.Tests: core 38/38, renderer 883/883, electron 1094 pass / 1 fail — the pre-existing
web-integrationreconnect baseline that fails on main too. New:crew-tasks(12),orch-crew-tools,crew-notices,crew-seam(3, real handlers × real runner),crewTasks.test.tsx.Not merged to main, not pushed. Architecture notes in
docs/ARCHITECTURE.md.Merge pull request #407 from currentbits/coder/worker-peer-messaging-…
currentbits commentedon Aug 17, 2026
Deep-dive framing (harness roadmap round): the vendors are absorbing orchestration INTO their CLIs (Claude SendMessage peer messaging, Codex session forks, Kimi /goal) — but only within their own harness, and they are poaching each other's users (Codex imports Claude sessions). Solenta's durable position is the neutral switchboard: your Claude session can message your Codex session. No vendor will ever build cross-vendor SendMessage.
currentbits commentedon Aug 18, 2026
Research notes: (1) Codex agent mail (#34852): durable inter-agent mailboxes that WAKE sleeping threads on message — re-activation, not just delivery. (2) The August arXiv orchestration paper measured artifact-first coordination at 42% fewer tokens with no coordinator agent — steer handoffs through files and memory records, not agent-to-agent chat, wherever possible.
currentbits commentedon Aug 18, 2026
From the CLI doc-mines: opencode's noReply:true injection and Codex's thread/inject_items — append context into a session WITHOUT consuming a turn or appearing as a user message. The clean way to seed sibling-agent progress or orchestrator state into a worker.
currentbits commentedon Aug 18, 2026
Round 20: Claude Code 2.1.224–2.1.232 made cross-session messaging a product, not a research preview.
@in the prompt to mention another live Claude session by name;SendMessagedelivers.ListAgentsdiscovers sessions on this machine and Remote Control sessions on other machines./configrows: inbound accept / hold / refuse, plus dialog expiry.crossSessionInboundin 2.1.224). Auto-mode also runsSendMessagethrough the permission classifier before dispatch (2.1.222)./tmpagainst a pre-planted symlink.Our
peer_send/ #277 is the same shape across vendors. The missing piece is the inbound policy when the target thread is inbypassPermissions— do not silently inject into an unsupervised run.currentbits commentedon Aug 18, 2026
Round 22 intel: Anthropic shipped the cross-session version of this (v2.1.224): sessions discover each other with a ListAgents tool and send with SendMessage, either when the user asks ("tell the session on the payments API that users.name is now users.display_name") or proactively when one session's change affects another's work. Two constraints they chose that are worth keeping in Solenta's worker messaging: messages are text the agent writes, never raw conversation history or files (bounded, reviewable), and the read receipt is visible to the user ("Message from" row, Ctrl+O to expand). The proactive trigger (notify on cross-session impact) is the interesting frontier: it needs the orchestrator to know which threads touch which files, which connects to the shared-index work.