CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS
Updated by Alex Sorokoletov
CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS is a Claude Code environment variable: Max tokens for file read output. Present since v2.1.69 or earlier and still present in v2.1.294. It is listed in the official reference.
| Status | Present in v2.1.294 |
|---|---|
| Added | Present since v2.1.69 or earlier |
| Category | Authentication |
| Official docs | Listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS": "<value>"
}
}Release notes that mention it
Related variables
CLAUDE_CODE_MAX_OUTPUT_TOKENS: Maximum output tokens; validated per-model.MAX_MCP_OUTPUT_TOKENS: Max tokens for MCP tool output.CLAUDE_CODE_MAX_CONTEXT_TOKENS: Sets an explicit ceiling on the context window size used during a session.MAX_THINKING_TOKENS: Likely controlled via API settings now.CLAUDE_CODE_API_KEY_FILE_DESCRIPTOR: File descriptor to read API key from.CLAUDE_CODE_IDLE_COMPACT_MIN_TOKENS: Sets the minimum conversation size, in tokens, before idle compaction runs.CLAUDE_CODE_OAUTH_TOKEN_FILE_DESCRIPTOR: File descriptor to read OAuth token from.CLAUDE_CODE_WEBSOCKET_AUTH_FILE_DESCRIPTOR: File descriptor for WebSocket credentials.
Frequently asked questions
What does CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS do?
Max tokens for file read output
Which Claude Code version has CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS?
Present since v2.1.69 or earlier and still present in v2.1.294.
How do I set CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS?
Export it before starting Claude Code (export CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.