IPYNB Cell Output Consumes Significant Portion of Context Window

Resolved 💬 2 comments Opened Mar 3, 2025 by ilicmiljan Closed May 7, 2025

Bug Description

Cell outputs are included in the context window when using Claude Code with interactive Python notebooks (IPYNB). While this has benefits when outputs are small, it can become problematic for larger ones.

Large cell outputs consume a significant portion of the available context window, which increases the overall context consumption. Additionally, including these large outputs leads to higher token usage, resulting in increased costs per query and longer response times.

A possible improvement would be implementing an option allowing users to exclude or limit the size of cell outputs in the context window. This change would facilitate more efficient operation when working with notebooks that generate large outputs.

Environment Info

  • Platform: macOS
  • Terminal: Apple_Terminal
  • Version: 0.2.29
  • Feedback ID: b009768c-16a9-4f21-b88a-1a107afb9738

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗