Skip to content

Subagent Review Pattern

Ensure independent verification by delegating review tasks to a subagent. Prevents self-review bias where the same agent evaluates its own work.

When an agent reviews its own work:

  • Confirmation bias affects judgment
  • Known issues may be rationalized
  • Quality standards drift over time
  • “Looks good to me” syndrome

Delegate review to a separate subagent using the Task tool:

  1. Agent completes work
  2. Workflow directs to review node
  3. Review node delegates to subagent via Task tool
  4. Subagent returns objective assessment
  5. Workflow routes based on findings
[do-work] → [delegate-review] → [check-result] → pass → [next]
fail → [fix-issues] → [do-work]
{
"type": "agent-directive",
"id": "delegate-review",
"directive": "Delegate review to subagent using Task tool.\n\n1) Pass ONLY necessary information:\n - File paths to review\n - Success criteria\n - Context directory\n\n2) Agent delegation rules:\n - Role clarity: 'YOU ARE reviewer'\n - Direct commands: 'CHECK' not 'could you check'\n - Specify files: list exact paths\n - Demand verification: 'VERIFY by reading files'\n\n3) Save review result to {{review_file_path}}\n\n4) Report findings honestly - if reviewer found issues, report issues_found: yes",
"completionCondition": "Review delegated, result saved, findings reported",
"inputSchema": {
"type": "object",
"properties": {
"review_file": {
"type": "string",
"description": "Path to saved review file"
},
"issues_found": {
"type": "string",
"enum": ["yes", "no"],
"description": "Did reviewer find blocking issues?"
}
},
"required": ["review_file", "issues_found"]
},
"connections": { "success": "check-review-result" }
}

Role Assignment:

YOU ARE plan reviewer. Your assessment determines if we proceed.

Direct Commands:

READ plan file directly.
CHECK step implementation.
VERIFY by reading actual files.
RETURN blocking issues only.

Information Boundaries:

Pass ONLY:
- File paths to review
- Success criteria
- Relevant context paths
DO NOT pass:
- Your interpretation of quality
- Hints about what you expect
- Explanations of your work
{
"type": "condition",
"id": "check-review-result",
"condition": {
"operator": "eq",
"left": { "contextPath": "issues_found" },
"right": "no"
},
"connections": {
"true": "next-step",
"false": "fix-issues"
}
}

From development-flow.json gate review:

{
"id": "agent-validate-step",
"directive": "Delegate critical review to subagent.\n\n1) Pass direct access to plan without interpretation\n2) No mentions of 'code was improved/added/fixed'\n3) Pass: file path, step index, changed files, reports directory\n4) Tell which project parts to study for context\n\nAgent prompt:\nYOU ARE plan step gate reviewer.\nYour assessment determines if we proceed.\nREAD plan file directly.\nCHECK step against PREVIOUS and FUTURE steps.\nEvaluate: code quality, errors, plan compliance.\nReturn BLOCKING issues only.\nProvide fix recommendations.",
"inputSchema": {
"properties": {
"agent_review_file": { "type": "string" },
"agent_issues_found": { "type": "string", "enum": ["да", "нет"] }
},
"required": ["agent_review_file", "agent_issues_found"]
}
}
{
"directive": "Check if your work meets quality standards.",
"completionCondition": "Quality check passed"
}

Problem: Agent evaluates own work.

{
"directive": "Ask subagent to verify the improvements we made."
}

Problem: “improvements” assumes positive outcome.

{
"directive": "Tell the reviewer about all the hard work done and why each decision was made."
}

Problem: Influences reviewer’s judgment.

Combine with numeric validation for objective criteria:

{
"inputSchema": {
"properties": {
"issues_count": {
"type": "number",
"minimum": 0,
"description": "Number of blocking issues found"
}
}
}
}
{
"condition": {
"operator": "eq",
"left": { "contextPath": "issues_count" },
"right": 0
}
}
  1. Minimal context - Pass only what reviewer needs
  2. No interpretation - Let reviewer form own conclusions
  3. Direct file access - Reviewer reads files directly
  4. Honest reporting - Agent must report findings truthfully
  5. Save results - Write review to file for traceability