Repository navigation
Conversation
79871e3 to
93f5477
Compare
|
Hi @nwparker, thanks for the work on this. Do you have an update on what remains before this PR is ready for review? I noticed it’s still a draft and has merge conflicts. Is anything blocking progress, or is there a part where I could help? |
|
Related active implementation for cross-review: #30677 (agent settings and terminal Auto), with #30853 stacked on it for native-chat defaults. Refs #13081 and #25559. #30677 exposes Auto only beside Claude, Claude Agent Teams, and Codex, with no global Auto action. #30853 adds per-agent defaults for new native chats; existing chats retain their own modes. Native synchronization requires an explicit mutation opt-in and separate host capability so older clients and hosts retain terminal-only behavior. The changes overlap AgentCatalogRow, AgentsPane, and tui-agent-permissions. Reconcile global presets versus scoped choices, older-peer handling, and native-chat default seeding before merging both implementations. #14745 is also active for Claude’s live permission-mode picker. |
|
Superseded by merged #30677 (the revised global Auto control, Other agents fallback, and per-agent exceptions) and #30853 (native-chat permission defaults). Closing this alternative implementation to avoid duplicate work on #13081. The merged design intentionally limits Auto to Claude, Claude Agent Teams, and Codex; additional harness mappings would be separate follow-up work. |
ELI5
Users who want fewer approval prompts should be able to keep the protections their agent offers. Orca currently exposes only Manual and Yolo globally. This adds an intermediate Auto preset in Settings and onboarding, plus a permission selector inside each installed agent’s launch settings.
For example, choosing Auto changes a standard Claude launch from
--dangerously-skip-permissionsto--permission-mode autoand a standard Codex launch to--approve-for-me. A harness without a verified Auto preset, such as Amp, falls back to Manual. Custom launch settings remain intact.What Changed
Settings and onboarding
Auto mappings
--permission-mode auto--permission-mode autoorca claude-teamswrapper to Claude.--approve-for-me--approval-mode auto_edit--approval-mode auto--permission-mode smart--auto mediumGOOSE_MODE=smart_approveThe remaining harnesses have no verified intermediate mapping in this change. Global Auto clears recognized Yolo presets for those harnesses to Manual; their per-agent controls omit Auto. This is a supported-preset matrix, not a claim that those tools have no other permission configuration mechanisms.
Vendor evidence and rollout caveats are recorded in
docs/reference/agent-permission-presets.md. Auto is not one uniform security policy across vendors.Permission handling and compatibility
agentDefaultArgsandagentDefaultEnv; no new persisted permission-mode field or stream opcode.request_user_inputquestions.settings.agent-permission-auto.v1through the existing capability mechanism.Why
The binary choice made users trade convenience against all available guardrails, even when their CLI supports a middle ground. Harness-specific mappings allow users to choose that middle ground without guessing flags or assuming every tool supports the same mode.
Preserving custom profiles and untouched onboarding state also avoids turning a preference change into an unintended permission escalation.
Linked Issue
Fixes #13081.
Reworks the feature requested in #13348 and the linked follow-up comment. The implementation includes per-agent controls and a verified mapping list; it does not assume every mapping proposed in that PR is supported.
Visual Proof
Actual full-window Electron screenshots, captured via Playwright CDP with
ORCA_BACKGROUND_LAUNCH=1. Before views use the pre-change source frome9af947035f; after views show this implementation. Test windows remained hidden. Images are GitHub attachments and are not committed to the PR.Settings — before and after
Onboarding — before and after
Unsupported harness — Manual fallback, light theme
Amp exposes only Manual / Yolo and remains Manual after applying global Auto. The empty arguments field does not imply bypass arguments are active.
Custom arguments — preserved after applying global Auto
Claude retains
--model custom; its individual preset control is disabled with an explanation, while other recognized harness presets use Auto.Testing
Latest targeted run: 302 tests passed across 26 files, covering preset classification/application, custom preservation, local/remote launch-command construction, Settings controls, onboarding persistence, Codex notifications, legacy-client settings protection, and remote transport handshakes.
Also passed during implementation:
pnpm tc— node, CLI, and web typechecks.pnpm run check:code-quality:changed— native, type-aware, and React Doctor gates.pnpm run check:max-lines-ratchet.git diff --check; commit hooks passed.pnpm run build:electron-vite), plus the development build used for rendered verification.Reproduce the targeted test run
Manual review steps
Readiness review and correctness fixes
Reviewed against
$readiness-checklist, including persistence/mobile compatibility, remoting, retries, security, performance, and platform scope. No counsel-validated P0/P1 findings. Three independent reviewers completed findings validation and blind peer ratings; Grok hit its weekly usage limit and produced no report. All completed reviewers classified the save-order issue as P2. They confirmed the underlying global Manual/Yolo race predates this PR; the fix addresses that existing path too.Expanded validation: 289 desktop tests across 21 files and 13 mobile tests across 5 files pass (302 total). Desktop coverage includes settings persistence/migrations, protocol compatibility, remote request/control and CLI/web transports, onboarding failure/retry, notification behavior, custom-value preservation, and server-switch fencing. Mobile covers capability bounds/negotiation, protocol compatibility, legacy encrypted fixtures, and request deadlines. Full typechecks, changed-code quality, localization catalog/runtime/extraction/coverage, max-lines, and whitespace checks pass. Production Electron bundling passes.
Rendered regression proof: in a hidden macOS Electron renderer, inject 750 ms latency into each real settings save, type
--model readiness-prooffor Claude, and click global Auto directly from the focused field. The saved Claude value survives, Codex becomes--approve-for-me, and the UI correctly displays a custom global profile. This exercises rendered controls and persistence, with no live agent task launched.Remaining limits: no physical SSH network-failure drill, native Windows/Linux/mobile UI, or signed installer validation. The change adds no polling, background subprocesses, dependencies, serialized setting fields, or new network sink. Concurrent edits from separate clients retain existing whole-map last-write-wins semantics; the new queue protects actions within this settings pane.
Review and limits
pnpm run build:electron-vite) passes. Full repositorypnpm lint, fullpnpm test, and complete desktop packaging/signing were not run; normal CI and packaging gates remain required.Agent skill upstream boundary
Checklist