[BUG] CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS Configuration Ignored
Resolved 💬 2 comments Opened Mar 7, 2026 by thoeltig Closed Mar 30, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS setting defined in ~/.claude/settings.json or .claude/settings.json is not respected by the Read tool for main agents or sub-agents.
Current Behavior
- Configuration is present but ignored
- Files exceeding the token limit are displaying a successful read with total line count
- Only the first 2KB is returned to the agent in the response
- Remaining content is saved to a separate file instead of respecting the configured limit
Impact
- Configuration is unusable; setting has no effect
- Unexpected file reads and persistence bypass user-configured limits
What Should Happen?
- Read tool respects the configured CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS value
- Content truncation/persistence happens at the configured token boundary
- Both main agents and sub-agents honor the setting
Error Messages/Logs
Steps to Reproduce
Example Configuration
{
"env": {
"CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS": "75000"
}
}
Expected behavior: ~225-300k characters (at 3-4 chars/token ratio)
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.71 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Windows Terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗