Rate limit terminates active session with no save opportunity — silent data loss

Resolved 💬 4 comments Opened Feb 14, 2026 by MurderMre Closed Feb 18, 2026

Description

When the weekly usage limit is reached during an active Claude Code session, the session is terminated immediately with a red error message. The AI model receives no warning and no final turn to save work in progress.

This causes:

  1. Silent data loss — any work done since the last manual save is gone
  2. No log entry — the session log is not updated because the model never gets a chance to write
  3. No session transcript — crash recovery transcripts are also lost
  4. No forensic trail — after the fact, there is zero evidence of what was happening when the session died

Impact

  • User missed a real-world deadline because they were locked out for the rest of the week
  • User had been running ~14 Opus sessions across 3 days (complex data ingestion project with 5.7M+ DB rows) and had no visibility into how fast quota was being consumed
  • The red limit message was the first and only indication — no progressive warnings
  • User believed they were at ~50% usage (based on Claude Desktop dashboard), but Code hit 100%. It's unclear if Desktop and Code share the same quota pool or if there's a metering discrepancy.

Expected Behavior

  1. Progressive warnings: At 50%, 75%, 90% of weekly quota, show a visible warning in the CLI (yellow/orange) so the user can plan around it
  2. Graceful shutdown: When the limit is about to be hit (e.g., <2% remaining), give the AI model ONE final turn to save state, update logs, and commit — before terminating
  3. Usage visibility: Provide a command (claude usage or similar) that shows current weekly consumption, remaining quota, and reset date
  4. Per-session cost estimate: Show approximate quota consumed per session so users can gauge burn rate
  5. Desktop vs Code quota clarity: Make it clear whether Desktop and Code share the same pool, and show unified usage across both

Current Workaround

User has written extensive context-window-aware save instructions in CLAUDE.md (checkpoint at 75%, wind down at 85%, hard stop at 90%), but these only protect against context window exhaustion — not platform rate limits, which kill the session externally with no warning to the model.

Environment

  • Windows 11 Pro 10.0.26200
  • Claude Code CLI (Opus 4.6 model)
  • ~14 sessions over 3 days across 3 projects
  • Max subscription (weekly quota model)
  • Stats: 21 sessions, 8,163 messages, 1,401 tool calls, 209M cache-read tokens in 4 days

🤖 Generated with Claude Code

View original on GitHub ↗

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