Skip to content

Align the Claude Code plugin with GPT-5.6 runtime and prompting - #638

Open
eureka-pd wants to merge 3 commits into
openai:mainfrom
eureka-pd:main
Open

Align the Claude Code plugin with GPT-5.6 runtime and prompting#638
eureka-pd wants to merge 3 commits into
openai:mainfrom
eureka-pd:main

Conversation

@eureka-pd

Copy link
Copy Markdown

Summary

This PR aligns the Claude Code Codex plugin with the current GPT-5.6
Sol/Terra/Luna runtime and prompting model.

It:

  • adds GPT-5.6-aware model and reasoning-effort handling through the Codex app-server model catalog
  • supports max and ultra reasoning efforts where the selected model advertises them
  • removes the obsolete minimal effort from the plugin-facing runtime and command surface
  • maps the spark alias to gpt-5.6-luna
  • replaces the generation-pinned gpt-5-4-prompting skill with version-neutral codex-prompting guidance
  • removes GPT-5.4-specific prompting examples and compatibility guidance from the active plugin context
  • exposes --model and --effort consistently for review and adversarial-review flows
  • refreshes stale shared app-server brokers when the plugin or Codex CLI runtime changes
  • preserves active stale brokers long enough for in-flight work and cancellation to complete safely
  • keeps write-capable rescue tasks on the app-server danger-full-access sandbox

Context

The runtime/model-catalog and broker-lifecycle portions of this change are
based on and extend #471 by @alexandrereyes.

That PR already addresses the underlying GPT-5.6 runtime and stale-broker
issues. This PR carries that work forward while also updating the
Claude-side model policy and prompting layer for the current GPT-5.6
generation.

In particular, it addresses the stale GPT-5.4 prompting path reported in
#485 and removes the remaining generation-specific assumptions from the
active rescue context.

The plugin now treats:

  • gpt-5.6-sol as the highest-capability tier
  • gpt-5.6-terra as the balanced tier
  • gpt-5.6-luna as the efficient/high-volume tier

Reasoning effort remains a separate inference-budget dimension and is
validated against the current Codex model catalog rather than a
generation-specific model matrix.

Model and effort handling

The companion exposes the following reasoning-effort values:

none, low, medium, high, xhigh, max, ultra

minimal has been removed from the plugin surface.

Known OpenAI model/effort combinations are validated using model/list
from the app server. Older Codex versions that do not expose the model
catalog retain the existing compatibility fallback, and custom providers
or unknown future model names are not blocked by a plugin model allowlist.

The spark convenience alias now resolves to:

gpt-5.6-luna

instead of the previous GPT-5.3 Spark model.

Prompting

codex-rescue no longer loads a GPT-5.4-specific prompting skill.

The new codex-prompting skill is generation-neutral and uses a lean,
outcome-first task contract:

  • preserve the user's scope and terminology
  • state completion and verification criteria explicitly
  • avoid duplicated or motivational prompt instructions
  • distinguish read-only analysis from requested implementation
  • keep approval boundaries explicit for destructive or external actions
  • leave model and reasoning effort unset unless the user explicitly selects them

The old gpt-5-4-prompting skill and references are removed so they cannot
be injected into new rescue contexts.

Broker/runtime behavior

The shared app-server broker now records enough runtime identity to detect
plugin or Codex CLI upgrades.

Stale brokers are recycled when safe, while brokers with active work are
preserved so that:

  • existing turns are not interrupted by a plugin/CLI upgrade
  • cancellation is still sent to the runtime that owns the active turn
  • unrelated new work can fall back to a direct app-server
  • abandoned lifecycle locks can be recovered safely

Verification

Validated on Node.js 22 with the current Codex CLI:

  • npm ci
  • npm run check-version
  • npm test — 122/122 passing
  • npm run build
  • git diff --check
  • repository scan for retired GPT-5.4 / GPT-5.3 Spark identifiers
  • regression coverage for:
    • Sol/Terra/Luna model-catalog handling
    • max / ultra
    • Luna + unsupported effort rejection
    • inherited/default model configuration
    • sparkgpt-5.6-luna
    • rejection of minimal
    • stale broker replacement
    • active stale broker cancellation
    • foreground/background/resume flows
    • review and adversarial-review model/effort flags
    • unrestricted sandbox selection for write-capable tasks

Related

If maintainers prefer to land #471 independently, I am happy to split the
prompting/model-policy changes into a smaller follow-up PR on top of it.

- port GPT-5.6 Sol/Terra/Luna model-catalog support from upstream PR openai#471
- support max/ultra efforts and model/effort selection in review flows
- refresh stale shared brokers safely across plugin and Codex CLI upgrades
- replace active GPT-5.4-specific prompt shaping with version-neutral codex-prompting guidance
- keep gpt-5-4-prompting as a deprecated compatibility alias
- update fork installation docs, changelog, and regression coverage

Based-on: openai#471
@eureka-pd
eureka-pd requested a review from a team August 13, 2026 07:41

@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: 866fdf8a09

ℹ️ 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".

return null;
}
}
teardownExistingBroker(cwd, existing, options.killProcess ?? terminateProcessTree);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Verify broker ownership before terminating the saved PID

When a broker crashes and leaves broker.json behind, its endpoint becomes unreachable but its PID can later be reused; this unconditionally passes that stale PID to terminateProcessTree. On Windows this kills the reused process tree, and on Unix it can terminate an unrelated process group when the reused PID is a group leader. Verify that the process still belongs to this broker, or avoid killing by PID when the endpoint cannot confirm broker identity.

Useful? React with 👍 / 👎.

Comment on lines +34 to +35
if (Number.isFinite(ownerPid) && isProcessAlive(ownerPid)) {
return false;

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 Recover stale locks when the owner PID has been reused

If a CLI process dies while holding this lock and the OS later assigns its PID to an unrelated long-lived process, isProcessAlive remains true and this branch ignores staleMs indefinitely. Every subsequent broker startup or reuse attempt then waits five seconds and fails until that unrelated process exits, effectively disabling the shared runtime for the workspace. Include process-start identity in the lock or allow sufficiently old locks to be recovered safely.

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.

1 participant