[BUG] Missing session closure option when reaching a limit

Status Fixed / completed
Reported on v2.1.207
Maintainer reply ✓ Yes — bcherny
Activity 4 comments · opened Jul 13, 2026 · closed Aug 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator) responded on this thread — see the highlighted reply below.

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

In case of "You've reached your Fable 5 limit. Run /usage-credits to continue or switch models with /model.", the session cannot be closed in a way that allows you to continue with a cheaper model in a new session. Due to the forced model switch, the AI agent has to re-read the entire session, wasting a lot of tokens unnecessarily. It is not clear how much of Fable's recent work is lost, but it seems to me that it is a lot. I ask for a fix for this error and I would like to point out that I am not happy about my wasted tokens.

Clean session closure offer is also missing when the 5-hour and weekly limits are exceeded. This should be available even though there are no tokens left to be used at that time.

What Should Happen?

When the limit of a 5 hours or a weekly token or model usage is reached, Claude Code should offer to close the current session cleanly, allowing it to continue in a clean session with a different model or even manually.
Such session closing should not cost more tokens.

Error Messages/Logs

You've reached your Fable 5 limit. Run /usage-credits to continue or switch models with /model.

Steps to Reproduce

Just reach any limit in a long session.

Claude Model

Other

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.207

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

3 Comments

PsYcGoD · 3 months ago

This has burned me multiple times - session hits limit mid-task, work is lost, no clean way to save state.
What I started doing preventatively:

  1. Track token usage locally - I wrap commands and log estimated tokens per exchange. When I see I'm at ~70% of typical session budget, I know to checkpoint.
  2. Auto-checkpoint on large operations - before any command that might produce big output (test suites, builds, large file reads), I commit or stash work-in-progress. If the session dies, at least the code changes survive.
  3. Compress command outputs - most of my limit issues came from verbose tool output, not conversation length. A failing test suite can dump 100K+ tokens. Compressing that to just the failure messages dropped my limit-hits by 80%.

Would love a proper "session running low, want to save state?" prompt from the UI though. Hitting the wall unexpectedly is the worst UX.

ThatDragonOverThere · 3 months ago

Yes — this is exactly what I've been documenting this weekend (full write-up: #76987). Concrete numbers from my own case:

Hit the Fable limit mid-session. There was no clean closure offered — I had to give it explicit instructions to switch models myself, it did not happen automatically. On the next resume of that same window, the cost was real and measurable: two screenshots of the usage panel taken 2h21m apart (same session, confirmed by the countdown timer landing on the identical boundary both times) showed weekly Fable-only usage going from 8% to 20% — nearly tripled — while zero actual work happened in that window. That lines up with your point about not knowing how much work is lost: I can't tell either, only that the meter moved a lot and the output didn't.

+1 on the ask: a clean "you're about to hit the limit, want to checkpoint and continue in a new session" prompt, at zero token cost, would have prevented this outright.

bcherny collaborator · 1 month ago

Switching with /model keeps your whole conversation — the new model continues from the same context, so nothing needs to be re-read and no work is lost. If you'd rather stop and come back later, just exit: the session is saved automatically and claude --continue (or /resume) reopens it, optionally on a different model with claude --continue --model <name>. Neither step spends extra tokens.

Docs: https://code.claude.com/docs/en/model-config

🤖 Generated with Claude Code

Showing cached comments. Read the full discussion on GitHub ↗