Repository navigation
feat(native-chat): require Codex 0.136.0 for chats - #26684
Conversation
…nimum-version # Conflicts: # src/shared/child-process/process-tree-termination.ts
…ct; keep the registry out of the relay Runtime tests that drive a scripted Codex app-server still ran the new version check against whatever codex was on the machine's PATH: refused on CI (no codex), and on a dev machine it ran the real codex --version. A scripted transport now must state the Codex it stands for (readCodexInstallation), asserted at install, and the tests get it from one scriptedCodexTransport fixture. The relay's Codex maintenance path reached @orca/windows-registry through resolvePathEnvKey's re-export in windows-environment-path; import it from its registry-free module instead. Also update the catalog-probe test for the shared child environment.
Review summaryThis PR got six adversarial code-review rounds, two live QA rounds in a hidden Electron app, and a final CI pass. Fixed during review
Verified
Not verified:
Left as is, on purpose:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to A wrapped Codex installation failure may show generic guidance instead of the version-specific explanation. The remaining risk is bounded, but the lookup should be fixed or explicitly accepted before merging. Pre-merge checks |
|
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
8ccef85c-6e6f-46fe-b78a-b81abace6dee
⛔ Files ignored due to path filters (1)
src/shared/rpc-contract/rpc-params-catalog.generated.tsis excluded by!**/*.generated.*
📒 Files selected for processing (137)
src/main/agent-cli-version-probe.tssrc/main/cli/orca-cli-child-path.test.tssrc/main/cli/orca-cli-child-path.tssrc/main/codex/codex-cli-installation-error.tssrc/main/codex/codex-minimum-version.test.tssrc/main/codex/codex-model-catalog-probe.test.tssrc/main/codex/codex-structured-launch-resolution.test.tssrc/main/codex/codex-structured-launch-resolution.tssrc/main/codex/codex-structured-thread-open.test.tssrc/main/codex/codex-structured-thread-open.tssrc/main/codex/configured-codex-invocation.tssrc/main/ipc/command-path-resolver.tssrc/main/ipc/local-command-path-search.test.tssrc/main/ipc/local-command-path-search.tssrc/main/ipc/preflight.tssrc/main/ipc/pty/host-env/path.tssrc/main/ipc/register-core-handlers/register-core-handlers.tssrc/main/native-chat/agent-session-wire/structured-agent-session-codex-version-recovery.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-failed-create-refusal.tssrc/main/native-chat/agent-session-wire/structured-agent-session-failure-text.tssrc/main/preflight/codex-cli-installation-cache.tssrc/main/preflight/codex-cli-installation.test.tssrc/main/preflight/codex-cli-installation.tssrc/main/preflight/codex-maintenance-command.test.tssrc/main/preflight/codex-maintenance-command.tssrc/main/preflight/codex-maintenance-configured-command.test.tssrc/main/preflight/codex-maintenance-diagnostic.tssrc/main/preflight/codex-maintenance-environment.test.tssrc/main/preflight/codex-maintenance-host.test.tssrc/main/preflight/codex-maintenance-host.tssrc/main/preflight/codex-maintenance-process.test.tssrc/main/preflight/codex-maintenance-process.tssrc/main/preflight/codex-maintenance-process.utf8.test.tssrc/main/preflight/codex-maintenance-runner.diagnostics.test.tssrc/main/preflight/codex-maintenance-runner.termination.test.tssrc/main/preflight/codex-maintenance-runner.test.tssrc/main/preflight/codex-maintenance-runner.tssrc/main/preflight/codex-maintenance-windows-supervisor.test.tssrc/main/preflight/codex-maintenance-windows-supervisor.tssrc/main/preflight/codex-npm-installation-files.tssrc/main/preflight/codex-npm-installation-layout.test.tssrc/main/preflight/codex-npm-installation-layout.tssrc/main/preflight/codex-workspace-relative-path.test.tssrc/main/runtime/orca-runtime-get-worktree-ps.tssrc/main/runtime/rpc/methods/preflight.tssrc/main/runtime/rpc/preflight-codex-maintenance-permission.test.tssrc/main/runtime/runtime-rpc/runtime-rpc-mobile-method-allowlist.tssrc/main/runtime/scripted-codex-transport.test-fixture.tssrc/main/runtime/structured-agent-launch-args-wiring.test.tssrc/main/runtime/structured-agent-runtime-registrations.tssrc/main/runtime/structured-agent-session-codex-interrupt-order.test.tssrc/main/runtime/structured-agent-session-codex-opening-send-hold.test.tssrc/main/runtime/structured-agent-session-codex-settlement-order.test.tssrc/main/runtime/structured-agent-session-codex-stopped-send-order.test.tssrc/main/runtime/structured-agent-session-codex-turn-end-settlement.test.tssrc/main/runtime/structured-agent-session-integration.test.tssrc/main/runtime/structured-agent-session-runtime-exit.test.tssrc/main/runtime/structured-agent-session-runtime.tssrc/main/runtime/structured-chat-coordinator-mail-rig.test-fixture.tssrc/main/runtime/structured-child-records-switch.test.tssrc/main/runtime/structured-codex-child-work-runtime.test.tssrc/main/runtime/structured-codex-session-rpc-test-harness.tssrc/main/runtime/structured-foreground-command-strip.test.tssrc/main/runtime/structured-session-child-identity-env.tssrc/preload/api/preflight-api.tssrc/preload/api/preflight-bridge.tssrc/relay/codex-maintenance-relay.test.tssrc/relay/preflight-codex-version.test.tssrc/relay/preflight-command-version.tssrc/relay/preflight-handler.tssrc/renderer/src/App.tsxsrc/renderer/src/components/NewWorkspaceComposerCard.codex-maintenance.test.tsxsrc/renderer/src/components/NewWorkspaceComposerCard.tsxsrc/renderer/src/components/NewWorkspaceComposerModal.tsxsrc/renderer/src/components/native-chat/CodexMaintenanceLogDialog.tsxsrc/renderer/src/components/native-chat/NativeChatComposerNotices.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.codex-maintenance.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.codex-recovery.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.start-failure-notice.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSessionControls.tsxsrc/renderer/src/components/native-chat/agent-session-failure-words-text.tssrc/renderer/src/components/native-chat/codex-maintenance-copy.tssrc/renderer/src/components/native-chat/codex-maintenance-failure-copy.test.tsxsrc/renderer/src/components/native-chat/codex-maintenance-recovery-notice.tssrc/renderer/src/components/native-chat/codex-maintenance-ui.test.tsxsrc/renderer/src/components/native-chat/native-chat-composer-notice.tssrc/renderer/src/components/native-chat/native-chat-notice-row.test-fixture.tsxsrc/renderer/src/components/native-chat/native-chat-structured-session-notices.tssrc/renderer/src/components/native-chat/use-native-chat-availability-notice.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-availability-notice.tssrc/renderer/src/components/native-chat/use-native-chat-codex-maintenance.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-codex-maintenance.tssrc/renderer/src/components/native-chat/use-structured-agent-session-start-failure-facts.test.tssrc/renderer/src/components/native-chat/use-structured-agent-session-start-failure-facts.tssrc/renderer/src/components/new-workspace/NewWorkspaceComposerFooter.tsxsrc/renderer/src/components/new-workspace/use-new-workspace-codex-maintenance.tssrc/renderer/src/components/settings/AgentCatalogRow.tsxsrc/renderer/src/components/settings/AgentsPane.tsxsrc/renderer/src/components/settings/CodexMaintenanceRow.tsxsrc/renderer/src/hooks/useCodexMaintenance.evidence.test.tsxsrc/renderer/src/hooks/useCodexMaintenance.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/codex-maintenance-activity.tssrc/renderer/src/lib/codex-maintenance-client.test.tssrc/renderer/src/lib/codex-maintenance-client.tssrc/renderer/src/lib/codex-maintenance-host-contact.test.tssrc/renderer/src/lib/codex-maintenance-host-contact.tssrc/renderer/src/lib/codex-maintenance-observation.tssrc/renderer/src/lib/codex-maintenance-snapshot.tssrc/renderer/src/lib/codex-maintenance-store.test.tssrc/renderer/src/lib/codex-maintenance-store.tssrc/renderer/src/web/preload-api/web-host-capability-api.tssrc/shared/agent-session-failure-copy.tssrc/shared/agent-session-failure-words.tssrc/shared/agent-session-refusal-details.tssrc/shared/agent-session-refusal-notice.tssrc/shared/agent-session-visible-failures.tssrc/shared/agent-session-write-failure.tssrc/shared/browser-client-host-capabilities.tssrc/shared/child-process/process-tree-termination.test.tssrc/shared/child-process/process-tree-termination.tssrc/shared/codex-cli-installation.test.tssrc/shared/codex-cli-installation.tssrc/shared/codex-cli-maintenance.test.tssrc/shared/codex-cli-maintenance.tssrc/shared/codex-installation-failure-words.tssrc/shared/codex-maintenance-recovery.tssrc/shared/protocol-version.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
| export function codexInstallationProblemOf( | ||
| error: unknown, | ||
| depth = 0 | ||
| ): CodexInstallationProblem | undefined { | ||
| if (depth >= 6 || !(error instanceof Error)) { | ||
| return undefined | ||
| } | ||
| if (error instanceof CodexCliInstallationError) { | ||
| return error.codexInstallation | ||
| } | ||
| return codexInstallationProblemOf(error.cause, depth + 1) | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Traverse AggregateError in codexInstallationProblemOf, as argumentProblemOf does.
argumentProblemOf in src/main/native-chat/structured-agent-arguments-error.ts:25-44 checks each entry of AggregateError.errors. codexInstallationProblemOf checks only error.cause. The acquisition path uses both helpers in failedAcquisitionDetails, failedAcquisitionRefusal, and providerStartupFailureFact. If any layer wraps a CodexCliInstallationError in an AggregateError, the codexInstallation fact is lost. The chat then shows the generic "couldn't start" text, and the renderer has no fact to offer Update Codex. Use the same traversal in both helpers.
🐛 Proposed fix
if (error instanceof CodexCliInstallationError) {
return error.codexInstallation
}
+ if (error instanceof AggregateError) {
+ for (const inner of error.errors) {
+ const problem = codexInstallationProblemOf(inner, depth + 1)
+ if (problem) {
+ return problem
+ }
+ }
+ }
return codexInstallationProblemOf(error.cause, depth + 1)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export function codexInstallationProblemOf( | |
| error: unknown, | |
| depth = 0 | |
| ): CodexInstallationProblem | undefined { | |
| if (depth >= 6 || !(error instanceof Error)) { | |
| return undefined | |
| } | |
| if (error instanceof CodexCliInstallationError) { | |
| return error.codexInstallation | |
| } | |
| return codexInstallationProblemOf(error.cause, depth + 1) | |
| } | |
| export function codexInstallationProblemOf( | |
| error: unknown, | |
| depth = 0 | |
| ): CodexInstallationProblem | undefined { | |
| if (depth >= 6 || !(error instanceof Error)) { | |
| return undefined | |
| } | |
| if (error instanceof CodexCliInstallationError) { | |
| return error.codexInstallation | |
| } | |
| if (error instanceof AggregateError) { | |
| for (const inner of error.errors) { | |
| const problem = codexInstallationProblemOf(inner, depth + 1) | |
| if (problem) { | |
| return problem | |
| } | |
| } | |
| } | |
| return codexInstallationProblemOf(error.cause, depth + 1) | |
| } |
| return { | ||
| command, | ||
| environment: structuredSessionCliEnvironment( | ||
| withCliRuntimeOnPath(command, { ...process.env, ...environment }) | ||
| ) | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
# Check how the persistent child environment is built from launch.env
ast-grep outline src/main/codex --match 'buildCodexStructuredChildEnvironment' --view expanded
rg -nP -C8 'export function buildCodexStructuredChildEnvironment' src/main/codex
rg -nP -C4 'process\.env' src/main/codex/codex-structured-child-environment.ts
# Check whether any test asserts that a policy-excluded variable stays out of the child
rg -nP -C3 'nativeChatInheritShellEnvironment|shellEnvironmentPolicy' src/main/runtime/structured-agent-session-integration.test.ts | head -60Repository: stablyai/orca
Length of output: 3565
🏁 Script executed:
set -e
printf '%s\n' '--- child environment ---'
nl -ba src/main/codex/codex-structured-child-environment.ts | sed -n '1,120p'
printf '%s\n' '--- resolver and launch consumer references ---'
rg -n -F --glob '*.ts' -- 'buildCodexStructuredChildEnvironment' src/main
rg -n -F --glob '*.ts' -- 'launch.env' src/main/codex src/main/runtime
printf '%s\n' '--- resolver ---'
nl -ba src/main/codex/codex-structured-launch-resolution.ts | sed -n '1,170p'
printf '%s\n' '--- policy test ---'
nl -ba src/main/runtime/structured-agent-session-integration.test.ts | sed -n '720,775p'Repository: stablyai/orca
Length of output: 16676
🏁 Script executed:
set -e
printf '%s\n' '--- changed resolver diff ---'
git diff 820277c20778e45e3b314f128464686dea701377 4436b0a1a5a9e08fec3b8e60fc906aec30f77557 -- src/main/codex/codex-structured-launch-resolution.ts src/main/codex/codex-structured-child-environment.ts
printf '%s\n' '--- resolveEnvironment wiring ---'
rg -n -F --glob '*.ts' -- 'resolveEnvironment:' src/main/codex src/main/runtime
rg -n -F --glob '*.ts' -- 'nativeChatShellEnvironmentPolicy' src/main
printf '%s\n' '--- policy resolver definitions ---'
rg -n -P -C10 'function .*ShellEnvironment|resolveShellEnvironmentPolicy|inheritAll' src/main/runtime src/main/native-chat src/main | head -240Repository: stablyai/orca
Length of output: 34757
Keep the persistent Codex environment policy-filtered.
resolveCodexStructuredInvocation adds process.env to the environment returned by resolveEnvironment. The launch resolver stores that object in launch.env, and buildCodexStructuredChildEnvironment copies launch.env into the persistent Codex child. This can pass process variables that nativeChatShellEnvironmentPolicy excludes.
Keep launch.env based on the policy-filtered environment. Add process.env only to the version-probe and maintenance environments that require it.
…nimum-version # Conflicts: # src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx # src/renderer/src/components/native-chat/use-native-chat-availability-notice.test.tsx # src/renderer/src/components/native-chat/use-native-chat-availability-notice.ts
|
CI status on
|
… a missing Codex
A too-old Codex now gets only the plain message ("Codex X is too old for
chats. Update to 0.136.0 or newer.") with no button and no job. The
existing rechecks (window focus, the <=30 s expiry of a saved result)
retry the refused chat once the user has updated Codex themselves.
A missing Codex keeps the Install Codex button: `npm install -g
@openai/codex` with the npm on the chat's PATH, as a host-run job with
its log, then a recheck and recovery. A configured Command that is
missing gets the message only, since a global npm install would not
land at that path.
Removed: the `codex update` command and its 0.126 floor, manual
instructions, npm layout and launcher identity detection, the action
descriptor (install|update) and its titles, the legacy capability, and
the SSH relay maintenance path (structured chat never runs over SSH or
WSL), so the relay preflight handler is back to main's.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
18ed304c-92be-42e1-b439-1380c26ebfcf
⛔ Files ignored due to path filters (1)
src/shared/rpc-contract/rpc-params-catalog.generated.tsis excluded by!**/*.generated.*
📒 Files selected for processing (50)
src/main/cli/orca-cli-child-path.test.tssrc/main/cli/orca-cli-child-path.tssrc/main/preflight/codex-cli-installation.tssrc/main/preflight/codex-maintenance-command.test.tssrc/main/preflight/codex-maintenance-command.tssrc/main/preflight/codex-maintenance-configured-command.test.tssrc/main/preflight/codex-maintenance-environment.test.tssrc/main/preflight/codex-maintenance-host.test.tssrc/main/preflight/codex-maintenance-host.tssrc/main/preflight/codex-maintenance-runner.diagnostics.test.tssrc/main/preflight/codex-maintenance-runner.termination.test.tssrc/main/preflight/codex-maintenance-runner.test.tssrc/main/preflight/codex-maintenance-runner.tssrc/main/preflight/codex-workspace-relative-path.test.tssrc/main/runtime/rpc/preflight-codex-maintenance-permission.test.tssrc/renderer/src/components/NewWorkspaceComposerCard.codex-maintenance.test.tsxsrc/renderer/src/components/native-chat/CodexMaintenanceLogDialog.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.codex-maintenance.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.codex-recovery.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.start-failure-notice.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSessionControls.tsxsrc/renderer/src/components/native-chat/codex-maintenance-copy.tssrc/renderer/src/components/native-chat/codex-maintenance-failure-copy.test.tsxsrc/renderer/src/components/native-chat/codex-maintenance-ui.test.tsxsrc/renderer/src/components/native-chat/native-chat-composer-notice.tssrc/renderer/src/components/native-chat/native-chat-structured-session-notices.tssrc/renderer/src/components/native-chat/use-native-chat-availability-notice.test.tsxsrc/renderer/src/components/native-chat/use-native-chat-availability-notice.tssrc/renderer/src/components/new-workspace/use-new-workspace-codex-maintenance.tssrc/renderer/src/components/settings/CodexMaintenanceRow.tsxsrc/renderer/src/hooks/useCodexMaintenance.evidence.test.tsxsrc/renderer/src/hooks/useCodexMaintenance.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/codex-maintenance-client.test.tssrc/renderer/src/lib/codex-maintenance-client.tssrc/renderer/src/lib/codex-maintenance-host-contact.test.tssrc/renderer/src/lib/codex-maintenance-host-contact.tssrc/renderer/src/lib/codex-maintenance-store.test.tssrc/renderer/src/lib/codex-maintenance-store.tssrc/renderer/src/web/preload-api/web-host-capability-api.tssrc/shared/codex-cli-maintenance.test.tssrc/shared/codex-cli-maintenance.tssrc/shared/protocol-version.ts
🚧 Files skipped from review as they are similar to previous changes (6)
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/zh.json
- src/renderer/src/i18n/locales/fr.json
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/i18n/locales/ko.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
| return codexMaintenanceNotice | ||
| ? { ...codexMaintenanceNotice, key: 'launch' } | ||
| : { | ||
| key: 'launch', | ||
| kind: 'error', | ||
| text: codexMaintenanceReason(facts) | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Keep a Retry action on the fallback Codex installation notice.
The fallback branch runs when codexMaintenanceNotice is null. It returns a notice with text only and no action. useNativeChatCodexMaintenance supplies a notice only in two cases: a current check reports missing/unsupported, or a current check reports ready. In every other state the user has no Retry control, and the chat stays failed:
- The recheck reports
unknown, for example when the updated build prints an unparseable version. Launch admission does not block an unknown version, so a Retry would succeed. - The status read fails, for example on host contact loss or when a configured Command cannot be resolved.
- The evidence is legacy or has expired.
The auto-retry in useNativeChatCodexMaintenance fires only on ready. The test "does not automatically retry an unrelated start failure or an unknown check" confirms that an unknown check does not recover the chat. Add the existing Retry action to the fallback branch.
🐛 Proposed fix
--- "a/src/renderer/src/components/native-chat/native-chat-structured-session-notices.ts"
+++ "b/src/renderer/src/components/native-chat/native-chat-structured-session-notices.ts"
@@ -39,13 +39,17 @@
version: installation.installedVersion,
minimumVersion: installation.minimumVersion
}
return codexMaintenanceNotice
? { ...codexMaintenanceNotice, key: 'launch' }
: {
key: 'launch',
kind: 'error',
- text: codexMaintenanceReason(facts)
+ text: codexMaintenanceReason(facts),
+ action: {
+ label: translate('auto.components.native.chat.NativeChatLaunchRetry.retry', 'Retry'),
+ onClick: onRetry
+ }
}
}
const message =
lifecycle === 'failed'If you apply this fix, update the assertion in codex-maintenance-failure-copy.test.tsx ("states a too-old Codex in the start-failure notice without a button"). That test expects no button on this fallback.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| return codexMaintenanceNotice | |
| ? { ...codexMaintenanceNotice, key: 'launch' } | |
| : { | |
| key: 'launch', | |
| kind: 'error', | |
| text: codexMaintenanceReason(facts) | |
| } | |
| return codexMaintenanceNotice | |
| ? { ...codexMaintenanceNotice, key: 'launch' } | |
| : { | |
| key: 'launch', | |
| kind: 'error', | |
| text: codexMaintenanceReason(facts), | |
| action: { | |
| label: translate('auto.components.native.chat.NativeChatLaunchRetry.retry', 'Retry'), | |
| onClick: onRetry | |
| } | |
| } |
When Codex isn't installed, main already hides Codex from the New tab menu, so the in-chat Install button was almost never reachable. Settings → Agents already shows "Codex isn't installed." with Install Codex. - Chats and the new-workspace composer now only state "Codex isn't installed." (no button, no install job from the chat). - The Install action, its busy spinner and the host-busy subscription move into the Settings Codex row, the only place that starts the job. - The store no longer re-checks every other workspace context when a job finishes. A refused chat recovers through the same re-check a too-old Codex uses (window focus, or the <=30 s expiry of a saved result). - The chat recovery key no longer includes the install job id. - Tests: Settings drives the install; a new test proves a chat refused for a missing Codex recovers through focus after a Settings install, not through the job; the expiry recovery test covers missing and too old.
…nimum-version # Conflicts: # src/packages/process-host/src/process-tree-termination.test.ts # src/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsx # src/renderer/src/components/native-chat/NativeChatNoticeRow.tsx # src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx # src/renderer/src/components/native-chat/native-chat-structured-session-notices.ts # src/renderer/src/i18n/en-runtime-required.json # src/renderer/src/i18n/locales/en.json # src/shared/rpc-contract/rpc-params-catalog.generated.ts
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
df05c2bd-e33a-46ef-b96e-9207ca61cc67
⛔ Files ignored due to path filters (1)
src/shared/rpc-contract/rpc-params-catalog.generated.tsis excluded by!**/*.generated.*
📒 Files selected for processing (62)
src/main/agent-cli-version-probe.tssrc/main/codex/codex-model-catalog-probe.test.tssrc/main/ipc/preflight.tssrc/main/native-chat/agent-session-wire/structured-agent-session-codex-version-recovery.test.tssrc/main/native-chat/agent-session-wire/structured-agent-session-failure-text.tssrc/main/preflight/codex-cli-installation.test.tssrc/main/preflight/codex-cli-installation.tssrc/main/preflight/codex-maintenance-command.tssrc/main/preflight/codex-maintenance-configured-command.test.tssrc/main/preflight/codex-maintenance-process.test.tssrc/main/preflight/codex-maintenance-process.tssrc/main/preflight/codex-maintenance-process.utf8.test.tssrc/main/preflight/codex-maintenance-runner.diagnostics.test.tssrc/main/preflight/codex-maintenance-runner.test.tssrc/main/preflight/codex-maintenance-runner.tssrc/main/preflight/codex-maintenance-windows-supervisor.test.tssrc/main/preflight/codex-maintenance-windows-supervisor.tssrc/main/preflight/codex-workspace-relative-path.test.tssrc/main/runtime/orca-runtime-get-worktree-ps.tssrc/main/runtime/rpc/methods/preflight.tssrc/main/runtime/structured-agent-launch-args-wiring.test.tssrc/main/runtime/structured-agent-runtime-registrations.tssrc/main/runtime/structured-agent-session-codex-interrupt-order.test.tssrc/main/runtime/structured-agent-session-codex-settlement-order.test.tssrc/main/runtime/structured-agent-session-codex-stopped-send-order.test.tssrc/main/runtime/structured-agent-session-codex-turn-end-settlement.test.tssrc/main/runtime/structured-agent-session-runtime-exit.test.tssrc/main/runtime/structured-agent-session-runtime.tssrc/main/runtime/structured-chat-coordinator-mail-rig.test-fixture.tssrc/main/runtime/structured-child-records-switch.test.tssrc/main/runtime/structured-codex-child-work-runtime.test.tssrc/main/runtime/structured-codex-session-rpc-test-harness.tssrc/main/runtime/structured-foreground-command-strip.test.tssrc/packages/process-host/package.jsonsrc/packages/process-host/src/process-tree-termination.test.tssrc/packages/process-host/src/process-tree-termination.tssrc/renderer/src/components/NewWorkspaceComposerCard.codex-maintenance.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.codex-maintenance.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.test.tsxsrc/renderer/src/components/native-chat/NativeChatNoticeRow.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.codex-recovery.test.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/agent-session-availability-words-text.tssrc/renderer/src/components/native-chat/codex-maintenance-failure-copy.test.tsxsrc/renderer/src/components/native-chat/codex-maintenance-ui.test.tsxsrc/renderer/src/components/native-chat/native-chat-notice-row.test-fixture.tsxsrc/renderer/src/components/native-chat/native-chat-structured-session-notices.tssrc/renderer/src/components/native-chat/use-native-chat-codex-maintenance.tssrc/renderer/src/components/new-workspace/NewWorkspaceComposerFooter.tsxsrc/renderer/src/components/settings/CodexMaintenanceRow.tsxsrc/renderer/src/hooks/useCodexMaintenance.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/codex-maintenance-store.tssrc/shared/agent-session-failure-copy.tssrc/shared/agent-session-refusal-details.tssrc/shared/protocol-version.ts
🚧 Files skipped from review as they are similar to previous changes (7)
- src/renderer/src/i18n/en-runtime-required.json
- src/renderer/src/i18n/locales/ko.json
- src/renderer/src/i18n/locales/fr.json
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/zh.json
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/i18n/locales/es.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
| // The supervisor uses exit 1 when it cannot prove its descendants exited. | ||
| if ((launch.supervised && exitCode === 1) || platform === 'win32') { | ||
| termination = 'unverifiable' | ||
| error ??= 'Codex maintenance process termination is unverifiable.' | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
rg -nP -C6 'exit\(1\)|process\.exitCode\s*=\s*1|exitCode === 1' --type=ts src/main/provider-process
ast-grep outline src/main/provider-process --items all --match 'supervisedPosixLaunch'Repository: stablyai/orca
Length of output: 4648
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- supervisor ---'
nl -ba src/main/provider-process/provider-process-supervisor.ts | sed -n '1,190p'
printf '%s\n' '--- maintenance process ---'
nl -ba src/main/preflight/codex-maintenance-process.ts | sed -n '1,240p'
printf '%s\n' '--- relevant references ---'
rg -n -F --glob '*.ts' -- 'finishWithProviderOutcome' src/main
rg -n -F --glob '*.ts' -- 'preserves an ambiguous supervisor failure as unverifiable' .
rg -n -F -- 'termination' src/main/preflight src/main/provider-process | head -120Repository: stablyai/orca
Length of output: 21000
Distinguish provider exit code 1 from supervisor failure.
The POSIX supervisor calls process.exit(code ?? 1) after the provider exits, so a provider exit code of 1 reaches processExit unchanged. The supervisor also uses process.exit(1) for its own failure paths. executeCodexMaintenanceProcess therefore cannot distinguish an ordinary provider failure from unverifiable termination and reports the generic termination message instead of the provider failure.
Use an out-of-band supervisor outcome marker, or another value that the provider cannot produce, before mapping termination to unverifiable.
|
Simplified and split (head aff57f9).
|
…e extra wait cap CI on the merge with main failed main's new codex-workspace-relative-path test (#26684), which mocks the login-shell module with only resolveLoginShellEnvironment: the wrapper called captureLoginShellEnvironment and imported the spawn-timeout constant. The wrapper only needs the env, so it reads through resolveLoginShellEnvironment again, as on main. The miss wait no longer races its own 5 s timer: the shell run it waits for is already killed at the spawn timeout, so the second cap was a guard over the same bound. The constant goes back to private, as on main.
…27875) * fix(browser): annotation card and outline follow the selected element The grab overlay keeps re-measuring the picked element after the click (scroll in any box, resize, element size changes), and the isolated viewport bridge reports that live box so the pending card follows it, including page zoom. The card's side pick uses its measured height. * fix(browser): bind annotation card to selected element * fix(browser): keep document annotation card on selection * fix(ci): point the main sync-spawn ratchet at the shared ratchet library (#28054) #27756's script imported baseline helpers from check-focus-read-ratchet.mjs after #27788 had moved them into ratchet-baseline.mjs, so it crashed on start and failed every PR that merges main. Use the library's helpers, and record the two daemon-process launches from #27769 that the broken check never saw. Co-authored-by: Orca Worker <orca-worker@localhost> * fix(browser): follow selected element outer-box size * refactor(chat): give the start-refusal resumable table its own module (#28085) #27946 and #26684 together put agent-session-failure-words.ts at 304 lines, over max-lines, which fails lint and the pre-commit hook on every merge of main. The refusal-code table is standalone with one reader, so it moves out. Co-authored-by: Orca Worker <orca-worker@localhost> --------- Co-authored-by: OrcaWin <alpha-eng@stably.ai> Co-authored-by: Orca Worker <orca-worker@localhost>
Main's #26684 runs Codex through a workspace-relative PATH entry (`bin`, `node_modules/.bin`). The lookup searches such an entry against Orca's own directory and returns the bare name; the spawn then finds the program in the chat's directory. Counting that bare name as missing made every such launch wait for a login-shell reread. The retry now fires only when the lookup truly found nothing: a bare name back from a PATH whose entries are all absolute. Each agent's one lookup tells it which PATH it searched.
…#26464) * fix: refresh host environments before structured agent command resolution * fix: ship the owning server CLI for managed remote agents * test: include the shipped CLI in remote install fixtures * Bind packaged agent CLI calls to their execution host * Keep owning-server CLI binding scoped to managed agents * Serve the last shell environment to chat starts and refresh it in the background Only the first chat start waits for the login shell; later starts get the last snapshot and refresh it in the background once it is 10 s old. On Windows hosts without the registry addon (managed server slots), the saved PATH is reread with reg.exe. The Windows server CLI launcher stager now checks the target architecture, and the CLI help says ambient selectors are ignored inside a managed server. * Keep the last good shell environment when a refresh fails, and load the Windows profile once A login-shell capture now says whether the shell produced the env or Orca fell back to its own, and only a real capture replaces the snapshot. Windows loads the PowerShell profile once per process and refreshes only the saved PATH. The reg.exe fallback queries the whole key so a missing user Path no longer drops the saved PATH. The first capture starts when the resolvers are created. * Keep the last good login-shell env for other readers while a forced refresh runs * Mark the Claude launch resolver as a reviewed router-aware module It only types the chat command resolver it injects; main's launch-routing guard (#26801) matched the name. * Keep a settled login-shell env for readers during a refresh and share the first run - Any settled cached entry, a fallback included, now serves other readers while a forced capture runs; only a real capture replaces it. - Native chat's first capture shares a run a startup reader already began, so the login shell runs once per process at startup on macOS/Linux. - Type the injected Claude resolver without naming resolveClaudeCommand. - Cover the runtime's Claude command options, the owning-host --host check, and the PTY flag drop. * Drop an inherited owning-host flag from daemon terminal panes The persistent terminal daemon merges its own environment into every pane, so an inherited ORCA_CLI_OWNING_HOST reached desktop panes even though main strips it from the spawn env. Drop it with the other per-launch CLI variables. * Route agents to their own server through ordinary launch defaults; start the first chat after an install The native-chat agent environment now sets the owning server's ORCA_USER_DATA_PATH and empty ORCA_ENVIRONMENT / ORCA_PAIRING_CODE / ORCA_REMOTE_PAIRING, which the CLI already reads as unset; empty rather than deleted, because the spawn merges the launch overlay over the server's own env. The ORCA_CLI_OWNING_HOST flag, the CLI's skip of ambient selectors, the launchers' export of it, the terminal clean-up, the help-text exception and the WSL launcher guard are gone, so a person's terminal follows their own settings as on main. A launch that finds no program in the shell snapshot waits for one shared refresh (at most one shell timeout) and resolves again; create support rereads the shell once before refusing. On Windows a failed PowerShell profile load is retried on the next refresh instead of being kept until restart. * One shared shell reread when an agent's program is missing The pre-create check for OpenCode, OMP and Pi forced its own login-shell capture on every refusal: not shared with launches, one per concurrent check, triggered by an installed-but-too-old version too, and an older capture finishing last could overwrite a newer cached environment. On Windows, every launch miss also reran a failed PowerShell profile load, bypassing the 10-second limit. - One saved shell environment per host: chat launches, their misses, the pre-create check and AI commit messages read it and share one refresh. - The pre-create check resolves the agent's program the way a launch does, so only a missing program waits for the refresh; registrations declare how to resolve their launch and check its version. - A forced login-shell capture joins one already running for the same shell, so captures cannot land out of order. - On Windows, a miss within 10 s of a failed PowerShell load rereads only the saved PATH. * One owner for the cached shell environment Review found two more races in the reread-on-miss machinery, both from the host wrapper keeping its own snapshot beside the login-shell cache: - A launch that found no program could join a reread that started before the agent was installed, and spend its one retry on the old PATH. - On Windows, saved-PATH rereads renewed the snapshot's age, so a failed PowerShell profile was never retried while launches kept missing. The login-shell cache is now the only owner of the captured environment, the run in progress and which result wins (the newest run started; a fallback never replaces a captured env). It takes three options instead of `force`: - startedAfter: a lookup that found nothing waits for a run that started no earlier than the lookup did, joining one if it has, else starting one. - refreshAfterMs: serve the last result and rerun in the background once the last attempt is older. - keepCaptured: a captured env is kept for good; only a fallback is rerun (Windows' PowerShell profile). The host wrapper keeps only policy: the 10 s interval, on Windows the saved PATH laid over the profile env on every read (a miss forces a fresh registry read), and the settings overlays. Its snapshot, pending promise, staleness and Windows "loaded" bookkeeping are gone. A lookup's start time travels with the miss (resolveAgainAfterRefreshOnMissingProgram passes it). * Read an injected shell environment once per runtime, as main does The previous commit read an injected environment on every acquisition, which broke main's 'caches shell exports but re-reads configured overrides for a resume' contract. It is read once when the resolvers are made again. * Model lists reread the environment on a missing program, as launches do Live QA: the first new chat after installing Claude showed "Claude wasn't found on the computer running this chat". The chat launch itself reread the login shell and started the new binary, but Claude's model-list check ran first, with the environment read before the install, and never retried: catalog probes were deliberately built without the miss refresh. The retry now lives in each agent's one shared lookup of its binary and environment, which a launch and a model listing both call: resolveCodexStructuredInvocation, resolveAcpLaunchInvocation, a new shared resolvePiRpcInvocation, and resolveClaudeChildEnvSources (which already had it). Each catalog probe is given the runtime's refreshAfterMissingProgram, and the catalog context no longer strips it, so a listing and a launch reread the same single-owner environment the same way. * Pass optional launch lookups through directly instead of conditional spreads * Read the host shell env through resolveLoginShellEnvironment; drop the extra wait cap CI on the merge with main failed main's new codex-workspace-relative-path test (#26684), which mocks the login-shell module with only resolveLoginShellEnvironment: the wrapper called captureLoginShellEnvironment and imported the spawn-timeout constant. The wrapper only needs the env, so it reads through resolveLoginShellEnvironment again, as on main. The miss wait no longer races its own 5 s timer: the shell run it waits for is already killed at the spawn timeout, so the second cap was a guard over the same bound. The constant goes back to private, as on main. * Test that a hung login shell holds a launch miss for at most one shell timeout The bound lives in the one owner: the shell run is killed at the spawn timeout (5 s) and settles to a fallback, which never replaces a captured snapshot. A mutation raising that timeout fails this test. * A program found through a relative PATH entry is not missing Main's #26684 runs Codex through a workspace-relative PATH entry (`bin`, `node_modules/.bin`). The lookup searches such an entry against Orca's own directory and returns the bare name; the spawn then finds the program in the chat's directory. Counting that bare name as missing made every such launch wait for a login-shell reread. The retry now fires only when the lookup truly found nothing: a bare name back from a PATH whose entries are all absolute. Each agent's one lookup tells it which PATH it searched. * Count a relative PATH entry as found only when it holds the program; Windows miss waits for a saved PATH read started after it looked A bare name with a relative PATH entry is checked from the launch's working directory, so an agent in neither entry still gets its one reread. On Windows the miss no longer joins a registry read that began before the lookup.
* Require Codex 0.136.0 for native chats
* Add host-owned Codex install and update actions
* Bind Codex checks and maintenance to the selected installation
* Resolve Windows updater cleanup through system helpers
* Use one child environment for Codex checks and launch
* Expire Codex readiness and reconcile current host jobs
* Resolve Codex checks against the child command search path
* Restrict global npm repair to the selected Codex install layout
* Pin the host updater directory through Windows supervision
* Synchronize Codex maintenance fixtures on readiness
* Unify Codex notices and recover version-refused chats
* Route Codex recovery to the operation that remains
* Preserve Codex setup execution errors in the job log
* Preserve UTF-8 in Codex setup logs
* Remove unused Codex host installation detector
* Require host administration for Codex maintenance
* Show a missing Codex explanation once
* test(native-chat): give scripted Codex runtimes their installation fact; keep the registry out of the relay
Runtime tests that drive a scripted Codex app-server still ran the new
version check against whatever codex was on the machine's PATH: refused
on CI (no codex), and on a dev machine it ran the real codex --version.
A scripted transport now must state the Codex it stands for
(readCodexInstallation), asserted at install, and the tests get it from
one scriptedCodexTransport fixture.
The relay's Codex maintenance path reached @orca/windows-registry through
resolvePathEnvKey's re-export in windows-environment-path; import it from
its registry-free module instead.
Also update the catalog-probe test for the shared child environment.
* refactor(native-chat): drop the Update Codex action; keep Install for a missing Codex
A too-old Codex now gets only the plain message ("Codex X is too old for
chats. Update to 0.136.0 or newer.") with no button and no job. The
existing rechecks (window focus, the <=30 s expiry of a saved result)
retry the refused chat once the user has updated Codex themselves.
A missing Codex keeps the Install Codex button: `npm install -g
@openai/codex` with the npm on the chat's PATH, as a host-run job with
its log, then a recheck and recovery. A configured Command that is
missing gets the message only, since a global npm install would not
land at that path.
Removed: the `codex update` command and its 0.126 floor, manual
instructions, npm layout and launcher identity detection, the action
descriptor (install|update) and its titles, the legacy capability, and
the SSH relay maintenance path (structured chat never runs over SSH or
WSL), so the relay preflight handler is back to main's.
* refactor(native-chat): keep Install Codex in Settings only
When Codex isn't installed, main already hides Codex from the New tab menu,
so the in-chat Install button was almost never reachable. Settings → Agents
already shows "Codex isn't installed." with Install Codex.
- Chats and the new-workspace composer now only state "Codex isn't
installed." (no button, no install job from the chat).
- The Install action, its busy spinner and the host-busy subscription move
into the Settings Codex row, the only place that starts the job.
- The store no longer re-checks every other workspace context when a job
finishes. A refused chat recovers through the same re-check a too-old
Codex uses (window focus, or the <=30 s expiry of a saved result).
- The chat recovery key no longer includes the install job id.
- Tests: Settings drives the install; a new test proves a chat refused for
a missing Codex recovers through focus after a Settings install, not
through the job; the expiry recovery test covers missing and too old.
* refactor(codex): check chat compatibility when acquiring the child
* Restore workspace submit guard and simplify Codex maintenance
* Keep only the Codex chat minimum version
(cherry picked from commit c0e2b73)
* Require Codex 0.136.0 for native chats
* Add host-owned Codex install and update actions
* Bind Codex checks and maintenance to the selected installation
* Resolve Windows updater cleanup through system helpers
* Use one child environment for Codex checks and launch
* Expire Codex readiness and reconcile current host jobs
* Resolve Codex checks against the child command search path
* Restrict global npm repair to the selected Codex install layout
* Pin the host updater directory through Windows supervision
* Synchronize Codex maintenance fixtures on readiness
* Unify Codex notices and recover version-refused chats
* Route Codex recovery to the operation that remains
* Preserve Codex setup execution errors in the job log
* Preserve UTF-8 in Codex setup logs
* Remove unused Codex host installation detector
* Require host administration for Codex maintenance
* Show a missing Codex explanation once
* test(native-chat): give scripted Codex runtimes their installation fact; keep the registry out of the relay
Runtime tests that drive a scripted Codex app-server still ran the new
version check against whatever codex was on the machine's PATH: refused
on CI (no codex), and on a dev machine it ran the real codex --version.
A scripted transport now must state the Codex it stands for
(readCodexInstallation), asserted at install, and the tests get it from
one scriptedCodexTransport fixture.
The relay's Codex maintenance path reached @orca/windows-registry through
resolvePathEnvKey's re-export in windows-environment-path; import it from
its registry-free module instead.
Also update the catalog-probe test for the shared child environment.
* refactor(native-chat): drop the Update Codex action; keep Install for a missing Codex
A too-old Codex now gets only the plain message ("Codex X is too old for
chats. Update to 0.136.0 or newer.") with no button and no job. The
existing rechecks (window focus, the <=30 s expiry of a saved result)
retry the refused chat once the user has updated Codex themselves.
A missing Codex keeps the Install Codex button: `npm install -g
@openai/codex` with the npm on the chat's PATH, as a host-run job with
its log, then a recheck and recovery. A configured Command that is
missing gets the message only, since a global npm install would not
land at that path.
Removed: the `codex update` command and its 0.126 floor, manual
instructions, npm layout and launcher identity detection, the action
descriptor (install|update) and its titles, the legacy capability, and
the SSH relay maintenance path (structured chat never runs over SSH or
WSL), so the relay preflight handler is back to main's.
* refactor(native-chat): keep Install Codex in Settings only
When Codex isn't installed, main already hides Codex from the New tab menu,
so the in-chat Install button was almost never reachable. Settings → Agents
already shows "Codex isn't installed." with Install Codex.
- Chats and the new-workspace composer now only state "Codex isn't
installed." (no button, no install job from the chat).
- The Install action, its busy spinner and the host-busy subscription move
into the Settings Codex row, the only place that starts the job.
- The store no longer re-checks every other workspace context when a job
finishes. A refused chat recovers through the same re-check a too-old
Codex uses (window focus, or the <=30 s expiry of a saved result).
- The chat recovery key no longer includes the install job id.
- Tests: Settings drives the install; a new test proves a chat refused for
a missing Codex recovers through focus after a Settings install, not
through the job; the expiry recovery test covers missing and too old.
* refactor(codex): check chat compatibility when acquiring the child
* Restore workspace submit guard and simplify Codex maintenance
* Keep only the Codex chat minimum version
(cherry picked from commit c0e2b73)
Backport to 1.4.224: process-host imports point at src/shared/child-process; codex-minimum-version.test builds its fake piped child inline (the shared fake-spawned-child fixture came with @orca/process-host); dropped the NativeChatStructuredSession.approval-and-start-failure test edit (file absent on 1.4.224; the Codex wording is still covered by NativeChatNoticeRow.test).
ELI5
Orca's Codex chats run whatever Codex you have installed. Codex older than 0.136.0 doesn't understand the message id Orca sends with every chat turn, so a chat on an old Codex used to fail later with an error that didn't say why or what to do. Now, when a chat starts Codex, Orca checks its version first. If it's too old, the chat says so in one plain line and keeps your message. Update Codex, press Send again, and it works.
What Changed
Before: a native Codex chat started on any Codex version. On an old one it failed later with a confusing error, and Orca kept a special fallback (resuming chats without
excludeTurns) just for old versions.After:
excludeTurnsis removed.Mechanism:
codex app-serverfor a chat.codex --versiononce per new chat process, with a 5-second limit. Nothing is cached, so the first Send after an update is always checked fresh.Why
An earlier version of this PR also:
Live QA found that machinery was where the bugs were; for example, the "too old" notice never appeared until you pressed Send. It was also most of the code. The common pattern is simpler: check on the machine that runs the agent when the agent starts, report a refusal like any other start failure, and check again on the next attempt. This PR follows that mechanism. Install Codex in Settings → Agents was split out of this PR and is on hold.
How the floor was chosen: from Codex's tagged 0.135.0 and 0.136.0 protocol schemas.
clientUserMessageId, which Orca sends on every turn start and steer, first appears in 0.136.0. 0.136.0 also acceptsexcludeTurns, andapprovalsReviewer(which #26116's "Approve for me" needs).Differences from the common pattern:
codex --versionper new chat process (normally the first Send, or after a long idle) is cheap, and a cached refusal could block the first Send right after an update.Not changed here: Codex chat rewind uses
thread/revert, which 0.136.0 doesn't have. On a Codex without it, Orca already reports rewind as unsupported instead of failing, and this PR doesn't change that.Linked Issue
Maintainer request (no issue): require a minimum Codex version for native chats. Related: #26116 (chat permission modes) depends on this floor.
Visual Proof
Captured in a hidden Electron app with the real Codex and a real login: 0.159.0 for the working chat, and a real 0.135.0 installed into a test-only folder and set as Codex's Command in Settings → Agents for the refusal. No stand-ins.
Testing
Live, with the real Codex:
Automated:
version boundaries and odd version output;
the refusal's wording and facts;
queued messages survive a refusal and are never re-sent automatically;
a refusal is never reused (an update followed by an immediate Send succeeds);
folder-relative commands;
resume no longer retries without
excludeTurns.After the final merge with main (88a82c0):
tc:node,tc:web, 1,899 tests passed (11 skipped), changed-code quality, localization and the mobile typecheck ratchet passed;orca-ci-checks22/23 locally, the one failure being the mobile dependency-cycle warnings that also fail on main locally.Not verified: Windows, Linux, WSL and SSH execution; live mixed client/host versions.
Agent skill upstream boundary
Notes
codex --version, which runs without a shell through the shared child-process runner..cmdshims are handled by that runner.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)