openai / openai/codex-plugin-cc
Windows: codex-plugin-cc hangs at “Initializing…” when launching `codex app-server`; likely broker/spawn/ stdio issue
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 33.3k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Environment:
- OS: Windows 11 Pro
- codex-cli: 0.121.0
- codex-plugin-cc: 1.0.3 (
codex@openai-codex) - Auth mode: ChatGPT Plus login
- Claude Code CLI with
codex-plugin-cc
Problem:
When triggering /codex:rescue --fresh <prompt> inside Claude Code, the Codex child agent stays at
“Initializing…” indefinitely with no output and no visible error.
What I expected:
The plugin should successfully start codex app-server, complete the JSON-RPC handshake, and begin processing
the request.
What actually happens:
- The child agent shows “Initializing…” for several minutes
- No output is produced
- No explicit error is surfaced to the user
- Reproduces both via slash command and Skill-triggered path
Important clarification:
This is not using codex exec. I checked the plugin source and it actually uses codex app-server.
Observed plugin architecture:
-
Default path:
- spawn a detached Node broker process (
app-server-broker.mjs) - broker launches
codex app-server - client connects to broker over socket
- spawn a detached Node broker process (
-
Fallback path:
- directly spawn
codex app-server stdio: ["pipe", "pipe", "pipe"]- write JSON-RPC messages to stdin
- read stdout line-by-line
- directly spawn
Why I believe this is a plugin-side Windows spawn/broker issue:
-
codex app-serveritself works on this machine
I successfully ran:codex login status
->Logged in using ChatGPTcodex debug app-server send-message-v2 "Reply with exactly OK."
This successfully completed:
initializeinitializedthread/startturn/start- final response
OK
It also showed:
platformFamily: "windows"platformOs: "windows"planType: "plus"
So:
codex app-serveris functional on Windows in this environment- ChatGPT Plus auth /
~/.codex/auth.jsonis being read correctly - stdio JSON-RPC handshake itself is not fundamentally broken here
-
Broker state files are never created
In%CLAUDE_PLUGIN_DATA%/state/<workspace>/, there is no:broker.jsonbroker.pidbroker.log
This suggests the broker session either:
- never started correctly
- failed before persisting state
- or was torn down immediately
-
~/.codex/log/codex-tui.logtimestamps do not match my/codex:rescueattempts
That suggests my Claude Code attempts may never be reaching a real Codex app-server session.
Suspicious implementation detail:
On Windows, the direct spawn path uses:
shell: process.env.SHELL || true
This looks high-risk for a protocol process like codex app-server, because app-server expects clean JSONL
over stdio.
Wrapping it in cmd.exe / bash / pwsh can introduce:
- quoting/path resolution problems
- extra shell output on stdout/stderr
- encoding differences
- loss of direct stdio semantics between client and Codex
For a JSON-RPC-over-stdio subprocess, shell: true seems especially unsafe on Windows.
Relevant upstream documentation:
The official app-server README says:
- default transport is
stdio:// - stdio transport is newline-delimited JSON (JSONL)
- clients must send
initialize, theninitialized RUST_LOGcontrols tracing verbosityLOG_FORMAT=jsonemits app-server tracing logs to stderr
Reference:
https://raw.githubusercontent.com/openai/codex/main/codex-rs/app-server/README.md
Minimal upstream validation I ran:
codex debug app-server send-message-v2 "Reply with exactly OK."
This was enough to prove that in the same machine/account:
codex app-serverstarts- handshake completes
- a thread and turn can run
- response is returned successfully
Suggested areas to investigate:
- Remove
shell: truefrom the Windows spawn path forcodex app-server - Spawn the real Codex executable directly instead of going through shell wrappers
- Ensure broker stderr is always captured and persisted
- Inject and preserve:
RUST_LOG=debugLOG_FORMAT=json
for debugging broker/app-server startup
- Verify stdout is treated as JSONL transport only, and stderr is never mixed into the JSON parser
- Check whether the broker is exiting before writing
broker.json/broker.pid/broker.log
Related upstream Windows/app-server issues:
- invalid JSON parsed from
codex app-serverstdout:
https://github.com/openai/codex/issues/6435 - Windows extension app-server startup failures:
https://github.com/openai/codex/issues/6062 - Windows stdio/encoding issue with codex-app-server:
https://github.com/openai/codex/issues/4498
Repro summary:
- Install/use Claude Code CLI with
codex-plugin-cc - On Windows 11, with working
codex-cli 0.121.0and ChatGPT Plus login - Run
/codex:rescue --fresh <prompt> - Observe child agent stuck at “Initializing…” indefinitely
- Independently run:
codex debug app-server send-message-v2 "Reply with exactly OK." - Observe that Codex app-server itself works, pointing to plugin-side broker/spawn/transport handling
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app-server-broker.mjs and the direct spawn path, then reproduce /codex:rescue --fresh on Windows alongside codex debug app-server send-message-v2. Check broker startup, stderr capture, state-file creation, and JSONL stdout handling; done means the plugin completes initialize/initialized and processes a request without hanging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100