openai / openai/codex-plugin-cc

codex:codex-rescue agent times out before Codex task completes on large diffs

Open
#122 1 comment 2 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

Description

When using codex:codex-rescue subagents to dispatch review tasks via the codex-companion.mjs task command, the agent's Bash call times out (300s) before Codex finishes its analysis on large diffs. The Codex task continues running in the background, but the agent returns empty-handed and the results are never delivered to the parent conversation.

Reproduction

  1. Dispatch a review task via codex:codex-rescue on a diff with 30+ files / ~2000 lines
  2. Codex starts a thorough multi-pass analysis (44+ file reads observed)
  3. The codex-companion.mjs task command blocks waiting for Codex to finish
  4. After 300 seconds, the Bash timeout in the Claude Code agent fires
  5. The agent returns with "task dispatched, running in background" — no results
  6. Codex eventually finishes, but the verdict sits in the job log with no way to surface it back

Observed behavior

The Codex task log shows active work throughout:

[codex] Assistant message captured: I'm separating "new bug introduced by the branch" from "pre-existing path...
[codex] Command completed: git show '...:lib/training/workout-lifecycle.ts' (exit 0)
[codex] Command completed: git grep -n "deleted_at" ... (exit 0)
... (44+ commands executed)

But the agent that dispatched it has already returned empty.

Expected behavior

One of:

  1. Streaming partial results — the companion script could stream findings as they're discovered, so the agent can return intermediate results before timeout
  2. Async result retrieval — the companion script could return a job ID immediately, and provide a codex-companion.mjs result <job-id> command that the agent can poll
  3. Configurable timeout — allow the agent or companion script to set a longer timeout for large diffs
  4. Automatic result callback — when the task completes, write results to a known location that the parent session can detect

Impact

For small diffs (1-5 files), Codex completes within the timeout and results are returned normally. For larger diffs (30+ files), Codex reviews are effectively lost — the analysis runs but nobody sees the output. This makes Codex unreliable as a review gate for substantial PRs, which are exactly the ones that benefit most from a second opinion.

Environment

  • macOS Darwin 25.3.0
  • Node.js v20.19.6
  • Plugin version: 1.0.2 (commit 8e403f9)
  • Claude Code v2.1.90
  • Bash timeout: 300,000ms (5 minutes)

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 the codex-companion.mjs task command and the codex:codex-rescue dispatch path. Reproduce with a large diff and inspect the job log after the 300-second Bash timeout. Define how completed results should reach the parent conversation—such as polling, a callback, or configurable timeout—and verify that large tasks no longer return empty-handed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
ai, 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.