Repository navigation
ci(review): keep Claude Code Review subagents in the foreground - #329
Merged
Merged
Conversation
The review's first turn launched a background eligibility subagent, then ended its turn waiting for it. Ending the turn ends the headless job, so no review ran (run 37478584859, job 112320461611). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ
The failing run left run_in_background unset and the harness still started the subagent in the background, so a prompt instruction alone is the weaker lever. Set CLAUDE_CODE_DISABLE_BACKGROUND_TASKS and keep the prompt line. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Benchmark Results🔴 Regression detected — threshold: 30% scan-clean
scan-violations
fix-violations
cpu
import
Updated 2026-10-06 14:58 UTC |
📊 Test Coverage ReportCoverage: 88.85% 📥 Coverage XML available as artifact: |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Oct 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #313 and #325. With
show_full_outputon (#325), the first review run that used it (PR #328, run 37478584859, job112320461611) shows why no review comment has ever been posted.Observation (from the job log)
Agent(Haiku, "Check PR eligibility"). The tool call had norun_in_backgroundfield, yet the harness started it in the background (subagent_stats:requested: unset 1,started_in_background: 1). The tool result wasAsync agent launched successfully ... You will be notified automatically when it completes.stop_reason: end_turn,num_turns: 2, 3.5 s API time,permission_denials: []).No buffered inline commentsand finished green, with no review posted.In a headless run, ending the turn ends the job, and the background subagent never reports back. The earlier green runs on #312 (2 turns, 4.7 s, output hidden) look like the same pattern, but that is an inference.
Change
Two levers on the review step:
env: CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: '1'(primary). The variable is present in the Claude Code 2.1.291 binary used by the run, along with the message "Background agents cannot be started in this session right now. Run the agent without run_in_background."--append-system-prompt "Run every subagent in the foreground ..."inclaude_args(backup). It extends theclaude_codepreset and does not replace it.Evidence and limits
end_turn, no eligibility verdict). The reviewer called the prompt line the weaker lever and recommended the environment variable, which is why it was added.envandclaude_argsare well-formed;shlex.splitkeeps the quoted prompt as one argument.claude --helplists--append-system-prompt. The workflow linter and YAML check pass.env:reaches the CLI process under the action's subprocess handling; that the variable turns an unset-flag call into a foreground one rather than only refusing background launches; that the model obeys the appended prompt; and the code-review plugin's own eligibility rules (not read).subagent_stats.started_in_background == 0in that log.Not addressed
scripts/, not in the workflow; not part of this change.🤖 Generated with Claude Code
https://claude.ai/code/session_01K5rAHJfvZyEEaUQghV7hCQ