TDD Agent over-explores and hangs: reads binary files, ignores file size limits, doesn't use available skills

Resolved 💬 3 comments Opened Dec 7, 2025 by clintagossett Closed Dec 10, 2025

Description

The TDD agent (subagent_type='tdd-developer') hung while attempting to create a planning document. The agent demonstrated poor file exploration strategy:

  1. Attempted to read a binary .pptx file - Got an error but didn't pivot to using the PPTX skill
  2. Ignored file size warnings - Hit token limit errors (32842 tokens exceeds 25000 max) but kept trying
  3. Over-explored unnecessarily - The task only needed understanding of source dimensions and conversion scripts, not comprehensive codebase exploration
  4. Got stuck on bash output - Multiple "Waiting…" messages suggest stuck on bash command output

Task Context

The user asked: "Create a plan (DO NOT IMPLEMENT) for task 00016: Convert playbook to 960×540px"

This is a straightforward planning task that doesn't require:

  • Reading the output PPTX file (binary)
  • Reading entire source files (941 lines, 954 lines - way too large)
  • Comprehensive codebase exploration

What the Agent Did (Poor Strategy)

1. Read README (needed) ✓
2. Attempted Read on binary .pptx file ✗
   → Got error: "cannot read binary files"
   → Should have: Used PPTX skill or skipped entirely
3. Started exploring JavaScript files (excessive)
4. Read multiple large files hitting token limits ✗
5. Got stuck on "Waiting…" bash output ✗
6. Failed to pivot or abandon over-exploration

Expected Behavior

The agent should:

  1. Recognize binary files and skip them (or use appropriate skills)
  2. Respect file size limits and use offset/limit from the start
  3. For a planning task on dimension conversion, focus on:
  • What dimensions are currently used (quick check)
  • Where dimensions are specified in config/scripts
  • What needs to change
  1. Not attempt comprehensive exploration when unnecessary
  2. Use available specialized skills (PPTX skill) when needed

System Information

  • Session ID: 633a68fe-bed1-48a8-92eb-45af6d91e89a
  • Claude Code Version: 2.0.60
  • OS: macOS (Darwin 25.1.0)
  • Agent Type: tdd-developer

Related

This ties into broader agent strategy issues:

  • Agents should understand task scope and match exploration to requirements
  • Agents should use specialized tools/skills intelligently
  • Agents should handle errors gracefully (binary file error → use PPTX skill, not hang)
  • File exploration should respect token limits upfront

View original on GitHub ↗

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