openai / openai/codex-plugin-cc

app-server clientInfo.name "Claude Code" causes 400 invalid_request_error for gpt-5.5

Open Beginner friendly
#276 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
33.3k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

Summary

The Codex Claude Code plugin's app-server identifies itself as clientInfo.name = "Claude Code" during the initialize handshake. The OpenAI Codex backend appears to gate access to newer models (currently gpt-5.5) by client name, and rejects requests from this identifier with a misleading version-related error:

{"type":"error","status":400,"error":{"type":"invalid_request_error",
 "message":"The 'gpt-5.5' model requires a newer version of Codex. Please upgrade to the latest app or CLI and try again."}}

The codex CLI itself (codex exec -m gpt-5.5) works fine on the same machine — it identifies as codex_exec. So this is not a CLI version issue; the user's CLI is current.

Reproduction

  • codex-cli: 0.126.0-alpha.10
  • codex plugin: 1.0.4
  • auth: ChatGPT Pro
# Works:
codex exec -m gpt-5.5 "say hi"

# Fails with the error above:
node ~/.claude/plugins/cache/openai-codex/codex/1.0.4/scripts/codex-companion.mjs task --model gpt-5.5 "say hi"

`/codex:rescue`, `/codex:review`, and `/codex:adversarial-review` all fail the same way when invoked with `gpt-5.5`, since they share the app-server path.

Root cause

`plugins/codex/scripts/lib/app-server.mjs` hardcodes:

```js
const DEFAULT_CLIENT_INFO = {
title: "Codex Plugin",
name: "Claude Code",
version: PLUGIN_MANIFEST.version ?? "0.0.0"
};
```

The codex tracing logs confirm requests go out as `app_server.client_name="Claude Code"` from the plugin vs `app_server.client_name="codex_exec"` from `codex exec`. Patching `name` to `"codex_cli"` locally makes the same `gpt-5.5` request succeed end-to-end (turn/completed → assistant reply).

Suggested fix

Change `DEFAULT_CLIENT_INFO.name` to a `codex_*`-prefixed identifier (e.g. `"codex_claude_code_plugin"` or `"codex_cli"`) so the plugin inherits the same model-gating allowlist as the CLI. Alternatively, OpenAI could whitelist `"Claude Code"` server-side.

Happy to send a PR if useful.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in plugins/codex/scripts/lib/app-server.mjs and inspect DEFAULT_CLIENT_INFO as it is sent during the initialize handshake. Reproduce with the provided codex-companion.mjs command and compare it with codex exec; done means the plugin can complete a gpt-5.5 request without the invalid_request_error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
74/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.