Repository navigation
Description
Operating system
macOS
Orca version
1.4.242+mxt.0216
Details
Short summary
On macOS, Codex Channel panes fail to reopen after an Orca restart. The pane spawn rejects with:
Orca could not verify the originating Codex session file, so automatic resume was stopped to avoid using a different account.
Affected panes show as failed in MXT Terminal grids; other (non-channel) terminals open normally.
Environment
- Orca: 1.4.242+mxt.0216 (lang branch with the Codex channel launch/resume pipeline)
- OS: macOS 27.2.0 (arm64), Darwin 27.2.0
- Shell: /bin/zsh
Root cause analysis
Two mismatches compound in the spawn path (resolvePtySpawnHostEnv → resolveCodexResumeLaunch):
-
Channel transcript homes are not trusted for resume verification.
trustedCodexResumeHomes()returns only the system home (~/.codex), the Orca managed home, and per-account managed homes. A channel pane'sproviderSession.transcriptPathlives under
~/Library/Application Support/Orca/codex-channel-runtime/<channelId>/<executionId>/sessions/YYYY/MM/DD/rollout-*.jsonl,
which is in none of those homes.resolveCodexSessionResumeProvenancetherefore always returnsoutcome: 'fresh'withclaimedCodexProvenance: true(the path matches thesessions/YYYY/MM/DD/rollout-*layout regex). -
The unverified-resume fallback cannot strip the channel resume command.
buildCodexChannelResumePlanlaunchesorca codex-channel --restore-channel <ref> --resume <id>.dropAgentResumeArgvFromCommandonly recognizes suffixesresume <id>/'resume' '<id>'/"resume" "<id>". Strippingresume <id>from... --resume <id>leaves a base ending in--, which fails the whitespace-boundary check (/\s$/), so every candidate returns null → statusunrecognized.
With claimedCodexProvenance: true + unrecognized, dropUnverifiedCodexResumeArgv throws UNVERIFIED_CODEX_RESUME_ERROR. The throw propagates through prepareRuntimePtySpawn → the pty:spawn IPC handler rejects → the renderer marks the pane start failed → the terminal never opens.
Deterministic reproduction: any Codex pane bound to a launch channel (MXT grid panes on this branch), quit Orca, reopen — the channel panes fail with the error above on every startup.
Why the guard should not apply here
The channel reference pins the exact sealed revision (command, env, resolved config) and the channel home carries its own credentials. There is no cross-account ambiguity for a channel resume: orca codex-channel --restore-channel replays the sealed revision as a whole. The unverified-resume guard (designed for plain codex resume <id> commands whose transcript provenance is doubtful) should skip channel-bound sessions entirely — e.g. early-return in prepareCodexResumeHome/dropUnverifiedCodexResumeArgv when providerSession.codexChannel is set, or teach the drop logic the --resume flag shape as defense in depth.
Suggested fix
In src/main/ipc/pty/host-env/codex-resume.ts (prepareCodexResumeHome) or src/main/codex/codex-unverified-resume-launch.ts, bypass the trusted-home verification + argv-drop path when providerSession.codexChannel != null, since the sealed channel already pins account and configuration. Optionally extend dropAgentResumeArgvFromCommand to recognize --resume <id> / --fork <id> suffixes so future flag-shaped resume commands degrade to a fresh launch instead of refusing.
Related
- [Bug]: Codex auto-resume verification fails repeatedly after Orca restart on Windows #11143 reports the same error message on Windows (v1.4.159, pre-channel pipeline) — likely a different trigger, but the same guard surface.
Activity