Repository navigation
Codex restarts keep the configured command before a session is recorded - #33629
Conversation
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
fafc1c2a-6662-4aa6-900f-736c08e971bf
Files selected for processing: 6-
src/renderer/src/components/terminal-pane/codex-detached-pane-restart.test.tssrc/renderer/src/components/terminal-pane/codex-detached-pane-restart.tssrc/renderer/src/lib/agent-account-restart-startup.test.tssrc/renderer/src/lib/agent-account-restart-startup.tssrc/renderer/src/lib/codex-session-restart.test.tssrc/renderer/src/lib/codex-session-restart.ts
Files with no reviewable changes: 2-
- src/renderer/src/lib/codex-session-restart.test.ts
- src/renderer/src/lib/codex-session-restart.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
-
|
When Restart in place ran before Codex recorded a session, it could discard the command from Settings. On Windows, the npm PowerShell script then failed under script policy even though the configured native executable worked for the first launch. Restart now keeps the configured command in both fresh fallback paths. Recorded conversations retain their existing resume behavior; no-session arguments/environment remain unchanged. Two review rounds completed. Fixed incomplete Settings/store fixtures and migrated the remaining integration importer to the real builder; mounted and paired transport assertions now verify the configured command and agent-launch fields. No findings deferred. Final reference, readiness, performance and narrow main-merge checks passed. Verified on Fixtures and limits: existing notices/dialogs were exposed with disclosed notice-only fixtures; commands, provider identity and replies were genuine. Organic account-switch discovery/credential migration were not exercised. WSL was unavailable for Codex on the admitted machine (missing Linux binary or Node); WSL contracts passed. Detached no-leaf queue-to-mount remains contract-only because no reliable topology fixture preserved its existing UI entry point. The main policy-failure image below is reused matching-baseline evidence from For Brennan's review
|








When Restart in place ran before Codex recorded a session, Orca discarded the Codex command configured in Settings and ran bare codex. On Windows this could select the npm PowerShell script and fail under script policy even though the configured native executable worked for the initial launch.
Restart now selects the configured command through the existing launch selector, including the deferred fallback for a pane without a layout leaf. Recorded conversations retain their resume behavior. User-supplied shell commands remain unchanged.
Tracked in STA-11741; also covers duplicate STA-11742.
Review path: full, because this changes terminal restart and process launch. Two review rounds completed; incomplete test fixtures and the remaining importer of the removed constant were repaired in place. Final reference, readiness, performance and main-merge checks passed.
Intended existing differences from the common pattern: terminal commands remain opaque shell text, fresh no-session restarts keep empty appended arguments/environment, WSL Codex retains its fresh-relaunch boundary, and Claude requires a recorded conversation. No new saved fields, wire operations or controls.
Validation: final CI green on f22f288, including typecheck, all five test shards, changed layout specs and Windows packaging. Targeted tests passed through the test gate, and normal pre-commit checks passed. Real Windows QA used a restrictive process-only PowerShell policy, an absolute codex.exe override and real Codex/Claude replies through the existing rendered restart actions. Initial launch and no-session Restart each returned two replies; recorded Codex and Claude sessions retained history, identity and remembered tokens across a graceful previous-build upgrade and Restart.
QA limits: notice-only fixtures exposed existing restart notices/dialogs; organic account-switch discovery and credential migration were not tested. WSL could not run the installed Codex CLI on this machine; its contract tests passed. The detached no-leaf queue-to-mount flow has contract coverage but was not exercised in the running app because no reliable topology fixture preserved the existing UI entry point. Matching-main policy-failure proof was reused from the prior c6ce72d baseline; this run created fresh baseline conversations for upgrade continuity. Full-window screenshots and the review marker are in the review status comment.