Skip to content

fix(codex): restore resume compatibility and expose wire API - #415

Merged
zpzjzj merged 7 commits into
mainfrom
codex/fix-codex-cli-compat
Nov 17, 2026
Merged

zpzjzj merged 7 commits into
mainfrom
codex/fix-codex-cli-compat

Conversation

@zpzjzj

@zpzjzj zpzjzj commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Fix Codex 0.80.0 resume by placing the exec-only --output-last-message option before resume.
  • Add validated engine.kwargs.wire_api=chat|responses for custom providers, including OpenAI custom URLs. Preserve 0.80.0/chat defaults for existing Chat-only endpoints; built-in OpenAI without a custom URL is unchanged.
  • Make real CLI compatibility a required CI Gate dependency: pinned 0.169.0/responses, 0.80.0/chat, and 0.80.0/responses. Assert the exact CLI version.

Related PRs / Origin

Regression Coverage

  • A real installed Codex CLI runs two distinct turns against a deterministic local SSE provider with isolated HOME/CODEX_HOME.
  • The second outgoing request must contain, in order, the first user prompt, first assistant reply, and second user prompt. Equal session IDs alone are not accepted as proof.
  • Decode Chat messages and Responses input structurally. Negative fixtures reject fresh sessions, missing user/assistant/current-turn messages, and reordered history.
  • Each 0.80.0 CI job temporarily restores the original production resume ordering, requires the same E2E to fail on turn two with the unexpected --output-last-message parser error, restores fixed source using an EXIT trap, then requires the test to pass.
  • Also retain a real-parser negative control that verifies the invalid invocation never reaches the provider.

Live DashScope Coverage

  • Manual Model E2E has a codex suite: modern 0.169.0/responses first, plus legacy 0.80.0/chat. Real inference must recall a random first-turn token without repeating it in the second prompt.
  • Uses the existing DASHSCOPE_API_KEY secret. Inputs codex_base_url and codex_model select the endpoint/model. The summary now waits for the Codex matrix and propagates failures.
  • CONFIRMED: Linux CI with the repository credential passed real two-turn DashScope recall using Codex 0.169.0, Responses, qwen3.6-plus, and the common compatible-mode endpoint. Evidence: https://github.com/alibaba/skill-up/actions/runs/43836792781/job/133195313874 (commit 352ce9e). This establishes compatibility for that tested configuration, not every endpoint/model/plan/key.
  • The local key separately fails Responses with missing workspaceid/business-workspace binding while Chat succeeds. That credential restriction does not imply modern Codex cannot use DashScope. Preserve defaults for Chat-only configurations while prioritizing modern-version coverage.

Verification

Deterministic fixture tests validate CLI parsing, protocols, and persisted outgoing history, not real inference or full Skills/judges workflows. Live-model checks remain manual and separate from deterministic merge gates.

@CLAassistant

CLAassistant commented Nov 16, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T07:25:31.789134Z 08ca093 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@zpzjzj
zpzjzj force-pushed the codex/fix-codex-cli-compat branch from 08ca093 to 4bfc9cc Compare November 16, 2026 07:26
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/model-e2e.yml Fixed

@JHWang-1997 JHWang-1997 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reproduced on bc6da3e with the pinned Codex 0.169.0. I ran the same eval.yaml with engine.kwargs.wire_api: responses against a local Responses endpoint through skill-up run. The PR build exited 1 with wire_api = "chat" is no longer supported and made zero provider requests. Adding KwargWireAPI to codexKwargs in a temporary build made the eval pass and send one POST /v1/responses.

Comment thread internal/agent/kwargs.go Resolved
@zpzjzj
zpzjzj requested a review from JHWang-1997 November 17, 2026 03:11

@JHWang-1997 JHWang-1997 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zpzjzj
zpzjzj added this pull request to the merge queue Nov 17, 2026
Merged via the queue into main with commit f3692f8 Nov 17, 2026
21 checks passed
@zpzjzj
zpzjzj deleted the codex/fix-codex-cli-compat branch November 17, 2026 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants