openai / openai/codex-plugin-cc
Delegated tasks / reviews can wedge in "running" forever when Codex drops terminal turn events
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 33.3k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
A /codex:rescue task or a background / stop-gate review can get stuck in running indefinitely - it never returns, never fails, and never times out, so /codex:status keeps showing it active until a manual /codex:cancel.
Root cause: captureTurn awaits a state.completion that only resolves via a main-thread turn/completed or the inferred-completion timer (which needs a final_answer). If Codex stops emitting terminal events on a still-open connection (both final_answer and turn/completed dropped), that promise never settles and the job stays running. The captured output sits in state.lastAgentMessage but is never returned.
In local job state across many workspaces this had already wedged ~100 jobs in running (most with a dead worker process, stuck for more than a day - a lower bound, since older job records are pruned).
Proposed fix: #390 (an idle watchdog + an exitPromise race in captureTurn that salvage the stalled turn and report it as incomplete), with #389 as a small build prerequisite.
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 proposed fix #390 and prerequisite #389, then inspect captureTurn, state.completion, and state.lastAgentMessage. Verify the idle watchdog and exitPromise handling salvage stalled turns as incomplete, and confirm /codex:status no longer leaves these jobs running indefinitely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100