Repository navigation
feat: start agents on linked machines per server settings - #43
Merged
Merged
Conversation
nickrroberts
force-pushed
the
feat/multi-machine-agents
branch
from
September 29, 2026 22:15
d068f90 to
e5eed26
Compare
Coordinators and standing agents can start one-off agents on other machines linked to their server. Placement (this machine, one machine, or balanced by load) is a server-owned setting under Settings > Connections > Agent machines. Results, read, stop and send work across machines through a registry and a bridge that pushes results into the asking thread. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cp_agent_settle now works on a remote agent: it settles the peer thread when no request is in flight, archives on request, and marks the record settled. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Follows the coordinator-owned settling rule: the bridge no longer settles a remote agent after its result. cp_agent_settle does it, on the peer. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nickrroberts
force-pushed
the
feat/multi-machine-agents
branch
from
September 29, 2026 22:26
e5eed26 to
c057681
Compare
This was referenced Sep 30, 2026
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.
What
Coordinators (and standing agents) can start one-off agents on other machines linked to their server, such as a Mac Mini on the tailnet. Where a new agent runs follows a server-owned setting. Spec:
docs/internals/multi-machine-agents.md.Spec summary
/api/orchestration/shell,/threads/:id,/dispatch) with a bearer token limited toorchestration:read orchestration:operate. The remote agent is a normal thread in a matching Project on the peer. Nothing is added to the peer.ServerSettings.agentPlacement: modelocal(default, today's behaviour) /single/balanced, per-machine preference (Prefer, Normal, Less often, Manual only, the same vocabulary as the client Load balancing), fallback to this machine, and a linked-machine map. New section Settings > Connections > Agent machines. Tokens live in the secret store, never in settings. Link with the same pairing link a client uses.(load + 1) / weightover reachable machines that have a matching Project. Load is running agents on the machine plus recent placements not yet visible. Ties are deterministic. One shared 10-agent cap per Project across machines. Offline machines are ineligible. An explicitmachinenever falls back.AGENTS.md. Nothing is created on the peer.cp_agent_creategains an optionalmachine, bounded by settings. Results and list entries name the machine.cp_agent_read,cp_agent_stopandcp_thread_sendwork on remote agents by id or title. Standing agents stay local. Runtime mode is never looser than the coordinator's or caller's.cp-push:message the local reactor uses, and the reactor is nudged (enqueueProject) to start it.Review
A sub-agent reviewed the spec against the code (2 blockers, 12 should-fix). Addressed: the reactor never started an idle recipient after a bridge append (now enqueued); start failures never produced a result (now delivered as failed); opaque peer errors; 401 holds instead of failing agents; unlink cannot revoke the peer session; explicit trust statement plus a six-command allowlist; secret names encoded; per-entry settings map; create ordering with registry first and peer calls outside the create lock; ownership and routing for remote agents; per-machine polling; version check; peer create omits
createdByThreadIdandreplyTo. Details at the end of the spec.Local results (no remote CI)
Compared against
origin/mainat the same commit (b7744df).pnpm test: identical to main. Only failure isbuild-desktop-artifact.test.ts(cross-architecture Windows probe), on both. The branch adds 5 passing tests each in contracts and shared.apps/server, full run): 51 failed | 5585 passed on the branch. The same 10 files and 51 tests fail on main (ThreadSettlementReactor storage cleanup x37, entrypoint symlink, AgentSessionScanner, Antigravity, CodexDriver, CursorProvider, ProviderRegistry, providerMaintenance, UsageService). Environment related and unrelated to this change.cp_agent_createthrough an MCP session onto a peer, and the Add machine dialog beyond the successful link.Decisions for Nick
machine.cp_agent_list). A local mirror row is a follow-up.🤖 Generated with Claude Code