Repository navigation
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughCodex app-server argument resolution now converts approval and sandbox flags into Merge Risk: ⚪ Minimal · up to New Chat sessions now apply configured approval and sandbox permissions through app-server configuration, including the YOLO bypass mapping. The covered permission modes preserve the intended restricted and disabled behavior, with no remaining merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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.
✅ No new issues found.
Reviewed changes
- YOLO → app-server conversion —
resolveCodexStructuredAppServerArgsnow maps--dangerously-bypass-approvals-and-sandboxto-c approval_policy="never" -c sandbox_mode="danger-full-access". - Explicit permission flags —
-a/--ask-for-approvaland-s/--sandboxare translated to-c approval_policy=…/-c sandbox_mode=…config overrides. - Regression tests — YOLO across posix/powershell/cmd, restricted inline + short forms, and empty args.
The change is correct and narrowly scoped. I verified the short-flag mapping against src/cli/codex-command-classification.ts (where -a is --ask-for-approval and -s is --sandbox, while --add-dir has no short form) and the legacy src/main/codex-cli/codex-read-only-app-server-args.ts (-s read-only -a never). The conversion is consumed only by the structured Chat path (resolveConfiguredStructuredLaunchArgs); terminal launches pass the raw YOLO flag, which the codex TUI applies natively. The config key names match config-settings-promotion.ts, and the bypass flag is intercepted before the BOOLEAN_FLAGS pass so nothing is pushed twice. The order-sensitivity of conflicting -c overrides is pre-existing and correctly acknowledged in the description.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Satisfies CodeRabbit's docstring-coverage pre-merge check on the touched test functions and removes the duplicated expected-config arrays. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Test assertions routed through a helper — the three permission-permission assertions in
codex-structured-app-server-args.test.tswere extracted into a documentedexpectPermissionConfighelper, with each case preserving its exacttoEqualexpectation verbatim.
The delta since the prior review is test-only: the production logic in codex-structured-app-server-args.ts is unchanged, and no defective assertion was introduced by the refactor (the YOLO, restricted, and empty-args cases assert the same approval_policy / sandbox_mode values as before).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
CodeRabbit's docstring-coverage check counts anonymous callbacks in the touched test block, so the new cases run through documented functions. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Thank you for this PR and for pinning down that the app-server ignores the terminal YOLO flag. New structured Codex chats now take their permission from a per-agent setting that maps to approval policy and sandbox directly (#30853, #31315), so full access takes effect. Since this branch is stale, we are closing it as superseded. Please open an issue if a new chat still ignores your permission setting on the latest build. |

ELI5
Starting a new Codex Chat can restrict file access and ask for approval even when YOLO is enabled in Orca Settings. Codex's app-server accepts the terminal YOLO flag but does not apply it. This change translates the configured permission flags into the configuration that a new Chat actually uses.
What Changed
-c approval_policy="never" -c sandbox_mode="danger-full-access"when parsing configured arguments for a new Codex Chat.The final diff changes only the argument parser and its test file. Saved-record launch resolution and its tests are identical to the upstream base. There is no migration of existing conversations or change to thread resume behavior.
Why
With
codex-cli 0.153.4, an isolatedthread/startthroughcodex --dangerously-bypass-approvals-and-sandbox app-serverreturnedapprovalPolicy: "on-request"and areadOnlysandbox. Equivalent configuration overrides returnedapprovalPolicy: "never"anddangerFullAccess. No model turn was needed for that reproduction.The existing parser already converts reasoning effort into app-server configuration. This extends that conversion for permission settings. The normal session-creation path stores the converted arguments, so a second conversion at process launch is unnecessary.
Linked Issue
Related to #10330. This addresses the new desktop Chat manifestation reported during investigation. It does not auto-close the original intermittent mobile terminal-launch issue.
Mobile path review: ordinary new Codex sessions on a host advertising structured-session support use
agentSession.createand the same host-side configured-argument parser. That path should benefit on an updated host. Prompted/quick-command launches and fallback terminal sessions use a separate terminal command builder. Mobile behavior has not been manually verified.Visual Proof
N/A — No rendered UI change; the backend launch configuration changes. The contributor performed a desktop before/after comparison with a shell write outside the opened workspace:
fb322046e82b, fresh Chatoperation not permitted;before.txtabsent21bee8392790, fresh Chatafter.txtindependently verified to containorca-yolo-probeand a newlineresumed.txtabsent096b20366011, contributor-confirmed new Chat with restricted argumentsoperation not permitted;restricted.txtindependently confirmed absentThe desktop comparison used macOS and GPT-6 Astra. The final scope reduction preserves the tested parser conversion and removes the redundant saved-record conversion. The positive YOLO test has not been repeated on the narrowed revision; the restricted-mode control was performed there. Probe files were checked independently from the Chat tool response. No screenshots are attached.
Testing
The contributor confirmed creating a new Chat after setting Codex Arguments to
-a on-request -s read-only. The shell write was blocked. The model label was missing in that Chat; after restoring YOLO in Settings, the UI displayed Astra with medium effort. The exact model and effective runtime arguments for the restricted Chat were not independently verified. The missing label is a separate observation, not diagnosed or fixed by this PR.Checks after narrowing the diff, with
ORCA_BACKGROUND_LAUNCH=1:pnpm tc:nodesrc/main/agent-hooks/first-work-branch-rename.test.ts, lines 106 and 179pnpm run build:electron-viteThe full contributor checks were run before scope reduction on the same upstream base.
pnpm lint,pnpm typecheck, andpnpm buildfailed on the same unrelated duplicate-key file.pnpm testreported 75,442 passed, 371 skipped, and one failure in unchangedconfig/scripts/skill-recipe-shell.test.mjs: macOS Bash 3.2 emitsvercel_args[@]: unbound variablerather than the expected cleanup message. That failure also reproduced in isolation and does not import either Codex module. Full checks were not repeated after the removal; the relevant targeted checks above were rerun. No unrelated fixes are included.Earlier mobile routing tests (27) and structured-session host RPC tests (38) passed. Linux, Windows, SSH and mobile were not exercised end to end; shell parsing is covered by platform-independent tests.
AI Disclosure
OpenAI Codex (GPT-6) assisted with investigation, implementation, regression tests, compatibility review, and PR preparation.
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Existing conversations can retain their earlier restricted permissions. Reopening a baseline conversation in the fixed app did not resolve that behavior; saved-thread permission restoration is outside this PR. Start a new Chat to use the corrected configured permissions.
The original mobile terminal symptom may have a separate cause. No release/version changes are included. The manual restricted-mode control is complete. This PR is ready for maintainer review; the known full-check failures remain documented. At the readiness check, GitHub reported no merge conflicts and no check runs for the current head. Maintainer/CI validation remains outstanding.
Author
X/Twitter: Not provided.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)All four full commands were run previously; the final checkbox remains unchecked because they did not all pass. See the validation scope and failures above.