fix(agents): fall back to PI when Codex harness is unavailable#82532
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a994de672
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - CLI/context engines: bootstrap and finalize non-legacy context engines for CLI turns while preserving transcript snapshots and deferred maintenance ownership. (#81869) Thanks @sahilsatralkar. | ||
| - Telegram: persist polling updates through restart replay so queued same-topic messages resume in order instead of losing context after a gateway restart. (#82256) Thanks @VACInc. | ||
| - Gateway/Gmail: abort in-flight Gmail watcher startup and hot-reload restarts before shutdown so reloads cannot spawn `gog serve` after the Gateway is closing. Thanks @frankekn. | ||
| - Agents/Codex: fall back to the embedded PI runner when OpenAI's implicit Codex harness preference cannot find a registered Codex plugin, preventing OpenAI-compatible gateway requests from failing with an unregistered harness error. Fixes #82437. |
There was a problem hiding this comment.
Remove contributor-authored changelog entry
This commit adds a CHANGELOG.md line even though the root contributor policy says changelog entries are maintainer/AI-owned during landing, so including it here violates the repo workflow and creates avoidable merge churn on a high-conflict file; please drop this entry from the contributor commit and let landing automation or maintainers add it.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: yes. source-reproducible: current main resolves official OpenAI defaults to implicit Real behavior proof Next step before merge Security Review detailsDo we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main resolves official OpenAI defaults to implicit Is this the best way to solve the issue? Mostly, but not as submitted: the implicit-only fallback preserves explicit runtime fail-closed behavior and is a narrow code fix. The changelog edit should be removed from the contributor branch and handled during landing. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 46a67d30afa3. |
8a994de to
b22f36a
Compare
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
…law#82532) * fix(agents): fall back to pi when codex harness is unavailable * fix(agents): align codex fallback auth routing
Summary
Fixes #82437
Verification
git diff --checknode scripts/run-vitest.mjs src/agents/command/attempt-execution.cli.test.ts src/agents/openai-codex-routing.test.ts src/agents/runtime-plan/build.test.ts src/agents/auth-profiles/session-override.test.ts src/agents/harness/selection.test.ts src/agents/harness/runtime-plugin.test.ts src/agents/auth-profile-runtime-contract.test.ts- 13 files, 182 tests passedpnpm check:changedvia Testboxtbx_01krr5kvqe3ww5c76fstke63bf- passed/Users/steipete/Projects/agent-scripts/skills/codex-review/scripts/codex-review- clean, no accepted/actionable findingsBehavior addressed:
/v1/chat/completionsrequests using the default OpenAI agent model no longer fail just because the implicit Codex harness preference cannot find the Codex plugin/harness.Real environment tested: local focused Vitest plus Blacksmith Testbox changed-files gate on the rebased PR branch.
Exact steps or command run after this patch:
node scripts/run-vitest.mjs src/agents/command/attempt-execution.cli.test.ts src/agents/openai-codex-routing.test.ts src/agents/runtime-plan/build.test.ts src/agents/auth-profiles/session-override.test.ts src/agents/harness/selection.test.ts src/agents/harness/runtime-plugin.test.ts src/agents/auth-profile-runtime-contract.test.ts;pnpm check:changed.Evidence after fix: selection tests cover OpenAI implicit Codex preference with no registered Codex harness and assert PI is selected/run; runtime-plugin tests cover pre-selection Codex plugin loading; attempt-execution tests cover OpenAI API-key backup auth forwarding for Codex harness runs; Testbox changed gate passed as
tbx_01krr5kvqe3ww5c76fstke63bf.Observed result after fix: implicit OpenAI Codex runtime preference falls back to PI when Codex is unavailable, while explicit plugin runtime policy still fails closed when the requested harness is unavailable.
What was not tested: full published Docker image smoke for the reporter's exact digest.