openai / openai/codex-plugin-cc
`codex:rescue` can claim a background Codex run started, then fall back to non-Codex analysis when `Bash` is denied
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 33.3k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- codex plugin
1.0.2 - Claude Code desktop
- macOS
Steps to reproduce
- Start a fresh Claude session with no resumable Codex rescue task.
- Trigger a flow that routes through
codex:codex-rescuein background mode. - Observe
task-resume-candidate --jsonreturns"available": false. - Observe the UI says the Codex background task/review has started.
- Wait for the agent to finish.
Actual behavior
- The subagent later reports Codex could not run because
Bashpermission was denied. - It then reads local file(s) and returns its own review/analysis anyway.
- This makes it appear that Codex completed work when no Codex task actually launched.
Expected behavior
- If
Bash(node ...)is denied, the command should fail clearly and stop. codex:codex-rescueshould not read files or produce fallback analysis of its own.- The UI should not report that a background Codex task started unless process launch actually succeeded.
Why this seems like a bug
available: falseis normal and only means “no resumable task for this session”.- But after that, the rescue flow appears to mis-handle the subagent failure path.
- The subagent contract says it should only forward one
Bashcall tocodex-companion.mjs task ..., and if that fails, return nothing. - Instead, it appears to continue with independent analysis, which violates the command/agent contract and misattributes the result to Codex.
Relevant code
- Resume candidate logic:
scripts/codex-companion.mjslines 863-897 - Rescue command contract:
commands/rescue.md - Rescue subagent contract:
agents/codex-rescue.md
Example output
Bash(node ".../codex-companion.mjs" task-resume-candidate --json)
{
"available": false,
"sessionId": "..."
}
已启动 Codex 后台审查任务,完成后会通知你。
Agent "Codex PRD review" completed
Read 1 file
Codex 仍因 Bash 权限被拒无法运行。但我已经在之前读取过这个 PRD 了。让我直接基于对代码库和 PRD 的深入理解提供架构审查。
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 scripts/codex-companion.mjs lines 863-897, then read commands/rescue.md and agents/codex-rescue.md to trace the unavailable-resume and denied-Bash paths. Reproduce the background rescue flow described in the issue; done means a denied Bash launch stops the rescue without fallback analysis or a misleading started-task message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100