fix(codex): honor sandbox when full-auto is enabled#245
Conversation
|
@dyxushuai is attempting to deploy a commit to the plgeek Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughCodexAgentPlugin.buildArgs now separates preliminary args ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where the --full-auto flag in the Codex CLI agent was forcing the workspace-write sandbox mode, overriding user-selected custom sandboxes. This prevented Codex tool calls from accessing required paths when users specified alternative sandbox modes.
Changes:
- Modified the argument building logic to use
-a on-requestglobal flag when fullAuto is enabled with a non-default sandbox - Introduced
preArgsarray to properly order global flags before the subcommand - Added test coverage to verify the new behavior with custom sandbox configurations
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/plugins/agents/builtin/codex.ts | Updated buildArgs method to conditionally use approval flag instead of --full-auto when custom sandbox is specified, ensuring global flags are placed before subcommand |
| src/plugins/agents/builtin/codex.test.ts | Added test case to verify that approval flag is used correctly when fullAuto is enabled with a custom sandbox |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address PR review feedback: - Verify --sandbox flag is still correctly included when using approval flag instead of --full-auto - Add test for read-only sandbox to ensure behavior works for all non-default sandbox values, not just danger-full-access
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Explain that when fullAuto is enabled with a custom sandbox mode (read-only or danger-full-access), Ralph TUI uses -a on-request instead of --full-auto to honor the sandbox setting. Update CLI arguments section to show both command formats.
3db8b3e to
489cac5
Compare
|
thanks for this @dyxushuai 🤘 |
--full-auto is a subcommand flag that must come after exec. Only -a (global approval flag) needs to precede the exec subcommand. Fixes test failure: Expected args[0] to be 'exec', not '--full-auto'
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #245 +/- ##
=======================================
Coverage 43.49% 43.49%
=======================================
Files 92 92
Lines 28351 28358 +7
=======================================
+ Hits 12330 12334 +4
- Misses 16021 16024 +3
🚀 New features to boost your workflow:
|
fix(codex): honor sandbox when full-auto is enabled
Why
How
Tests
Summary by CodeRabbit
Bug Fixes
Tests
Documentation