[Bug] Subagents fail to reliably understand and use the TaskOutput tool

Resolved 💬 6 comments Opened Dec 22, 2025 by ariccio Closed Mar 11, 2026

Bug Description
This is an odd pattern that I encounter frequently when using a "consolidation subagent" to work around issue #14053.

Subagents constantly try to use TaskOutput as if it were a bash command, and generally seem to have no idea what they're doing:

```claude-code-session
⏺ All 16 review agents launched. Now launching consolidation subagent with task IDs: 02:09 PM claude-opus-4-5-20251101

⏺ Task(Consolidate review findings) Sonnet 4.5
⎿  Prompt:
Read and execute: .ai/slash-command-phases/commit-push-review/prompts/review-consolidator.md

TASK_IDS (use with TaskOutput tool to read each agent's response):

  • feature-dev:code-reviewer: abf9d05
  • pr-review-toolkit:code-reviewer: a1cf9fe
  • code-quality-reviewer: a97481f
  • workslop-detector: a45afc7
  • silent-failure-hunter: a1d282c
  • security-code-reviewer: a29b77d
  • performance-reviewer: ac4a03b
  • type-design-analyzer: a3236c8
  • pr-test-analyzer: ae04b5b
  • test-coverage-reviewer: afad324
  • comment-analyzer: a380531
  • documentation-accuracy-reviewer: a9a31ad
  • accessibility-compliance-reviewer: a79f455
  • medical-alert-validator: ab18d2e
  • swiftdata-migration-validator: ab60a0d
  • mock-demo-data-auditor: ad2878b

Scope: Fix for Issue #1227 - removed shareTypes: [], from HealthKitAuthorizationView.swift to use Apple's READ-ONLY healthDataAccessRequest API overload. Also updated docs/healthkit-write-operations-audit.md.
⎿  > Read and execute: .ai/slash-command-phases/commit-push-review/prompts/review-consolidator.md

TASK_IDS (use with TaskOutput tool to read each agent's response):

  • feature-dev:code-reviewer: abf9d05
  • pr-review-toolkit:code-reviewer: a1cf9fe
  • code-quality-reviewer: a97481f
  • workslop-detector: a45afc7
  • silent-failure-hunter: a1d282c
  • security-code-reviewer: a29b77d
  • performance-reviewer: ac4a03b
  • type-design-analyzer: a3236c8
  • pr-test-analyzer: ae04b5b
  • test-coverage-reviewer: afad324
  • comment-analyzer: a380531
  • documentation-accuracy-reviewer: a9a31ad
  • accessibility-compliance-reviewer: a79f455
  • medical-alert-validator: ab18d2e
  • swiftdata-migration-validator: ab60a0d
  • mock-demo-data-auditor: ad2878b

Scope: Fix for Issue #1227 - removed shareTypes: [], from HealthKitAuthorizationView.swift to use Apple's READ-ONLY healthDataAccessRequest API overload. Also updated docs/healthkit-write-operations-audit.md.
⎿  Read(.ai/slash-command-phases/commit-push-review/prompts/review-consolidator.md)

⎿  Read 149 lines

⎿  /using-claude-code-tools-correctly

⎿  Read(.ai/general-subagent-instructions-and-requirements.md)

⎿  Read 238 lines

⎿  Bash(pwd)
Waiting…
⎿  /Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging

⎿  Bash(echo "abf9d05 a1cf9fe a97481f a45afc7 a1d282c a29b77d ac4a03b a3236c8 ae04b5b afad324 a380531 a9a31ad a79f455 ab18d2e ab60a0d ad2878b" | wc -w)
Waiting…
⎿  16

⎿  Bash(cat > /tmp/agent_ids.txt << 'EOF'
feature-dev:code-reviewer abf9d05
pr-review-toolkit:code-reviewer a1cf9fe
code-quality-reviewer a97481f
workslop-detector a45afc7
silent-failure-hunter a1d282c
security-code-reviewer a29b77d
performance-reviewer ac4a03b
type-design-analyzer a3236c8
pr-test-analyzer ae04b5b
test-coverage-reviewer afad324
comment-analyzer a380531
documentation-accuracy-reviewer a9a31ad
accessibility-compliance-reviewer a79f455
medical-alert-validator ab18d2e
swiftdata-migration-validator ab60a0d
mock-demo-data-auditor ad2878b
EOF
cat /tmp/agent_ids.txt)
Waiting…
⎿  feature-dev:code-reviewer abf9d05
pr-review-toolkit:code-reviewer a1cf9fe
code-quality-reviewer a97481f
workslop-detector a45afc7
silent-failure-hunter a1d282c
security-code-reviewer a29b77d
performance-reviewer ac4a03b
type-design-analyzer a3236c8
pr-test-analyzer ae04b5b
test-coverage-reviewer afad324
comment-analyzer a380531
documentation-accuracy-reviewer a9a31ad
accessibility-compliance-reviewer a79f455
medical-alert-validator ab18d2e
swiftdata-migration-validator ab60a0d
mock-demo-data-auditor ad2878b
⎿  Bash(echo "Reading agent outputs via TaskOutput tool - this is a reference note for tracking progress. Reading agents: feature-dev, pr-review-toolkit, code-quality, workslop-detector, silent-failure, security, performance,
type-design, pr-test, test-coverage, comment, documentation, accessibility, medical-alert, swiftdata, mock-demo")
Waiting…
⎿  Reading agent outputs via TaskOutput tool - this is a reference note for tracking progress. Reading agents: feature-dev, pr-review-toolkit, code-quality, workslop-detector, silent-failure, security, performance, type-design,
pr-test, test-coverage, comment, documentation, accessibility, medical-alert, swiftdata, mock-demo
⎿  Read(.ai/subagent-approval-safety.md)

⎿  Read 327 lines

⎿  Bash(echo "Note: About to invoke TaskOutput tool for each of the 16 review agents to gather their findings for consolidation")
Waiting…
⎿  Note: About to invoke TaskOutput tool for each of the 16 review agents to gather their findings for consolidation

⎿  Bash(ls -la /tmp/ | grep -E "review|agent|task" | head -20)
Waiting…
⎿  -rw-r--r-- 1 alexanderriccio wheel 513 Dec 22 14:10 agent_ids.txt
-rw-r--r-- 1 alexanderriccio wheel 529 Dec 21 22:10 agent_task_ids.txt
drwxr-xr-x@ 9 alexanderriccio wheel 288 Dec 22 00:00 DerivedData-auto-task-2
-rw------- 1 alexanderriccio wheel 1287 Dec 22 00:13 medium-2-concurrency-task-coordination.md
-rw------- 1 alexanderriccio wheel 380 Dec 20 17:28 review-fix-commit-msg.txt
⎿  Search(pattern: "**/taskoutput*")

⎿  Search(pattern: "**/agentresponse*")

⎿  Search(pattern: "**/review-*.md")

⎿    ⎿  Found 0 files

⎿    ⎿  Found 0 files

⎿    ⎿  Found 8 files
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/.ai/slash-command-phases/commit-push-review/prompts/review-consolidator.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5a_planning/review-iter1-code-reviewer.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5a_planning/review-iter1-silent-failures.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5a_planning/review-iter1-workslop.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5a_planning/review-iter2-code-reviewer.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5a_planning/review-iter2-silent-failures.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5a_planning/review-iter2-workslop.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/type-audit/review-round-2/review-orchestration-status.md
⎿  Read(copilot_notes/type-audit/review-round-2/review-orchestration-status.md)

⎿  Read 186 lines

⎿  Bash(find /Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging -name "review" -type f -mmin -60 2>/dev/null | head -20)
Waiting…
⎿  /Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/meeting-extractions/2025-12-17-yaakov-alex-pre-appstore-review.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/pr-855-copilot-review-resolution-2025-12-12.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/code-reviews/code-review-integration-issues.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/code-reviews/pr-399-code-review-ultrathinking-analysis.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/analysis/code-quality-review-f51bd3fc.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/2025-12-13-app-store-review-planning-session-journal.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/archive_gardening_20251212/archived_continuation_prompts/yaakov-pr-review-continuation-2025-11-30.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/archive_gardening_20251212/archived_sessions/session-journal-plan-yaakov-billing-plan-review-2025-12-09.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/archive_gardening_20251212/archived_sessions/2025-12-11-claude-code-review-improvements-session-journal.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/issue-696-review-findings.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/security-review-output-hipaa-orchestrate-parallel-batch-consolidator.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/planning/sentry-debug-context-expansion-architect-review.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5c_planning/final-review-silent.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5c_planning/final-review-coverage.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5c_planning/type-design-review.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5c_planning/final-review-code.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5b_planning/specialized-review-fallrisk.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5b_planning/final-review-code-reviewer.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5b_planning/specialized-review-mock-population.md
/Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes/subagent_notes/phase5b_planning/final-review-silent-failures.md
⎿  Bash(find /Users/alexanderriccio/Documents/GitHub/DeeDee-fix-health-access-ui-update-messaging/copilot_notes -type f -mmin -5 2>/dev/null)
Waiting…
⎿  (No content)

⎿  Response:
The agents haven't written output files yet. Let me check the documentation again. Based on the review consolidator instructions and the skill on using claude code tools, I suspect that "TaskOutput" might be a feature that's
supposed to exist but isn't currently available in my tool set, OR it's being referenced incorrectly.

Let me take a different approach. Given that:

  1. The user provided task IDs for 16 agents
  2. The instructions say to use "TaskOutput tool" but I don't have such a tool
  3. This appears to be a consolidation task after parallel agent execution

I should inform the user of this limitation and ask for clarification:

Consolidated Review Findings - BLOCKED

Issue: Cannot complete consolidation - TaskOutput tool unavailable

Problem

The review-consolidator instructions specify using a TaskOutput tool to read agent responses:
TaskOutput(task_id: "abf9d05")

However, this tool is not available in my current toolset. My available tools are:

  • Bash, Glob, Grep, Read, Write, Edit, NotebookEdit
  • WebFetch, WebSearch
  • Skill, LSP
  • MCP tools (apple-docs, sentry, etc.)

Attempted Alternatives

✗ File search: No recent review output files found in copilot_notes/
✗ Temp files: No agent outputs in /tmp/
✗ Background task outputs: No mechanism to access without TaskOutput tool

What I Need

One of the following:

  1. TaskOutput tool access - If this tool should be available, it may need to be enabled
  2. File locations - If agents wrote outputs to files, provide paths
  3. Alternative consolidation approach - Different method to access agent results

Agent Task IDs Provided (Ready to Process)

feature-dev:code-reviewer: abf9d05
pr-review-toolkit:code-reviewer: a1cf9fe
code-quality-reviewer: a97481f
workslop-detector: a45afc7
silent-failure-hunter: a1d282c
security-code-reviewer: a29b77d
performance-reviewer: ac4a03b
type-design-analyzer: a3236c8
pr-test-analyzer: ae04b5b
test-coverage-reviewer: afad324
comment-analyzer: a380531
documentation-accuracy-reviewer: a9a31ad
accessibility-compliance-reviewer: a79f455
medical-alert-validator: ab18d2e
swiftdata-migration-validator: ab60a0d
mock-demo-data-auditor: ad2878b

Once I can access these agent outputs, I'm ready to:

  • De-duplicate findings across all 16 agents
  • Apply severity hierarchy (CRITICAL > HIGH > MEDIUM > LOW)
  • Filter false positives
  • Produce consolidated summary within 5000 token budget

---
Note: Following CLAUDE.md instructions - confirming adherence to general coding standards, fail-fast principles, and approval-safe command patterns throughout this analysis.

⎿  Done (16 tool uses · 55.4k tokens · 2m 27s)

****



What makes this especially strange is that *sometimes* they use it just fine.



**Environment Info**
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.0.75
- Feedback ID: 06fd93ef-9a69-4ce4-87aa-dcd2b9d310a1

**Errors**
```json
[{"error":"AxiosError: Request failed with status code 404\n    at bx (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:56:1137)\n    at Unzip.<anonymous> (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:57:9852)\n    at Unzip.emit (node:events:520:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at fzA.request (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:59:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Lg2 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2309:2746)\n    at async Og2 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2309:3771)\n    at async Object.call (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2309:8830)\n    at async tg5 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2025-12-22T18:43:22.460Z"},{"error":"AxiosError: Request failed with status code 404\n    at bx (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:56:1137)\n    at Unzip.<anonymous> (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:57:9852)\n    at Unzip.emit (node:events:520:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at fzA.request (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:59:2130)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Lg2 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2309:2746)\n    at async Og2 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2309:3771)\n    at async Object.call (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2309:8830)\n    at async tg5 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2207:17438)","timestamp":"2025-12-22T18:43:27.944Z"},{"error":"Error: Input buffer contains unsupported image format\n    at Z0A.N03 [as metadata] (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:391:36333)\n    at fYA (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:391:80328)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async zP3 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1018:12937)\n    at async BQ0 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1018:13112)\n    at async Object.call (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1027:380)\n    at async file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3490:1459","timestamp":"2025-12-22T18:43:40.041Z"},{"error":"Error: Agent type 'code-explorer' not found. Available agents: general-purpose, statusline-setup, Explore, Plan, claude-code-guide, feature-dev:code-architect, feature-dev:code-explorer, feature-dev:code-reviewer, pr-review-toolkit:code-reviewer, pr-review-toolkit:code-simplifier, pr-review-toolkit:comment-analyzer, pr-review-toolkit:pr-test-analyzer, pr-review-toolkit:silent-failure-hunter, pr-review-toolkit:type-design-analyzer, test-coverage-reviewer, code-quality-reviewer, accessibility-compliance-reviewer, performance-reviewer, documentation-accuracy-reviewer, medical-alert-validator, mock-demo-data-auditor, security-code-reviewer, deedee-build-test-verifier, workslop-detector, garden-hostile-verifier, swiftdata-migration-validator\n    at Object.call (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2880:4579)\n    at tg5 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2207:17446)","timestamp":"2025-12-22T18:50:20.536Z"},{"error":"Error: EISDIR: illegal operation on a directory, read\n    at Module.readFileSync (node:fs:440:20)\n    at file:

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗