claude-code - 💡(How to fix) Fix TUI: detaching from attached session via ← in agent view leaves terminal unresponsive on Windows (2.1.143)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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.

Root Cause

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.

Fix Action

Workaround

Downgrading clears it:

claude install 2.1.142

2.1.142 works reliably for me — agent view attach/detach is fluid, no hang. Stays clean through repeated cycles.

Code Example

claude install 2.1.142
RAW_BUFFERClick to expand / collapse

Summary

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.

Repro

  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.

Environment

  • Claude Code: 2.1.143 (native installer, ~/.local/bin/claude.exe, FileVersion 2.1.143.0, ~219 MB Bun binary)
  • OS: Windows 11 Pro, build 26200
  • Terminal: Windows Terminal 1.24.11321.0
  • Shell: PowerShell 7.6.1 (pwsh)
  • Hardware: AMD Ryzen 9 7950X3D, 128 GB RAM, Radeon RX 7900 XTX (drivers current)
  • Daemon: healthy (claude daemon status reports control.sock reachable, 1 bg worker, no errors)

Same setup on Linux (SSH)

I tested the same workflow on a Linux box (Arx, my home server) over SSH — no freeze. Confirms this is Windows / Windows Terminal-specific, not an issue with my account or background sessions themselves.

Workaround

Downgrading clears it:

claude install 2.1.142

2.1.142 works reliably for me — agent view attach/detach is fluid, no hang. Stays clean through repeated cycles.

Related

  • #59750 — broken render + dead input on cold claude agents launch (PS 5.1 + 7 both affected per my comment there)
  • #58579 — TUI line stacking/overlap on Windows Terminal 2.1.140
  • Possibly #52410, #19637, #16578 (long-running Windows TUI render lineage)

Happy to provide logs (~/.claude/daemon.log, a recording, anything else useful) — just let me know what's needed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING