Skip to content
BENIBIX Learn

BASH_MAX_OUTPUT_LENGTH

AI⌨️ Claude CodeConfiguration

Also known as BASH_MAX_OUTPUT_LENGTH environment variable, TASK_MAX_OUTPUT_LENGTH

It sets how much of a command's output Claude gets back.

Think of it like

It is like you copy just the first part of a long note.

Example

Lucy's test run prints a long log, and the failure is near the end. She raises the limit, and Claude can see the error.

Why it matters

If the useful line is past the cut, Claude never sees it and guesses instead.

Definition

BASH_MAX_OUTPUT_LENGTH sets how many characters of a shell command's output Claude gets back. The default is 30,000, and the most you can set is 150,000. If the bashOutputMaxChars setting is set, this one is ignored. The old TASK_MAX_OUTPUT_LENGTH does nothing now.

Example code

bash
export BASH_MAX_OUTPUT_LENGTH=80000
claude
Show Claude more of each command's output.
The Bash cap is the left bar.

Common mistake

Raising it when a filter would do. Piping the output through grep or tail is cheaper.

Key takeaways

  1. 1
    Default 30,000. Characters.
  2. 2
    Most 150,000. The top.
  3. 3
    Setting wins. bashOutputMaxChars.