Extended thinking burns unlimited tokens on 'continue' with large context — no output, no timeout, requires SIGKILL

Resolved 💬 4 comments Opened Apr 28, 2026 by MrNobodySMC Closed May 2, 2026

Bug Report

What happened

Resuming a large session (~5MB JSONL context) with the single word continue triggered unbounded extended thinking that ran for 40+ minutes, consumed ~50% of the user's monthly usage limit, and produced zero output — no text, no tool calls, no code.

Reproduction steps

  1. Have a long session with large context (5MB+ JSONL)
  2. Session hits usage limit mid-task and pauses
  3. Next day, type continue to resume
  4. Claude reloads the entire conversation history into a new extended thinking request
  5. Extended thinking runs indefinitely with no output

Observed behavior

  • Three separate assistant turns over 40 minutes: 2026-04-28T11:23:41, 2026-04-28T11:31:46, 2026-04-28T11:41:26
  • All three turns contained only empty <thinking> blocks — no text, no tool calls
  • SIGINT (Ctrl+C) was caught and ignored by the process (SigCgt includes signal 2)
  • Required kill -9 (SIGKILL) to terminate
  • Session PID: 12852, session ID: e88176e4-994d-478f-b477-30a437d2b753
  • Claude Code version: 2.1.119

Expected behavior

  • Extended thinking should have a maximum duration / token budget per turn
  • If thinking exceeds a threshold with no output, the turn should be aborted and the user notified
  • SIGINT should interrupt an in-flight extended thinking request, not be silently swallowed
  • continue on a large context should not unconditionally trigger extended thinking

Impact

~50% of user's monthly usage limit consumed with zero productive output. The in-flight API request continued billing even after the user sent Ctrl+C, because the signal was ignored.

Root cause hypothesis

When continue is sent to a session with a very large cached context, Claude attempts to re-plan the entire prior conversation before acting. With extended thinking enabled, this planning phase has no output requirement and no token cap enforced client-side, allowing it to spin indefinitely.

Suggested fix

  • Add a per-turn extended thinking timeout (e.g. 5 min) that forces a partial output or abort
  • Make SIGINT cancel the current in-flight streaming request, not just queue an interrupt
  • Warn the user when resuming a session with context >X tokens that extended thinking may be costly

View original on GitHub ↗

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