Skip to content

Support GPT-5.6 models and refresh stale brokers#471

Open
alexandrereyes wants to merge 6 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 6 commits into
openai:mainfrom
alexandrereyes:agent/gpt-5-6-models-and-version-negotiation

Conversation

@alexandrereyes

@alexandrereyes alexandrereyes commented Jul 10, 2026

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
  • validate inherited model/effort configuration, including the catalog default model, before creating persistent task threads
  • recycle shared app-server brokers when the plugin version or Codex CLI version changes, including legacy broker state
  • preserve reachable stale brokers that report an active turn, keep cancellation interrupts on that broker, let unrelated new work use a direct app-server, and guard broker shutdown against active requests
  • serialize broker lifecycle changes across processes and recover abandoned locks
  • expose and document --model / --effort for review commands
  • make task --write and write-mode resumes request the official danger-full-access sandbox so localhost services and browser Mach ports remain available
  • 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.

A separate sandbox issue affected write-capable tasks: the companion explicitly sent workspace-write, which can deny localhost networking and Chromium Mach ports. The --write path now sends the app-server's supported danger-full-access mode for both new and resumed tasks.

Review follow-up also hardens lifecycle edges: inherited and default-model selections are rejected before persistent thread creation; stale broker replacement probes for active work before shutdown; cancellation retains the stale broker when it owns the active turn; and idle brokers still rotate normally.

Validation

  • npm ci
  • npm run check-version
  • npm run build (including app-server binding generation)
  • npm test — 114/114 passing
  • deterministic catalog tests for Sol/Terra/Luna, including Ultra support, Luna rejection, and default-model resolution
  • integration coverage for foreground, resume, background, review, adversarial review, inherited/default configuration, custom providers, older CLIs without model/list, stale CLI/plugin versions, legacy broker state, concurrent startup, abandoned-lock recovery, active stale brokers, and stale-broker cancellation
  • regression coverage for unrestricted sandbox selection on new and resumed --write tasks
  • 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
@gabimoncha

Copy link
Copy Markdown

up up

@gbertb

gbertb commented Jul 11, 2026

Copy link
Copy Markdown

we're still waiting for this!

@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: a6e501a96a

ℹ️ 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/model-catalog.mjs Outdated
Comment thread plugins/codex/scripts/lib/broker-lifecycle.mjs

@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: 1f4226e04d

ℹ️ 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/app-server.mjs Outdated
Comment thread plugins/codex/scripts/lib/model-catalog.mjs

Copy link
Copy Markdown
Author

@codex review

@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: 0e67715ac1

ℹ️ 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/broker-lifecycle.mjs Outdated
dmlsrc added a commit to dmlsrc/codex-plugin-cc that referenced this pull request Jul 12, 2026
Plumb reasoning effort through the review path and keep review threads
around after they finish.

- Accept "max" and "ultra" as reasoning-effort values in the companion
  validator and usage text.
- Parse --effort (and --model) on review and adversarial-review, and
  pass the effort to the app-server as a per-thread config override
  (model_reasoning_effort).
- Give review/adversarial threads a human title ("Codex Review vs
  <base>") and start them with ephemeral: false so they persist in the
  session index and rollout logs instead of being discarded.

The effort plumbing mirrors upstream PR openai#471; the thread persistence
(ephemeral: false + named review threads) is a local addition on top.
@axisrow

axisrow commented Jul 12, 2026

Copy link
Copy Markdown

Independently verified the effort path here on codex-cli 0.144.1: a raw thread/start with config: { model_reasoning_effort: "high" } comes back with reasoningEffort: "high" (no error), which matches the approach this PR takes in codex.mjs (config: options.effort ? { model_reasoning_effort: options.effort } : null). So the per-thread config route is confirmed working against a live app-server, not just the fake fixture. 👍

One thing worth adding to the description: this also closes #476 (review / adversarial-review silently ignoring --effort). The root cause there is the old code trying to pass effort as a top-level field on turn/start / review/start, which the server drops — routing it through thread/start.config (as you do here) is exactly the fix. Might be worth listing #476 alongside #468/#309 in the fixes.

One honest question on the boot-time class of failures (#309, and the closely related #408): when the app-server's default model is itself unsupported on the account (e.g. a gpt-5.3-codex default on ChatGPT/Plus), does thread/start.config still recover it? The failure in those reports happens before the first thread/start lands, so I wasn't sure whether the per-thread override gets a chance to apply. I can't reproduce it myself — my account resolves the default fine — so this is a question, not a claim. If you smoke-tested that path on a Plus account, it'd be great to note it, since it's the one case where a spawn-time -c model=... might still be needed as a fallback.

Pinging @hiirott (whose #408 tackles this exact boot-time case via a spawn-time -c model=...) and @jianjettfu-oss (#309 reporter) — you two have hit this directly, so your take on whether the per-thread config route covers it would be valuable.

Either way, nice work — the version-based broker invalidation is the right root-cause fix for the stale-broker half of #468.

axisrow added a commit to axisrow/codex-plugin-cc that referenced this pull request Jul 12, 2026
Distinguishes the axisrow fork from upstream's 1.0.6 so Claude Code treats it
as a new version when installing from the local marketplace path (upstream's
openai#471 already claims 1.0.7). Bumped in both plugin.json and marketplace.json
so `claude plugin validate` stays clean.

Co-Authored-By: Claude <noreply@anthropic.com>
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

4 participants