Codex rescue task gets stuck in infinite tool-call loop during code review
Resolved 💬 1 comment Opened Apr 2, 2026 by xiaodream551-a11y Closed Apr 2, 2026
Description
When using the Codex plugin for Claude Code (codex:rescue) to review code changes, the Codex task occasionally gets stuck in an infinite tool-call loop. It reads all the necessary files and converges on findings, but then loops back to re-reading the same files instead of producing a final review output.
Steps to Reproduce
- Use Claude Code with the Codex plugin (v1.0.2)
- Invoke
codex:rescuewith a code review task, e.g.:
````
Review the changes between commits <base> and HEAD. Focus on Spectre.Console integration, null safety, behavioral parity...
- Codex reads all relevant diffs and source files successfully
- Instead of producing a final summary, it loops back to re-reading the same files
Observed Behavior
- Codex's last progress message: "我已经收敛到几条具体问题了" (I've converged on a few specific issues)
- After this, it re-enters file reading commands (
nl -ba,sed -n,rg) on files it has already read - The loop continues until the task is terminated
- No final review output is produced
Expected Behavior
Codex should produce a final review summary after reading all necessary files, not loop back to re-reading them.
Environment
- Claude Code: v2.1.90
- Codex plugin: v1.0.2
- Codex CLI: v0.118.0
- OS: macOS (Darwin 25.4.0, Apple Silicon)
- Runtime mode: shared session (direct startup)
Additional Context
- This happened during a review of ~300 lines of changes across 6 files
- A separate Codex task reviewing the same codebase (full repo review, ~2000 lines) completed successfully in ~5 minutes
- The stuck task was in "verifying" phase when terminated
- The issue seems intermittent — not every review task triggers it
Workaround
Cancel the stuck task and retry. The retry (or a concurrent task) may complete successfully.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗