fix(work): parse Claude Code stream-json reply before threading it downstream - #546
Conversation
…wnstream real_agent_send_hook fed every role's raw --output-format stream-json transcript (one JSON object per line: system init, tool_use, ..., final result) straight into role_reply, since #498 deleted the old coder step's transcript parsing without giving sdd_loop's shared hook an equivalent. For the judge specifically, parse_judge_decision then parsed the transcript's first line -- a valid-but-action-less system/init event -- instead of the judge's actual decision on the last line, hard-failing every judge turn with "missing field `action`" (items #478/#502/#503). Restore transcript parsing (parse_claude_reply, agent_launch.rs) and apply it to every Claude Code role's reply via clean_agent_reply, not just the judge's, since role_reply also gets embedded verbatim into build_judge_prompt. Agentflare-Agent: claude-code Agentflare-Branch: task/489-sdd-loop-judge-reply-deterministically-m Agentflare-Item: 489
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 13 minutes Limit details: You’ve used all 1 included review currently available under your plan. You completed 60 included PR reviews in the past 7 days; at that activity level, included reviews refill at 1 review per hour. Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Summary
real_agent_send_hook(work_item_pipeline.rs) fed every dispatched role's raw--output-format stream-jsontranscript (one JSON object per line) straight intorole_reply, instead of the reply text — regressed when feat(work): durable subagent-driven-development pipeline on flare-workflow #498 deleted the oldcoderstep's transcript parsing without givingsdd_loop's shared hook an equivalent.parse_judge_decisionparsed the transcript's first line — a valid-but-action-less{"type":"system","subtype":"init",...}event — instead of the judge's actual decision on the last line, hard-failing every judge turn withmissing field \action`` (items fix: restore ready-for-work label when a dispatched job fails after exhausting retries #478, feat(flare-workflow): step execution context + durable loop iteration resume #502, fix(claim): use an IMMEDIATE transaction in item::claim to avoid stale-snapshot database-is-locked errors #503, closes item feat(dashboard): group job rows by item, tag self-repair jobs with why they fired #489).parse_claude_reply(agent_launch.rs) and applies it to every Claude Code role's reply via a newclean_agent_replyhelper, not just the judge's, sincerole_replyalso gets embedded verbatim intobuild_judge_promptfor every downstream judge call.Test plan
cargo test -p agentflare --bin agentflare agent_launch::— 19 passedcargo test -p agentflare --bin agentflare work_item_pipeline::— 39 passed, including a reproduction test (uncleaned_claude_stream_json_transcript_breaks_judge_parsing) confirming the exactmissing field \action`failure signature, and a fix-verification test (clean_agent_reply_fixes_claude_stream_json_so_judge_parsing_succeeds`)cargo clippy -p agentflare --bin agentflare -- -A unsafe_code -A clippy::pedantic— cleancargo fmt --check -p agentflare— clean