Skip to content

Support GPT-5.6 models and refresh stale brokers#471

Open
alexandrereyes wants to merge 2 commits into
openai:mainfrom
alexandrereyes:agent/gpt-5-6-models-and-version-negotiation
Open

Support GPT-5.6 models and refresh stale brokers#471
alexandrereyes wants to merge 2 commits into
openai:mainfrom
alexandrereyes:agent/gpt-5-6-models-and-version-negotiation

Conversation

@alexandrereyes

Copy link
Copy Markdown

Summary

  • support max and ultra reasoning efforts across task, review, and adversarial-review flows
  • validate known OpenAI model/effort combinations from the app-server model catalog while preserving fallback behavior for older CLIs, custom providers, and unknown models
  • reject unsupported combinations such as gpt-5.6-luna + ultra locally with a clear error
  • recycle shared app-server brokers when the plugin version or Codex CLI version changes, including legacy broker state
  • serialize broker lifecycle changes across processes and recover abandoned locks
  • expose and document --model / --effort for review commands
  • bump release metadata from 1.0.6 to 1.0.7

Root cause

The reported false upgrade error was not caused by clientInfo.version or serviceName. Controlled probes against Codex CLI 0.144.0 returned the same GPT-5.6 catalog for plugin client version 1.0.6 and CLI client version 0.144.0, and a real plugin-path GPT-5.6 turn succeeded with the existing service name.

The failure occurs when the plugin reuses a broker that was started before the Codex CLI upgrade. That broker keeps its original codex app-server child in memory, so a locally installed 0.144.0 CLI can still route plugin turns through an older app-server. Broker state now records both plugin and CLI versions and is invalidated atomically when either changes or when legacy state has no runtime identity.

Validation

  • npm ci
  • npm run check-version
  • npm run build (including app-server binding generation)
  • npm test — 107/107 passing
  • deterministic catalog tests for Sol/Terra/Luna, including Ultra support and Luna rejection
  • integration coverage for foreground, resume, background, review, adversarial review, inherited config, custom providers, older CLIs without model/list, stale CLI/plugin versions, legacy broker state, concurrent startup, and abandoned-lock recovery
  • real read-only plugin-path smokes on Codex CLI 0.144.0:
    • gpt-5.6-sol / high
    • gpt-5.6-terra / max
    • gpt-5.6-luna / high
  • Ultra was covered deterministically and was not used for real smokes
  • independent diff review completed; all findings were fixed and revalidated

Fixes #468.
Related to #309, which reports the same false “requires a newer version” symptom and direct-CLI/plugin-runtime mismatch; this PR fixes the stale shared-broker path and also exposes review model/effort selection.

@alexandrereyes alexandrereyes marked this pull request as ready for review July 10, 2026 13:30
@alexandrereyes alexandrereyes requested a review from a team July 10, 2026 13:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1386a5ba56

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread plugins/codex/scripts/lib/codex.mjs Outdated
let threadId;
let threadSelection;

await validateExplicitReasoningSelection(client, cwd, options);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Defer resume effort validation until after resume

When --resume is used, this prevalidation reads the current Codex config before thread/resume returns the persisted thread's actual model/provider. If the saved thread differs from the current config, valid resumes can be rejected locally; for example, resuming a gpt-5.6-sol thread with --effort ultra fails when the current config model is gpt-5.6-luna, even though the resumed thread supports ultra. The validation for resumed turns should use the thread/resume response instead of the current config.

Useful? React with 👍 / 👎.

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.

Current Plugin does not support gpt-5.6 model family

1 participant