claude-code - 💡(How to fix) Fix Session cut mid-task by credit limit — no warning, context lost, costly model switch

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • Or at minimum: a clear error message explaining why the session ended, not a silent cut

Root Cause

For long coding sessions with file modifications, a sudden cut without warning can leave:

  • Uncommitted partial changes with no record of what was being worked on
  • Expensive model sessions that produced nothing billable
  • Wasted time reconstructing context in the next session
RAW_BUFFERClick to expand / collapse

Problem

Two related issues happened in the same day:

1. Opus 4.8 consumed 2 full sessions (~20€) without completing any work

I was working on a multi-file debugging task. Claude Opus 4.8 was making progress, then the session was cut by the credit limit. I restarted — same thing happened again. Two sessions consumed, ~20€ spent, zero commits produced.

Claude Sonnet 4.6 then had to reconstruct the entire context and redo the work from scratch.

2. Session cut mid-task at 38% with no warning

A separate session (Sonnet 4.6) was interrupted at 38% completion while actively editing files. No warning was shown before the cut. The modified files were uncommitted, so all in-progress work was in an undefined state until the next session reconnected and reconstructed the context from git diff.


Expected behavior

  • Low credit warning shown in the UI before a session is terminated, with enough time to commit work-in-progress
  • Or at minimum: a clear error message explaining why the session ended, not a silent cut

Why this matters

For long coding sessions with file modifications, a sudden cut without warning can leave:

  • Uncommitted partial changes with no record of what was being worked on
  • Expensive model sessions that produced nothing billable
  • Wasted time reconstructing context in the next session

Environment

  • Platform: Claude Code (desktop app, Windows 11)
  • Models affected: Claude Opus 4.8 (credit drain), Claude Sonnet 4.6 (mid-task cut)
  • Task type: multi-file debugging across a Node.js/Electron project

Suggestion

A simple warning banner before the session is cut would prevent most of this friction, e.g. "⚠ Low credit — consider committing your work".

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

  • Low credit warning shown in the UI before a session is terminated, with enough time to commit work-in-progress
  • Or at minimum: a clear error message explaining why the session ended, not a silent cut

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Session cut mid-task by credit limit — no warning, context lost, costly model switch