BASH_MAX_OUTPUT_LENGTH
Updated by Alex Sorokoletov
BASH_MAX_OUTPUT_LENGTH is a Claude Code environment variable: Max bash output character length. Its release history is not tracked here. It is listed in the official reference.
| Status | Present in v2.1.294 |
|---|---|
| Category | Shell and tools |
| Official docs | Listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export BASH_MAX_OUTPUT_LENGTH=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"BASH_MAX_OUTPUT_LENGTH": "<value>"
}
}Related variables
CLAUDE_CODE_BASH_OUTPUT_AUDIENCE_NOTECLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR: Maintain consistent working directory across commands.CLAUDE_BASH_NO_LOGIN: Replaced by CLAUDE_CODE_SHELL_PREFIX.CLAUDE_CODE_BASH_EDIT_DIFFCLAUDE_CODE_GIT_BASH_PATH: Git Bash executable path (Windows).CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY: Max concurrent tool executions; default 10.CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSION: Per-session ceiling on WebSearch tool calls (default 200), gated by a web_search_session_cap.CLAUDE_CODE_REMOTE_TOOLS_CALLER_SESSIONS_MAX
Frequently asked questions
What does BASH_MAX_OUTPUT_LENGTH do?
Max bash output character length
Which Claude Code version has BASH_MAX_OUTPUT_LENGTH?
Its release history is not tracked here.
How do I set BASH_MAX_OUTPUT_LENGTH?
Export it before starting Claude Code (export BASH_MAX_OUTPUT_LENGTH=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.