[BUG] ESC key corrupts input state — submitted prompt disappears, requires chaser prompt, chaser then hangs for 3+ minutes burning ~1K tokens

Resolved 💬 4 comments Opened Feb 27, 2026 by el-jefe-9000 Closed Feb 28, 2026

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?

Pressing ESC at any point during a session corrupts the input buffer state, causing a repeating cycle:

  • Press ESC (to interrupt or for any reason)
  • Type next prompt and submit — prompt disappears from the UI with no response
  • Send a throwaway "chaser" prompt (e.g. "hi") — the original prompt now appears and Claude answers it correctly
  • The chaser prompt then fires, consuming ~1,000 tokens
  • Claude hangs for 3+ minutes with no visible activity
  • User presses ESC to break out — and the cycle repeats from step 1

What Should Happen?

ESC interrupts cleanly. The next submitted prompt is processed normally with no input state corruption.

Error Messages/Logs

Steps to Reproduce

  1. Start a Claude Code session
  2. Press ESC at any point (during input, during a response, etc.)
  3. Type a prompt and hit Enter
  4. Observe prompt disappears with no response
  5. Send any follow-up message
  6. Observe original prompt processes correctly, then chaser hangs

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.59 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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