fix(agent-presets): replace removed codex --full-auto flag#3947
fix(agent-presets): replace removed codex --full-auto flag#3947saddlepaddle merged 1 commit intomainfrom
Conversation
Codex CLI 0.128.0 dropped --full-auto from the root command (still deprecated on `codex exec`), so launching the codex preset errored with "unexpected argument '--full-auto' found". Swap to the explicit equivalent: --sandbox workspace-write --ask-for-approval never.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
Greptile SummaryThis PR fixes a breaking change in Codex CLI 0.128.0 that removed
Confidence Score: 4/5Safe to merge for new installs; existing users with a saved codex preset remain broken until they manually reset. The flag replacement is correct and all changed files are consistent. The single concern — no migration for already-persisted
|
| Filename | Overview |
|---|---|
| packages/host-service/src/trpc/router/settings/agent-presets.ts | Codex preset args updated from --full-auto to --sandbox workspace-write --ask-for-approval never; no migration for existing users who already have --full-auto stored in the DB. |
| packages/shared/src/builtin-terminal-agents.ts | Both command and promptCommand strings updated consistently to replace --full-auto with the equivalent two-flag pair. |
| packages/shared/src/agent-command.test.ts | Snapshot updated to reflect new flag sequence; test logic unchanged. |
| packages/shared/src/agent-launch-request.test.ts | Snapshot updated to reflect new flag sequence; test logic unchanged. |
| apps/docs/content/docs/terminal-presets.mdx | Documentation updated to show the new --sandbox workspace-write --ask-for-approval never flags. |
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
packages/host-service/src/trpc/router/settings/agent-presets.ts:67-71
**No migration for existing users with `--full-auto`**
Existing users who already have the codex preset stored in the database will continue receiving the `unexpected argument '--full-auto' found` error until they manually reset or edit their preset. The seed change only affects new installs and `resetToDefaults()` callers.
Adding a targeted DB migration (finding rows with `presetId = 'codex'` and `argsJson` containing `--full-auto` and replacing those args in-place) would silently fix all affected installs on next startup — similar to how schema migrations already run in this package. Without it, existing users have no indication anything changed and no automatic recovery path.
Reviews (1): Last reviewed commit: "fix(agent-presets): replace removed code..." | Re-trigger Greptile
| "--sandbox", | ||
| "workspace-write", | ||
| "--ask-for-approval", | ||
| "never", | ||
| ], |
There was a problem hiding this comment.
No migration for existing users with
--full-auto
Existing users who already have the codex preset stored in the database will continue receiving the unexpected argument '--full-auto' found error until they manually reset or edit their preset. The seed change only affects new installs and resetToDefaults() callers.
Adding a targeted DB migration (finding rows with presetId = 'codex' and argsJson containing --full-auto and replacing those args in-place) would silently fix all affected installs on next startup — similar to how schema migrations already run in this package. Without it, existing users have no indication anything changed and no automatic recovery path.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/host-service/src/trpc/router/settings/agent-presets.ts
Line: 67-71
Comment:
**No migration for existing users with `--full-auto`**
Existing users who already have the codex preset stored in the database will continue receiving the `unexpected argument '--full-auto' found` error until they manually reset or edit their preset. The seed change only affects new installs and `resetToDefaults()` callers.
Adding a targeted DB migration (finding rows with `presetId = 'codex'` and `argsJson` containing `--full-auto` and replacing those args in-place) would silently fix all affected installs on next startup — similar to how schema migrations already run in this package. Without it, existing users have no indication anything changed and no automatic recovery path.
How can I resolve this? If you propose a fix, please make it concise.
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Summary
--full-autofrom the rootcodexcommand (kept oncodex execas a deprecated alias). Launching the built-in codex preset now errors withunexpected argument '--full-auto' found, reported by Manuel.--sandbox workspace-write --ask-for-approval never(auto-approval + workspace-write sandbox = old--full-autobehavior).agent-presets.ts, the builtin manifest inbuiltin-terminal-agents.ts, the two snapshot tests, and the terminal-presets doc.Note: existing users who already saved the preset keep their old
--full-autoargs until they reset/edit — only seed defaults change here.Test plan
bun test packages/shared/src/agent-command.test.ts packages/shared/src/agent-launch-request.test.ts— 14/14 passbun run lint:fix— cleanbun run typecheck --filter=@superset/shared --filter=@superset/host-service— cleanSummary by cubic
Fixes the codex preset error on Codex CLI 0.128.0 by replacing the removed
--full-autoflag with its explicit equivalent. Prevents the “unexpected argument '--full-auto' found” failure when launching the preset.Bug Fixes
--full-autowith--sandbox workspace-writeand--ask-for-approval neverin the codex preset and builtin terminal agent.Migration
--full-auto; edit or reset them to use the new flags on Codex CLI 0.128.0+.Written for commit 293295d. Summary will update on new commits.
Summary by CodeRabbit
Documentation
Tests