[Bug] Agent completion message incorrectly interpreted as user directive

Resolved 💬 3 comments Opened Jan 16, 2026 by ariccio Closed Jan 20, 2026

Bug Description
Agent completion message was treated as a directive from the user to proceed.

This is a moderately annoying repeating issue. Claude will ask a question like "Would you like me to: [list of questions]" and then stop. Then a background subagent will finish and send a message to the model like:

<task-notification>
<task-id>a3ad79c</task-id>
<status>completed</status>
<summary>Agent "Analyze git history of skills" completed</summary>
<result>I've completed the analysis. Following instructions per the loaded skill and CLAUDE.md.

---

## Summary of Key Techniques Discovered

The git history reveals **11 distinct optimization techniques** applied to `.claude/skills/` over 3+ months:

**Structural:**
1. **Progressive disclosure** (SKILL.md → REFERENCE.md/EXAMPLES.md) - largest impact, 36-63% reductions
2. **Skill consolidation** (23→19 skills by merging overlapping domains)
3. **CLAUDE.md extraction** to skills (-54% tokens)
4. **Slash command deduplication** via skill references

**Content Transformation:**
5. **Examples extraction** to separate files (-18%, 6,041 tokens)
6. **Code blocks → "See REFERENCE.md" pointers** (36% reduction in swift6-concurrency)
7. **ASCII diagrams → Mermaid/nested bullets** (-3.4%, 2,018 tokens)
8. **Prose → tables** for anti-patterns, version history

**Loading Optimization:**
9. **investigate_before_answering pattern** - prevents unnecessary 6-10K token loads

**Discoverability:**
10. **Description keyword expansion** (6-8 → 13-20 concepts, +4x triggering)
11. **WHEN + WHEN NOT pattern** (+30-40% accuracy)

**Potential next steps**: ASCII→Mermaid for remaining diagrams, automated token counting, extending slash command skill references, tuning investigate_before_answering per-skill based on usage.</result>
</task-notification>
Full transcript available at: /private/tmp/claude/-Users-alexanderriccio-Documents-GitHub-DeeDee-Prototype-skill-extraction/tasks/a3ad79c.output
<task-notification>
<task-id>abbbdf8</task-id>
<status>completed</status>
<summary>Agent "Count tokens for SKILL.md files" completed</summary>
<result>The report has been written. Following project instructions, here is a brief summary (under 300 tokens):

---

## Summary

**Top optimization candidates** (SKILL.md files without REFERENCE.md extraction):

1. **managing-mock-vs-real-data-flow** - 5,974 tokens (highest priority)
2. **implementing-server-side-sms-architecture** - 4,211 tokens
3. **skill-creator** - 4,066 tokens

**Already large despite having REFERENCE.md** (may benefit from further extraction):

1. **local-parallel-review-loop** - 7,043 tokens in SKILL.md
2. **building-deedee-skills** - 5,724 tokens in SKILL.md
3. **backend-management** - 5,221 tokens in SKILL.md

**Key statistics:**
- 33 total skills
- 12 skills lack REFERENCE.md files
- Total ecosystem: 228K tokens (SKILL.md: 111K, REFERENCE.md: 117K)
- 3 skills over 4K tokens have no REFERENCE.md - these are the best extraction targets

The report is saved at `/Users/alexanderriccio/Documents/GitHub/DeeDee-Prototype-skill-extraction/copilot_notes/session-details/20260116-165743/token-counts-report.md`.</result>
</task-notification>
Full transcript available at: /private/tmp/claude/-Users-alexanderriccio-Documents-GitHub-DeeDee-Prototype-skill-extraction/tasks/abbbdf8.output
<task-notification>
<task-id>ad56d7d</task-id>
<status>completed</status>
<summary>Agent "Consolidate subagent findings" completed</summary>
<result>I have completed the consolidation analysis. Following instructions from these guidelines, here is my summary for the orchestrator:

---

## Summary for Orchestrator (under 500 tokens)

**Top 3 Highest-Priority Skills to Optimize:**

1. **managing-mock-vs-real-data-flow** (5,974 tokens) - Largest skill without REFERENCE.md. Expected 50-67% reduction (3,000-4,000 tokens).

2. **implementing-server-side-sms-architecture** (4,211 tokens) - Second largest without progressive disclosure. Expected 48-59% reduction.

3. **skill-creator** (4,066 tokens) - Third largest without REFERENCE.md. Meta-skill with extractable templates/examples.

**Most Effective Technique (per git history):**
Progressive disclosure architecture (SKILL.md to REFERENCE.md extraction) - consistently achieves 50-80% reductions. The `understanding-deedee-architecture` skill went from 46KB to 8.4KB (82% reduction) using this approach.

**Key Patterns Discovered:**
- Skills >4K tokens without REFERENCE.md are highest-ROI targets
- 12 of 33 skills lack REFERENCE.md; 3 of those are >4K tokens (the priority targets)
- MCP subagent skills (5 total, ~10K tokens) could be consolidated into 1-2 skills using proven consolidation pattern (-30% to -63%)

**Anti-Pattern:**
Creating both EXAMPLES.md and REFERENCE.md causes duplication - standardize on REFERENCE.md only.

**Estimated Total Savings:**
13,500-18,000 tokens (12-16% of SKILL.md budget) by applying progressive disclosure to the three priority skills plus consolidating MCP skills.

Output written to: `/Users/alexanderriccio/Documents/GitHub/DeeDee-Prototype-skill-extraction/copilot_notes/session-details/20260116-165743/consolidated-optimization-plan.md`</result>
</task-notification>
Full transcript available at: /private/tmp/claude/-Users-alexanderriccio-Documents-GitHub-DeeDee-Prototype-skill-extraction/tasks/ad56d7d.output

...and then claude will entirely forget the questions it asked and go off and do something stupid.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.9
  • Feedback ID: 6b6037ab-5938-4f89-8076-a0349169a221

Errors

[{"error":"Error: Request was aborted.\n    at uW1 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2438:50353)\n    at uW1.next (<anonymous>)\n    at YJ9 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4585:1458)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at runNextTicks (node:internal/process/task_queues:69:3)\n    at process.processImmediate (node:internal/timers:473:9)\n    at async file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4583:3800\n    at async JX0 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1178:1998)\n    at async aHA (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4583:3770)\n    at async rN (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2775:3910)","timestamp":"2026-01-16T22:20:51.856Z"},{"error":"Error: Compaction interrupted · This may be due to network issues — please try again.\n    at Yl5 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2500:3647)\n    at processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at runNextTicks (node:internal/process/task_queues:69:3)\n    at process.processTimers (node:internal/timers:540:9)\n    at async hD1 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2500:223)\n    at async sv2 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2572:4412)\n    at async rN (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2775:2552)\n    at async rN (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2775:8932)\n    at async rN (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2775:8932)\n    at async rN (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2775:8932)","timestamp":"2026-01-16T22:21:56.158Z"},{"error":"Error: Request was aborted.\n    at uW1 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2438:50353)\n    at uW1.next (<anonymous>)\n    at YJ9 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4585:1458)\n    at runNextTicks (node:internal/process/task_queues:65:5)\n    at process.processImmediate (node:internal/timers:473:9)\n    at async file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4583:3800\n    at async JX0 (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1178:1998)\n    at async aHA (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:4583:3770)\n    at async rN (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2775:3910)\n    at async rN (file:///Users/alexanderriccio/.nvm/versions/node/v24.10.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2775:8932)","timestamp":"2026-01-16T22:21:56.201Z"}]

View original on GitHub ↗

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