openai / openai/codex-plugin-cc

Background job state machine retains zombie entries; `--fresh` does not clear them

Open
#410 0 comments 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 background-job state machine (used by /codex:rescue, /codex:status,
/codex:cancel) appears to retain completed/failed job entries
indefinitely. Re-invoking with --background --fresh does not clear or
recycle these zombie entries, so subsequent runs can see and act on stale
state.

Reproduction

Environment:

  • Windows 10 / 11
  • @openai/codex-plugin-cc 1.0.5

Steps:

  1. Run a Codex rescue task to completion via
    codex:rescue --model gpt-5.5 --effort high --background.
  2. Wait until it shows status: completed.
  3. Start a new task with --background --fresh.
  4. Run /codex:status — the previously-completed job is still listed,
    and in some cases its job id is reused or its state bleeds into the
    new run's status reporting.

Suggested fix

  • Auto-GC completed / failed job entries after N minutes (e.g. 30 min).
  • Have --fresh actively wipe terminal-state job entries before starting
    the new run, not just decline to resume.

Happy to clarify with logs if useful — the state files live under
~/.claude/plugins/data/codex-openai-codex/state/....

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

Inspect the state files under ~/.claude/plugins/data/codex-openai-codex/state/... and trace how --background, --fresh, /codex:status, and /codex:cancel handle terminal states. Reproduce the rescue sequence from the issue, then verify that fresh runs do not retain completed or failed entries and that status no longer reports them after the cleanup period.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.