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
#158 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

Environment

  • codex plugin 1.0.2
  • Claude Code desktop
  • macOS

Steps to reproduce

  1. Start a fresh Claude session with no resumable Codex rescue task.
  2. Trigger a flow that routes through codex:codex-rescue in background mode.
  3. Observe task-resume-candidate --json returns "available": false.
  4. Observe the UI says the Codex background task/review has started.
  5. Wait for the agent to finish.

Actual behavior

  • The subagent later reports Codex could not run because Bash permission 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-rescue should 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: false is 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 Bash call to codex-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.mjs lines 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

  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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.