Repository navigation
fix(adapters): refuse to start the autonomous runner on delegated CLI adapters (AGT-4444) - #842
Merged
Merged
Conversation
… adapters (AGT-4444) claude, codex and cursor hand the whole tool loop to another program, so the publication fence, protected files, role tool limits and the credential-free sandboxed shell never reach them; base.ts could only log that they were dropped. The daemon now checks every unattended adapter setting (adapter, defaultRoles, projectAgents roles, adapterRouting primary and fallbacks, orchestrator, loopAdvisor) and throws at startup naming each one. autonomous.allowDelegatedAdapters: true opts out.
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.
Why
claude,codexandcursorhand the whole tool loop to another program. OpenSwarm's publication fence, protected files, role tool limits and (since #840/#841) the credential-free, loopback-only shell therefore never reach them.base.tscan only log that they were dropped, andclauderuns with--permission-mode bypassPermissions. An unattended worker on one of them has no fence at all — the AGT-4783 incident class (AGT-4444).This is cycle 1 of the factory-stability loop; check C2 of the stability harness.
What changes
src/adapters/unattendedPolicy.ts. It scans every place the daemon can pick an adapter:adapter;autonomous.defaultRoles;roles;adapterRoutingprimary and fallbacks;orchestrator;loopAdvisor.A role the operator switched off is skipped.
service.ts: startup throws before anything starts, naming each offending setting, the safe alternatives and the opt-out. The check runs whenever anautonomoussection exists, heartbeat on or off, because an explicit dispatch runs the same workers. Interactive CLI use is unaffected.autonomous.allowDelegatedAdapters(defaultfalse): the operator's explicit acceptance. Schema, type and the hand-writtentransformConfigmapping are all updated, since a schema field alone does not reach callers.adapterRouting.fallbacksschema default is['cc-router', 'cursor']. A bareadapterRouting:block already routed to cursor, so it is now refused unless fallbacks are set explicitly.### Changed/### Addedheadings that fix(worker): withhold credentials from worker bash and fail closed without a sandbox (AGT-4783) #840 and feat(worker): loopback-only network for worker bash and a per-project setup step (AGT-4798) #841 left inUnreleased. No entry was dropped (11 bullets before and after).Verified
unattendedPolicy.test.ts(17): each configuration surface on its own, every adapter name inADAPTER_NAMES, disabled roles, opt-in handling (=== trueonly).service.test.ts: a wiring test proves startup refuses andstartAutonomousis never called. 11 existing tests usedadapter: 'claude'with an autonomous section; they now opt in explicitly, because they test boot behaviour, not adapter policy.src/adapters,src/core, osSandbox, workerSetup: 1227 passed. typecheck, lint.config.yamlusesadapter: ollama-cloudand noadapterRouting, so it is unaffected.Not covered
periodicReviews[].adapter(read-only review profiles) is not checked.base.tswarning is unchanged for runs that do not go through the daemon.