Repository navigation
[local-verify-review-agents-must-return-json-ve] Verify/review agents must return JSON verdict, not ReportFindings tool output - #856
Conversation
…fy/review agents must return JSON verdict, not ReportFindings tool output
Artifacts & verificationRun: 1737 · Commit: Verification reportProduced by Show artifactAuto-review summaryProduced by Show artifact |
|
🛑 Auto-merge: left open for human review (checked The merge-safety review ( 1 changed file(s) match
Review and merge it yourself if you disagree. devintern checks each pull request once and does not check again after new commits; a change to the auto-merge policy re-checks it. |
Why
Task local-verify-review-agents-must-return-json-ve: Verify/review agents must return JSON verdict, not ReportFindings tool output
Run 1674 escalated because the verify agent sent its findings through Claude Code's built-in
ReportFindingstool. That output never reaches stdout, soparseReviewFeedbackfound noapprovedJSON. The retry used the same prompt and failed the same way.What changed
packages/agent-harnesshas a newAgentRunOptions.disallowedTools.claude-codeturns it into--disallowedTools a,b, and other harnesses ignore it. I checked the installedclaude2.1.336. An unknown tool name only prints a warning, so the flag is safe on CLIs that lack the tool.review/verdict-delivery.tsholdsVERDICT_DISALLOWED_TOOLS(ReportFindings),VERDICT_DELIVERY_NOTEandbuildVerdictFollowUpPrompt.verdictoption onrunAgentPromptandaddress.ts'srunAgentsets the restriction. It is passed for verify and auto-review turns. The merge-safety review inauto-merge.tsalso passes it.pipeline-registry.tsandrun-harness-finalize.tspassverdictthrough, so verify reachesrunAgentPromptwith it.ReportFindings.prompts/review.mdsays the same.Scope
Included: verify, auto-review and merge-safety turns, the
claude-codeflag, prompts, and tests. Not changed: the verdict schema, the approval policy, and the merge-safety prompt text and rules.webhook/agent-review.tsis untouched because it posts prose and has no JSON verdict.Tradeoffs
merge-safety.md, because a test pins that prompt's text and the task puts auto-merge safety rules out of scope. That turn is protected only by the tool restriction.run-harness-finalize.tswas shortened to stay under the 1000-line lint limit.Blast Radius
runAgentPrompt,address.ts'srunAgentand the pipelinerunAgentPromptgain an optional field.verdict, argv is unchanged, so implementation turns do not get the flag.claude-code, review, verify and merge-safety invocations gain--disallowedTools ReportFindings.Verification
bun run testinpackages/code: 6529 pass, 0 fail. An earlier run had one failure, the merge-safety prompt-equality test, which came from my edit to that prompt. I reverted the edit and the test passes.bun test tests/harnesses.test.tsinpackages/agent-harness: 110 pass.bun run typecheckandbun run lintpass inpackages/code. Lint had flaggedrun-harness-finalize.tsat 1001 lines against the 1000-line limit, and it passes after the comment trim.runAgentPromptarguments to show verify turns get the restriction and implementation turns don't. That behavior is covered by the harness flag test and the verify test that checks theverdictoption is passed.🤖 Opened by DevIntern from local-verify-review-agents-must-return-json-ve