Description
The Claude Code Read tool caps file content at 25,000 tokens per call.
/dev-story Phase 2 instructs Read("docs/architecture/[adr-file].md")
unconditionally. ADRs for non-trivial architectural decisions routinely
exceed this cap (35k+ tokens is common when the ADR includes detailed
Implementation Guidelines, Engine Compatibility tables, and Amendments).
The result is a failed Read, an error message instructing the agent to
retry with offset/limit, and 2-3 follow-up reads to assemble the
file in chunks. Total token cost: ~30k of input tokens spent on
failed-read errors + retry reads — roughly double what a successful
single Read would have consumed.
This compounds Issue #63: not only is the full ADR re-read redundant
per /create-stories' contract, it's also pathologically expensive on
realistic ADRs.
Steps to Reproduce
- Create an ADR with substantial Implementation Guidelines + Amendments
sections (target ~35k tokens / ~250 lines of dense prose)
- Generate stories via
/create-stories referencing that ADR
- Run
/dev-story on one of the stories
- Observe the Read call on the ADR fails with:
File content (35000+ tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file...
- Agent then issues offset+limit Reads to recover
Expected Behavior
Skills that need ADR content should use targeted reads (grep for
specific sections, or Read with offset/limit for known section
boundaries) rather than unbounded full-file reads.
Actual Behavior
Phase 2 instructions assume Read returns the full file; no
preconditioning for large ADRs.
Environment
- Template version: v1.0.0 (commit 984023d)
Affected Component
Additional Context
Real-world example: a project with ADR-0007 (~35k tokens) and ADR-0009
(~35k tokens), both referenced by stories. Each /dev-story invocation
incurred ~60k of failed-read + retry overhead before implementation even
started. The Issue #63 fix (use story-embedded Decision Summary)
incidentally resolves this symptom; if Issue #63's fix is not adopted,
this issue should still be addressed with targeted Read patterns.
Description
The Claude Code
Readtool caps file content at 25,000 tokens per call./dev-storyPhase 2 instructsRead("docs/architecture/[adr-file].md")unconditionally. ADRs for non-trivial architectural decisions routinely
exceed this cap (35k+ tokens is common when the ADR includes detailed
Implementation Guidelines, Engine Compatibility tables, and Amendments).
The result is a failed Read, an error message instructing the agent to
retry with
offset/limit, and 2-3 follow-up reads to assemble thefile in chunks. Total token cost: ~30k of input tokens spent on
failed-read errors + retry reads — roughly double what a successful
single Read would have consumed.
This compounds Issue #63: not only is the full ADR re-read redundant
per
/create-stories' contract, it's also pathologically expensive onrealistic ADRs.
Steps to Reproduce
sections (target ~35k tokens / ~250 lines of dense prose)
/create-storiesreferencing that ADR/dev-storyon one of the storiesFile content (35000+ tokens) exceeds maximum allowed tokens (25000). Use offset and limit parameters to read specific portions of the file...Expected Behavior
Skills that need ADR content should use targeted reads (grep for
specific sections, or Read with offset/limit for known section
boundaries) rather than unbounded full-file reads.
Actual Behavior
Phase 2 instructions assume
Readreturns the full file; nopreconditioning for large ADRs.
Environment
Affected Component
dev-storyAdditional Context
Real-world example: a project with ADR-0007 (~35k tokens) and ADR-0009
(~35k tokens), both referenced by stories. Each
/dev-storyinvocationincurred ~60k of failed-read + retry overhead before implementation even
started. The Issue #63 fix (use story-embedded Decision Summary)
incidentally resolves this symptom; if Issue #63's fix is not adopted,
this issue should still be addressed with targeted Read patterns.