Input field stops accepting keystrokes after executing suggested command / receiving late agent results
Description
The input field becomes completely unresponsive after certain operations, requiring a full session restart. This has happened twice today on v2.1.50. Characters are not accepted, though the text cursor still shows (I-beam cursor appears over the input area and briefly disappears on keypress, suggesting the terminal/TUI is still running but the input component lost focus).
Environment
- Claude Code 2.1.50
- Linux (Ubuntu, kernel 5.15.0)
- Terminal: gnome-terminal
Reproduction
Case 1
- Completed a large multi-step task (git commit, push, wiki update via MCP)
- Two background agents returned results after the main task was already done
- Started typing next prompt → input frozen
Case 2
- Completed a large task, Claude suggested "git push" in the input field (autocomplete suggestion)
- Pressed Enter to execute the suggestion
- Git push completed successfully
- Started typing immediately after → input frozen
Common pattern
Both cases involved a larger task with many tool calls completing, followed by immediately typing the next prompt.
Observed behavior when frozen
| Key | Behavior |
|-----|----------|
| Regular keys | I-beam cursor briefly disappears on keypress, no character appears |
| ESC | Cursor briefly disappears and reappears (seems to trigger re-render, but doesn't fix state) |
| Ctrl+C | Cursor disappears, only reappears on mouse movement (signal seems to reach a process but not the input handler) |
None of these restore input functionality. Only killing and restarting the session works.
Suspected cause
The input component (Ink/React TUI) appears to lose focus after:
- Executing an autocomplete suggestion, OR
- Late-arriving background agent results triggering a re-render
The common factor may be asynchronous state updates (agent results, command completion) racing with the input component's focus state.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗