[FEATURE] Add environment variable to configure notebook file size limit (similar to CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS)
Problem
When reading Jupyter notebooks (.ipynb files) that exceed 256KB, Claude Code shows an error:
Error: Notebook content (360.5KB) exceeds maximum allowed size (256KB). Use Bash with jq to read specific portions
While there is CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS to configure the token limit for regular file reads (default 25000 tokens), there doesn't appear to be an equivalent way to increase the size limit for notebook files specifically.
Requested Feature
Add an environment variable (e.g., CLAUDE_CODE_NOTEBOOK_MAX_SIZE or similar) that allows users to configure the maximum notebook file size, similar to how CLAUDE_CODE_FILE_READ_MAX_OUTPUT_TOKENS works for regular files.
Use Case
Users working with large notebooks containing:
- Extensive data exploration and analysis
- Many visualizations/outputs
- Long experimental sessions
These notebooks often exceed the 256KB limit, making it difficult to work with them directly in Claude Code without resorting to command-line workarounds with jq.
Related Issues
- #9440 - discusses challenges with large notebooks (structural navigation)
- #7565 - mentions the 256KB limit error
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗