Files
claude-config/bin/claude_code/output_limits.py
T

11 lines
968 B
Python

"""The environment variables that cut what one tool result adds to a claude's context: the Bash ceiling loop-claude hands the worker's claude, and the Read limit that review-replay tests for it. Their values: docs/decisions.md → `loop-claude: the worker's claude saves a Bash result of more than 6,000 characters to a file, and rule-hook refuses a Read of a session transcript`.
A subagent inherits both variables, so the ceiling reaches every reviewer the worker launches."""
# Claude Code saves a Bash result longer than this many characters to a file, and hands the model the file's path and the first 2,000 characters. The file sits under ~/.claude/projects/<project>/<session>/tool-results/.
BASH_CEILING = "BASH_MAX_OUTPUT_LENGTH"
BASH_CEILING_CHARACTERS = 6_000
# A Read of more than this many tokens fails and asks for an offset and a limit; Claude Code's default is 25,000.
READ_LIMIT = "CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS"
READ_LIMIT_TOKENS = 5_000