[FEATURE] Read tool's 25k token limit is too conservative and easily bypassed
Resolved 💬 3 comments Opened Dec 29, 2025 by davidszp Closed Jan 2, 2026
When attempting to read a moderately-sized file (e.g., a 65k token academic paper PDF text), the Read tool refuses with:
Error: File content (65113 tokens) exceeds maximum allowed tokens (25000).
Please use offset and limit parameters to read specific portions of the file,
or use the GrepTool to search for specific content.
The workaround defeats the limit's purpose:
Users can simply use Bash instead:
cat file | head -c 30000
cat file | tail -c +30000 | head -c 30000
# etc.
This workaround actually uses more total tokens than a single Read call would (multiple tool calls, repeated context, overhead).
The limit is very conservative:
- Models have ~200k context windows
- 25k is ~12% of available context
- Many legitimate files (papers, large source files, logs) exceed this
Suggestion:
- Raise the default limit, or make it configurable
- Consider allowing users to specify a cheaper model (Haiku/Sonnet) for large file reads in exchange for more permissive limits - users may prefer trading off model capability for the ability to ingest more content in a single read
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗