Memory gauge forces chat termination at 0% while 60%+ token budget remains unused - rendering majority of paid tokens unusable

Resolved 💬 5 comments Opened Nov 4, 2025 by hoiung Closed Jan 9, 2026

Issue Summary

Claude Code's memory gauge reaches 0% and forces chat termination when 60-65% of the token budget remains available, making the majority of purchased tokens unusable and severely disrupting workflows.

Severity: High

Impact:

  • 60% of token budget becomes completely unusable - paying for 200k tokens but can only use ~80k
  • Forced workflow interruptions despite ample resources remaining
  • Unnecessary context loss requiring premature handovers
  • Productivity impact - complex multi-stage tasks interrupted mid-work

Current Behavior (Actual)

  1. At ~35% token usage (~70k/200k tokens used):
  • Memory gauge shows "10% remaining"
  • Warning appears: "Memory at 10% - consider using /compact"
  • Token budget correctly shows 65% remaining (130k tokens available)
  1. At ~40% token usage (~80k/200k tokens used):
  • Memory gauge reaches 0%
  • Chat freezes completely
  • Token budget still shows 60%+ remaining (120k+ tokens unused)
  • Only options: /compact (loses context) or start new chat
  1. Result:
  • Cannot use remaining 60% of token budget
  • Forced to abandon chat and start new session
  • Context loss disrupts complex workflows
  • Wasting 120k+ tokens per session

Expected Behavior

  1. Memory gauge should align with token budget
  • If 60% tokens remain, memory should reflect similar capacity
  • Both gauges should reach 0% at approximately the same time
  1. Chat should remain functional until token budget depleted
  • Should be able to use full 200k token allocation
  • No premature freezing with resources available
  1. Warnings should be accurate
  • Memory warnings should match actual resource availability
  • Should only force termination when genuinely out of resources

Reproduction Steps

  1. Start a new chat with Sonnet 4.5 (200k token budget)
  2. Engage in complex, multi-stage work (e.g., Issue #50 workflow with multiple subagents)
  3. Monitor both indicators:
  • Memory gauge (bottom of interface)
  • Token budget counter
  1. Continue working until memory shows 10% warning
  2. Note token budget still shows 65%+ remaining
  3. Continue until memory reaches 0%
  4. Observe: Chat freezes, but token budget shows 60%+ remaining

Frequency: Consistent - happens in every long session

Evidence from Recent Session

Session just completed (2025-11-04):

  • Work: Issue #50 - Modular docs restructure (complex multi-agent workflow)
  • Token usage at handover: ~84k/200k (42%)
  • Memory gauge status: "Consider using /compact" warnings appearing
  • Result: Forced to create checkpoint and start new chat despite 58% tokens remaining

Chat log excerpt:

<system_warning>Token usage: 83914/200000; 116086 remaining</system_warning>

116k tokens remaining, yet memory warnings forcing chat termination

Technical Details

Environment:

  • Model: Claude Sonnet 4.5 (claude-sonnet-4-5-20250929)
  • Token budget: 200,000 tokens
  • Platform: Windows (win32)
  • Claude Code version: Latest as of 2025-11-04

Usage Pattern:

  • Complex multi-stage workflows with Issue tracking
  • Multiple subagent launches (Task tool usage)
  • Structured development process with checkpoints
  • Typical session: 80k-100k tokens used before forced termination

Business Impact

Resource Waste:

  • Paying for 200k tokens but can only use ~40% before forced restart
  • 60% of purchased capacity is unusable per session
  • Equivalent to paying for a resource you cannot access

Workflow Disruption:

  • Complex tasks (like Issue #50: 47 file creation, verification, cross-referencing) get interrupted mid-work
  • Forced handovers create risk of context loss
  • Additional overhead: creating checkpoints, handover documentation, new chat startup
  • Reduces productivity - cannot complete work in single session

User Experience:

  • Frustrating to see 120k+ tokens available but chat frozen
  • Confusing mixed signals from UI (memory: 0%, tokens: 60%)
  • Undermines confidence in resource indicators

Additional Context

What makes this worse:

  • Cannot plan around it - memory gauge does not correlate to token usage predictably
  • /compact may temporarily help but loses valuable context
  • Starting new chat requires extensive handover documentation to maintain continuity
  • Particularly impacts structured workflows with multiple stages

Suspected Root Cause:

  • Memory gauge appears to track something other than token usage
  • Possibly: conversation history length, subagent spawns, or context window separately from tokens
  • Regardless: these should be aligned or clearly labeled as separate limits

Suggested Fix

  1. Align memory gauge with token budget
  • Both should reach depletion at same time
  • Or clearly label if they track different resources
  1. Increase memory capacity to match token budget
  • If memory is separate limit, it should support full 200k token usage
  1. Improve warning accuracy
  • Only show "low memory" when actually running out of usable capacity
  • Do not freeze chat while significant token budget remains
  1. Better documentation
  • If memory and tokens are intentionally separate, document this clearly
  • Explain what memory tracks vs tokens

Workarounds Currently Using

  1. Proactive handovers - stop at 40% token usage instead of continuing
  2. Extensive checkpoint documentation - prepare for forced restarts
  3. Structured Issue tracking - document everything in GitHub Issues for continuity
  4. Avoiding long sessions - break work into smaller chunks despite overhead

These workarounds reduce productivity and waste paid resources.

---

Request

Please investigate the misalignment between memory gauge and token budget. Users should be able to utilize their full token allocation without premature chat termination.

This issue makes 60% of each chat session unusable despite resources remaining.

Thank you for looking into this.

View original on GitHub ↗

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