[BUG] Regression: TUI: detaching from attached session via ← in agent view leaves terminal unresponsive on Windows (#59814)

Open 💬 2 comments Opened Jun 8, 2026 by Trojaner

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?

A regression of the following fixed issue is happening:
https://github.com/anthropics/claude-code/issues/59814

This issue was marked as fixed in 2.1.144 but I am currently facing the same issue in Visual Studio Code Insider's Integrated PowerShell terminal with Claude Code 2.1.168 (latest as of writing).

Summary from original issue:

On 2.1.143, detaching from an attached session inside claude agents via leaves the entire terminal completely unresponsive on Windows. No keystroke (arrow keys, Enter, Space, Esc, Ctrl+C, Ctrl+Z, Ctrl+Break) is accepted. The only recovery is closing the Windows Terminal tab. This is distinct from #59750 (broken render + dead input from cold claude agents launch) in that the agent view opens, renders, and accepts input normally until the attach → detach cycle is performed. After that, the terminal is dead. Likely related to the 2.1.143 fix: > Fixed: on Windows, pressing ← in claude agents while a response was streaming could leave the agents list unresponsive to all input The streaming-specific fix appears not to cover the more general detach path — the bug now reproduces deterministically regardless of whether a response is in flight.

What Should Happen?

The issue should be fixed and the terminal should not become unresponsive to keyboard inputs. Only mouse works.

Steps to Reproduce

Repro from original issue:

1. claude agents opens cleanly with at least one running background session in the list. 2. Select a session and press Enter (or ) to attach. The session takes over the terminal normally. 3. On an empty prompt, press to detach back to the table. 4. Agent view repaints, but the input loop is dead. No key produces any response. 5. Terminal tab must be killed. Also tried Ctrl+Z (documented as the immediate-detach fallback in the docs) — same hang.

Note: the regression was observed in VS Code Insiders Integrated Terminal (PowerShell)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.144 (original fixed version)

Claude Code Version

2.1.168

Platform

Anthropic API

Operating System

Windows 11 25H2 Build 26200.8524

<details>
<summary>winver dialog</summary>
<img width="684" height="364" alt="Image" src="https://github.com/user-attachments/assets/3ed2f896-e0c7-4355-9fc9-d8f9795bd812" />
</details>

Terminal/Shell

Visual Studio Code Insiders (1.124.0) Integrated Terminal - PowerShell 7.6.2

<details>
<summary>VS Code About dialog</summary>
<img width="571" height="408" alt="Image" src="https://github.com/user-attachments/assets/76f3e724-82f8-4bb0-b13f-4f9b264a2de3" />
</details>

View original on GitHub ↗

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