Document persistent-runner pattern for crq loop in agent harnesses - #16
Conversation
A crq loop wait can exceed an hour when the queue is deep or the account is rate-limited, and agent harnesses commonly kill plain background shell jobs between turns — the wait gets orphaned and looks like a hang. Document the pattern: run the loop under the harness's persistent long-running-task primitive (Claude Code: Monitor with persistent:true), redirect the findings JSON to a file, and emit a final CRQ_EXIT:<code> line as the completion event. Also note that a killed runner loses nothing — the PR stays enqueued and re-running crq loop re-attaches idempotently. Claude-Session: https://claude.ai/code/session_01BgW8cjUycHYKDZWaiRSLXY
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details🔇 Additional comments (1)
📝 WalkthroughWalkthroughDocumentation updates add guidance for running ChangesPersistent Loop Documentation
Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:da92bfe820
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Uh oh!
There was an error while loading. Please reload this page.
The documented Monitor command relies on echoing crq loop's exit code as the completion event, but crq loop intentionally exits non-zero for actionable outcomes (10 = findings, 2 = timeout). Under an inherited set -e the shell dies before the echo and the event never arrives. Claude-Session: https://claude.ai/code/session_01W4RViwpNDBmT2fs3qhQNx7
kristofferR
commented
Jul 3, 2026
@coderabbitai review |
✅ Action performedReview finished.
|
kristofferR
commented
Jul 3, 2026
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@skills/coderabbit-queue/SKILL.md`:
- Around line 78-84: The fenced Monitor({...}) example is missing a language
hint, which will trip markdownlint. Update the opening fence for this example to
include a language tag such as js or text, and keep the rest of the Monitor call
unchanged so the snippet remains valid and locatable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 708bc3cc-350d-4707-8da6-24fd17e37562
📒 Files selected for processing (2)
llms.txtskills/coderabbit-queue/SKILL.md
📜 Review details
🧰 Additional context used
🪛 markdownlint-cli2 (0.22.1)
skills/coderabbit-queue/SKILL.md
[warning] 78-78: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (1)
llms.txt (1)
79-87: LGTM!
Uh oh!
There was an error while loading. Please reload this page.
kristofferR
commented
Jul 4, 2026
@coderabbitai review |
✅ Action performedReview finished.
|
kristofferR
commented
Jul 4, 2026
@coderabbitai review |
✅ Action performedReview finished.
|
A single
crq loopwait can exceed an hour when the queue is deep or the account is rate-limited. Agent harnesses commonly kill plain background shell jobs between turns, silently orphaning the wait — observed today when two consecutive backgroundcrq loopruns were killed mid-wait (~51 min and ~2 min in).This documents the working pattern in SKILL.md and llms.txt:
crq loopunder the harness's persistent long-running-task primitive (in Claude Code,Monitorwithpersistent: true), redirecting the findings JSON to a file and emitting a finalCRQ_EXIT:<code>line as the completion event.crq loopre-attaches idempotently.crq statuspolling loop.https://claude.ai/code/session_01BgW8cjUycHYKDZWaiRSLXY
Summary by CodeRabbit
crq loopalive in agent-based test harnesses that may stop background jobs between turns.CRQ_EXIT:<code>completion line, including whyset +emay be necessary.crq loopcommand is idempotent and reattaches to the wait.