Context Window Exhaustion During Conversation Compaction

Status Fixed / completed
Maintainer reply ✓ Yes — sid374
Activity 11 comments · opened Aug 12, 2025 · closed Aug 22, 2025
💡 Likely answer: A maintainer (sid374, contributor) responded on this thread — see the highlighted reply below.

Bug Description
why do i keep getting ⎿  Context low · Run /compact to compact & continue

/compact

⎿ Error: Error during compaction: Error: Conversation too long. Press esc to go up
a few messages and try again this is creazy it only runs for like 1 minute it barely lods!!!!

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 1.0.73
  • Feedback ID: b27b87d7-a810-4a96-9d44-b7aab88bc929

Errors

[]

View original on GitHub ↗

11 Comments

ryanmmmmm · 1 year ago

the sessions only run for like one minute versus so much pnger before yesterday.. what settings are these to set this i tried to update max tokens fomr 20000 to higher but it screwed up things bad

github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/2038
  2. https://github.com/anthropics/claude-code/issues/4660
  3. https://github.com/anthropics/claude-code/issues/2119

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

dustinfarris · 1 year ago

I'm also getting this. Barely getting started with anything and then "Context low" and can't even run compact.

idrnet · 1 year ago
I'm also getting this. Barely getting started with anything and then "Context low" and can't even run compact.

Same issue, at the start of any claude code conversation with empty context: " Context low · Run /compact to compact & continue".

/compact and /clear (reset) do not help...

issue

> /clear
  ⎿  (no content)

> Hi Claude Code!
  ⎿  Context low · Run /compact to compact & continue

What to do?

dlee11 · 1 year ago

Same issue. Conversation runs for a few minutes. Less than 30k tokens then shows 'Context low'

benlrichards · 1 year ago

@sid374 Has there been any further investigation into this issue?

benlrichards · 1 year ago

opencode is working hooked up to my claude pro max plan! https://opencode.ai/

idrnet · 1 year ago

i fixed it by removing some mcp servers.

sid374 contributor · 1 year ago

@ryanmmmmm do you have the BASH_MAX_OUTPUT_LENGTH set in your environment variables when you run claude?

dicksontsai collaborator · 1 year ago

You can use the new /context command to determine whether/how the context is being pre-filled.

github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.