Skip to content

feat(subagents): a subagent on another computer runs within the limit that computer set, with no fixed Auto-accept edits cap - #1220

Merged
bvsr365 merged 1 commit into
masterfrom
remote-subagent-mode-follows-device-limit
Nov 15, 2026
Merged

bvsr365 merged 1 commit into
masterfrom
remote-subagent-mode-follows-device-limit

Conversation

@bvsr365

@bvsr365 bvsr365 commented Nov 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

A subagent an agent starts on another computer (delegate_task with computer) never runs above Auto-accept edits, whatever either computer allows. Raising that computer's highest permission mode for this one to Full access changes nothing for the agent's work there.

Change

  • A remote subagent's mode is now the narrowest of the parent thread's mode, the parent's run and the highest permission mode the other computer set for this one. The fixed Auto-accept edits cap is gone (decision 11 and §4.7 of the agent threads design, docs PR docs(plans): add the agent threads architecture #1161).
  • So when that computer allows this one Full access and the parent runs in Full access, the subagent runs in Full access there: an agent on this computer can then run commands on that one without anyone being asked. That limit still starts at Auto-accept edits, so this happens only after a person on that computer raised it.
  • Unchanged: never looser than the parent's run; a follow-up (continue_subagent) is no looser than the run that sends it and the mode the subagent started with; a read-only task (workspace: 'shared' or a plan ceiling) is still sent in Plan mode; a chain stays one computer deep; the switch and the computer list are read on every call. The other computer still narrows to its limit before setting the mode and refuses anything above it.
  • Run database version 18 rebuilds remote_subagents so its mode column accepts Full access. Rows written before keep their mode and order, so a subagent started before this change keeps its old mode on follow-ups.
  • Settings → Agents → Agent access no longer names a mode: "Runs on the computers you turn on, within the limit each of them set for this one." The switch keeps its name.
  • A device's limits dialog (Devices page) adds one line saying the highest permission mode also bounds the subagents that device's agents start here.
  • The threat model, SPEC (§ on another of the user's computers) and glossary state the new rule.

Verification

Tier 5 (permissions and a migration). Run on 9c584c5ee, rebased on master at 0bfd7f476:

  • npx vitest run tests/run/remoteSubagents.test.ts tests/run/remoteSubagentEngine.test.ts tests/run/profileDatabase.test.ts tests/net/bridge/routed/remoteSubagents.test.ts tests/net/bridge/routed/owner.test.ts tests/net/bridge/routed/composerPermission.test.ts tests/renderer/agentAccessSettingsScreen.test.ts tests/agentAccessSettings.test.ts tests/themeSelectors.test.ts: 9 files, 139 tests passed.
  • npm run typecheck: passed.
  • The rule: a table in tests/run/remoteSubagents.test.ts through delegate_task with the real orchestrator and engine and a fake far computer. Full access passes through when both allow it, the default or a lower device limit narrows it, a stricter parent narrows it, and a read-only task is sent in Plan mode. A second test shows a follow-up narrows to the run that sends it. With the old cap put back, the Full access, read-only and follow-up cases fail.
  • The far side: tests/net/bridge/routed/remoteSubagents.test.ts runs two real daemons over Bridge. Once the owner raises its limit for the caller to Full access, the far thread is set to Full access and the task is sent under a limit of Full access. The existing case still shows a wider mode narrowed to the default limit. The refusal above the limit is already covered in owner.test.ts.
  • The migration: rows written at version 17 keep their mode and order after version 18, Full access is accepted after it, and an unknown mode is still refused.
  • Not checked: the two copy changes in the running app (no screenshots), and a real remote subagent between two computers with a real agent.

Notes

This changes permission rules, so it needs review by the other teammate before merging. The Devices page overlaps with #869, which rewrites that page. This PR changes one line in DeviceLimitsDialog.tsx, which #869 does not touch. Other PRs of this design that add a run database migration will need to renumber after this one (version 18).

Refs #1160

🤖 Generated with Claude Code

… that computer set, with no fixed Auto-accept edits cap

A remote subagent's mode is now the narrowest of the parent thread's mode, the parent's run and the
highest permission mode the other computer set for this one. Full access is used there only when
both allow it. Run database version 18 lets the stored mode be Full access.

Refs #1160

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bvsr365
bvsr365 merged commit ea1b126 into master Nov 15, 2026
7 checks passed
@bvsr365
bvsr365 deleted the remote-subagent-mode-follows-device-limit branch November 15, 2026 15:37
bvsr365 added a commit that referenced this pull request Nov 15, 2026
…; run database contract 19

The owner's envelope for an agent on another computer is agentMessage with { computer }, so the
bubble shows only the agent's words for such a message too. Migration 19 (remote_subagents.marked)
follows #1220's 18. The Full access remote subagent test's stand-in returns the run's sequence, as a
real send does, and checks the marked thread is held to Full access, not capped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvsr365 added a commit that referenced this pull request Nov 15, 2026
…; run database contract 19

The owner's envelope for an agent on another computer is agentMessage with { computer }, so the
bubble shows only the agent's words for such a message too. Migration 19 (remote_subagents.marked)
follows #1220's 18. The Full access remote subagent test's stand-in returns the run's sequence, as a
real send does, and checks the marked thread is held to Full access, not capped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant