Repository navigation
Description
Problem or use case
Some of us manage our agent CLIs' global config ourselves, often generating ~/.claude/settings.json, ~/.codex/config.toml and similar from a script or dotfiles repo. For us, Orca writing into those files is the one thing that stops us adopting it. Today Orca writes outside its own data directory on startup and on agent launch:
- Status hooks go into each detected agent's user-global config (
~/.claude/settings.json,~/.codex/hooks.json,~/.cursor/hooks.json, …), and Orca creates~/.orca/agent-hooks. This can already be turned off with "Agent status hooks". - Folder trust markers go into
~/.codex/config.toml,~/.cursor/projects/…,~/.copilot/config.jsonand~/.gemini/antigravity-cli/settings.json, including on SSH remotes. No setting controls these. - Codex settings write-back from the managed runtime home into
~/.codex/config.toml. No setting controls this. - Claude managed-account credentials are materialized into
~/.claude(see [Bug]: Active Claude managed account is materialized into the user's default CLAUDE_CONFIG_DIR — sessions launched outside Orca bill the selected account #16016, [Bug]: Account switch writes oauthAccount to ~/.claude/.claude.json, so new Claude terminals show the previous account #22667). No setting controls this.
Turning off status hooks covers only the first item, and the rest have no off switch. Related reports: #9963, #14301, #16016, #22592.
Proposed solution
A single opt-in setting, Settings → Agents → "Isolate external agent config", default off. When it's on, Orca writes nothing outside its own data directories:
- no managed hooks (local or remote); status hooks read as off everywhere they're checked
- no folder-trust presets in agent homes (the Orca-owned Codex runtime config still gets trust, so Codex launches keep working)
- no Codex hook-approval promotion or settings write-back into
~/.codex - no Claude credential sync. Turning isolation on first switches back to the system-default login, so a managed account isn't left in
~/.claude. Managed-account switching is disabled while isolated.
Trade-offs: status dots fall back to what can be inferred without hooks, and agents show their own "trust this folder?" prompt.
This builds on the direction of #19974 (first-run disclosure) and #20691 (hooks opt-in) without depending on either. It doesn't change any default, and it covers the writes those PRs don't touch.
Alternatives or additional context
- Flipping status hooks to default-off (fix(agent-hooks): managed agent hooks require explicit opt-in #20691) helps, but it doesn't cover trust presets, the Codex write-back or credentials.
- Running Orca under a separate
HOMEworks as a workaround, but the agents then lose the user's real config and logins.
I've opened a PR with an implementation, including unit and E2E tests. Happy to adjust the direction based on maintainer feedback.
Activity