Repository navigation
feat(external-agents): per-run --add-dir and a default sandbox fence for write runs - #18240
Conversation
…for write runs - run takes a repeatable --add-dir <absolute dir> on write runs, mapped through each provider record's modes.write.add_dir (agy and codex --add-dir); refused with exit 2 on read-only runs, reviews, resumed codex threads, relative or missing paths. - antigravity write runs default to --mode accept-edits with the terminal sandbox on, proceed-in-sandbox and no non-workspace access; --unsandboxed auto restores --mode auto for one run. - jobs record fence and add_dirs; status prints both. - on --unsandboxed auto, agy writes its log to the job folder (--log-file) and the auto-mode warning is reported as a fallback only when that log never shows SetCycleMode called: auto. - skills: decide extra directories and any out-of-sandbox need before the run, and name them in the prompt. Refs: #18213 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RAoAtSpSp2jjCP7KQfz65x
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RAoAtSpSp2jjCP7KQfz65x
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 895df7f09a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Lane run report
Run 45069488428, attempt 1
Failed GitHub API callsNo failed call recorded by the run job's scripts. |
|
claude-security-review reviewed Security review: PR #18240, incremental (94d667c → b8a46b0)Blocking only: this lane already reviewed an earlier head, so this pass reports only CRITICAL and IMPORTANT findings. I read every hunk of all 3 files in the incremental scope and found no security issues. What changed
Scope checks
critical-findings: 0 |
|
claude-review reviewed Code review, incremental (
|
Point at agy's docs instead of restating its sandbox behavior, quote the applied auto-mode notice as a substring, and move the fence suite and shared test fixtures out of runner.test.mjs to keep it under the size reference and drop an issue reference from a code comment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RAoAtSpSp2jjCP7KQfz65x
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RAoAtSpSp2jjCP7KQfz65x
|
The pr-verify verifier failed head What it wrote (34 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
|
Held with do-not-merge. pr-verify is right that #18213's Codex parity criterion asks for |
Post-merge mutation testingKilled 0, survived 1, timeout 0, no coverage 0, invalid 0, not run 6.
Surviving mutants
The run's summary has the full report. |
Closes #18213
Summary
external-agents run <antigravity|codex> --use task --mode writetakes a repeatable--add-dir <absolute path>, declared per provider (providers/antigravity.yaml,providers/codex.yaml) and mapped to each CLI's own--add-dir. Without it a write run stays workspace-only. The flag is refused (exit 2) on a read-only run, a review, a relative path, a path that is not an existing directory, and a Codex resume. The job record andstatuslist the added directories.--mode accept-editswithenableTerminalSandbox: true,toolPermission: proceed-in-sandboxandallowNonWorkspaceAccess: false. Workspace edits and sandboxed commands run without prompting. A request to run outside the sandbox needs a prompt a headless run cannot answer, so it is refused and recorded through the existing soft-deny rule.--unsandboxed autorestores--mode autofor one run. The job record andstatusshow the fence.--unsandboxed autopath, the run passes agy's--log-fileand reports a fallback only when that log lacksSetCycleMode called: auto. agy prints the warning before its silent sign-in, so on a personal account the warning alone does not mean a fallback.--sandbox workspace-write, no--approve-for-me) and gains only--add-dir, on new runs (add_diris not a global option, so a resume takes none). No unsandboxed opt-in is added for Codex: the owner amended external-agents: per-run --add-dir for write runs, and no false auto-mode fallback notice #18213's Codex parity criterion to drop the--approve-for-meopt-in (external-agents: per-run --add-dir for write runs, and no false auto-mode fallback notice #18213 (comment)).--unsandboxed autoonly when the task needs commands outside the sandbox.Fix
providers/*.yaml,scripts/lib/runner.mjs(checkAddDirs,fenceFor,buildArgs),scripts/lib/outcome.mjs,scripts/lib/provider.mjs,scripts/external-agents.mjs, the config schema, both skills and their run and jobs references, the README, tests and fixtures. The fence suite lives intests/fence.test.mjs, with the shared fixtures intests/support/world.mjs. Aminorchangelog fragment is in.changes/external-agents/.Verification
node --test --test-concurrency=4 plugins/external-agents/tests/{runner,fence}.test.mjs: 104 tests, 101 pass, 0 fail, 3 skipped (Windows-only). New cases cover both CLIs'--add-dirmapping, each refusal, the default fence and--unsandboxed autoargument sets, and the job-record andstatusfields. CI's Test Node and Test Bash pass on the head.validate-plugins.sh --only external-agents, the changelog-fragment, as-of, comment-hygiene, fixture-git-isolation and shared-copy checks, typos and markdownlint pass.accept-editsrefuses a headless out-of-sandbox request with thepermission that headless mode cannot prompt fortext, and whether--log-filecapturesSetCycleMode called: auto. Both are exercised throughtests/fixtures/fake-agy.mjs. The second matches agy 1.5.14's own log on a run today.Related
🤖 Generated with Claude Code
https://claude.ai/code/session_01RAoAtSpSp2jjCP7KQfz65x