Repository navigation
fix(providers): skip the trust and init questions where the person already answered - #800
Merged
Merged
Conversation
…ready answered
Codex, Cursor CLI, Antigravity and Crush opened unattended sessions on a
"trust this folder?" or "initialize this project?" screen, and a sandboxed
oh-my-pi opened on its setup wizard.
- Confined spawns: Codex gets -c projects={"<main checkout>"={trust_level="trusted"}},
Cursor CLI gets --trust, oh-my-pi gets OMP_SKIP_SETUP=1.
- Cursor CLI: a linked worktree gets its .workspace-trusted marker when the
main checkout is trusted, since a worktree sits beside its repository.
- Antigravity: the folder is added to trustedWorkspaces when its checkout's
top or main checkout is listed, and for every confined session.
- Crush: .crush/init (with Crush's own "*" .gitignore) is written at the
checkout's top before every spawn.
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
Follow-up to #796, which did this for Claude Code. The other providers still opened a session lich started unattended (a relayed task, a race,
lich open --prompt) on a blocking first screen:Each provider was measured in a real PTY with isolated config: where it keeps the answer, which flows ask, which knob skips the question, and whether it keeps an entry lich writes while a session runs (all four do).
-c projects={"<main checkout>"={trust_level="trusted"}}(the dotted form still asks)~/.cursor/projects/<slug>/.workspace-trusted; confined:--trusttrustedWorkspaceswhen its checkout's top or main checkout is listed, and for every confined session.crush/init(plus Crush's own*.gitignore) at the checkout's top before every spawnconfig.ymllinks into Personal, which is not mounted)OMP_SKIP_SETUP=1opencode and Kiro CLI ask nothing.
What changes
internal/terminal/sandbox.go:confinedEnv, a per-provider map that now holds Claude Code'sCLAUDE_CODE_SANDBOXEDand oh-my-pi'sOMP_SKIP_SETUP;confinedTrustArgsfor Codex and Cursor CLI.internal/terminal/cursor_trust.go: the marker's slug rule and parent walk, read from the Cursor bundle (src/workspace/approval.tsx,workspace-paths.js).internal/terminal/antigravity_trust.go: a read, edit and atomic rename ofsettings.jsonthat keeps the other keys. A trusted parent alone never counts: Antigravity itself does not count it, and a trusted home would trust everything.internal/terminal/crush_init.go.docs/ceilings.md, the Provider support table in every README, andCHANGELOG.md.Decisions
AGENTS.mdnever comes up in a lich session.Verification
gofmt -l .andgo vet ./...clean,go test ./...green.GOOS=darwinandGOOS=windowsgo vetclean oninternal/terminal.--trust), Antigravity and Crush;git statusstays clean after Crush.--trustloosen anything beyond the question;OMP_SKIP_SETUPthrough a real bwrap (taken from the survey's measurement);