Repository navigation
run.sh: start bravebot with --dangerously-bypass-approvals-and-sandbox - #209
Merged
Merged
Conversation
The loop launched bravebot with --dangerously-skip-permissions, which skips the permission checks but leaves the default workspace-write sandbox on. The flag that also turns the sandbox off is the one codex already gets from this script.
bbondy
approved these changes
Nov 1, 2026
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.
User impact:
./run.sh --agent bravebotnow starts bravebot with its sandbox off, as it already does for codex.The problem
./run.shstarts bravebot with--dangerously-skip-permissions. That flag skips the permission prompts but leaves bravebot's default sandbox (workspace-write) on, so every program the agent runs is still confined. Per bravebot's--help, the flag that also turns the sandbox off is--dangerously-bypass-approvals-and-sandbox, "as--dangerously-skip-permissionswith--sandbox off". run.sh already passes that flag to codex.Reproduce
tests/sim/sim.shbuilds a throwaway deployment with a fake target repo and dummy stories, so no tokens are spent. A stub stands in for the bravebot binary and records the flags it was started with. Story US-003 is the one for issue 103.BOTSIM_DIR=/tmp/botsim-bypass tests/sim/sim.sh buildCreate
/tmp/botsim-bypass/fake-bravebot(chmod +x):cd /tmp/botsim-bypass && BRAVE_DEV_LOOP_HOME=/tmp/botsim-bypass/home ./run.sh 1 --agent bravebot --agent-bin /tmp/botsim-bypass/fake-bravebot https://github.com/example/sim/issues/103cat /tmp/botsim-bypass/argv.txtRun from
master, the run starts US-003 and bravebot is started without--sandbox off:Run from this branch (copy its
run.shover/tmp/botsim-bypass/run.shafter step 1), the same command gives:(
run.shexits 1 in both runs: the stub does not finish the story, so it reports reaching the iteration limit. The sim's repositoryexample/simdoes not exist, soghprints warnings.)tests/test_bravebot_launch.pyruns the bravebot launch cut out ofrun.sh, one-shot and withtui, against a stub that records its flags. Four of its eight cases (the flag is passed, the old one is not) fail on the parent commit.The fix
Both bravebot launches in
run.sh, the one-shot run and thetuirun, now pass--dangerously-bypass-approvals-and-sandboxwhere they passed--dangerously-skip-permissions. bravebot takes the new flag out of its arguments wherever it sits, as it does the old one, so the-iand--modelplacement the comment describes still holds.Test plan
make lint— passedmake test— 1594 passed, 4 skippedtests/simruns above, onmasterand on this branchmake check-reviewdog— no findings;landrunis not installed on this host, so opengrep and pip-audit ran unsandboxedChoices worth a look
--helpand its argument parser, not from watching a confined program succeed or fail.scripts/lib/agent-launch.shis unchanged. It still starts bravebot with--dangerously-skip-permissionsfor the comparison run, its evaluator andscripts/pr-feedback.sh. This PR is aboutrun.sh; those launches stay sandboxed until someone decides otherwise.