v2.1.12 regression: UI freezes after work completes or on session resume (message rendering fix broke state recovery)

Resolved 💬 7 comments Opened Jan 20, 2026 by rosepark4861 Closed Mar 1, 2026

Summary

After upgrading to v2.1.12, Claude Code sessions freeze with an unresponsive terminal after completing work or when resuming sessions. The process remains alive (0% CPU, sleeping on epoll_wait) but the UI is completely frozen - no scrolling, no keyboard input, no cursor.

This is a regression introduced in v2.1.12. Sessions on v2.1.9 with identical WebSocket disconnect patterns recovered successfully.

Version Information

  • Affected version: 2.1.12
  • Last working version: 2.1.9
  • Platform: Linux (Ubuntu 6.8.0-90-generic)
  • Terminal: VS Code integrated terminal via Remote SSH

Evidence: Version Correlation

| Date | Version | WebSocket Disconnects | Outcome |
|------|---------|----------------------|---------|
| Jan 16 | v2.1.9 | 14 disconnects | RECOVERED |
| Jan 19 | v2.1.12 | 10 disconnects | HUNG |
| Jan 19 | v2.1.12 | 3 disconnects | HUNG |
| Jan 20 | v2.1.12 | 12 disconnects | HUNG |
| Jan 20 | v2.1.12 | 4 disconnects | HUNG |
| Jan 20 | v2.1.12 | 7 disconnects | HUNG |

Analysis of 62 debug logs confirms the pattern: sessions with MCP WebSocket disconnects recovered on v2.1.9 but hang on v2.1.12.

Suspected Cause

The v2.1.12 changelog entry "Fixed message rendering bug" likely introduced a regression in UI state recovery. Both affected scenarios involve the UI needing to establish a "ready for input" state:

  1. After work completes: SubagentStop → ~55s idle timeout → idle_prompt hook completes → UI frozen
  2. On session resume: "Resuming conversation" displays → UI frozen

Symptoms

Live session hang:

  • Work completes successfully (session file has stop_hook_summary and turn_duration entries)
  • All hooks complete with status 0
  • Process stays alive doing background tasks (version checks every 30 min)
  • Terminal UI completely unresponsive

Resume hang:

  • Session picker works normally
  • "Resuming conversation" message appears
  • UI freezes before rendering restored session

Debug Log Pattern (all hung sessions)

[timestamp] SubagentStop event
[+50-56 seconds]
[timestamp] Getting matching hook commands for Notification with query: idle_prompt
[timestamp] Notification:idle_prompt hook completed with status 0
[END OF LOG - UI frozen, no further entries]

Trigger Condition

The hang is triggered by MCP "ide" WebSocket instability. In my environment (VS Code Remote SSH to Ubuntu VM), the WebSocket connection experiences rapid disconnect/reconnect cycles:

19:21:40.320 - MCP "ide" connected
19:21:40.336 - Disconnected (16ms later)
19:21:40.388 - Reconnected
19:21:40.405 - Disconnected (17ms later)
[pattern repeats 5-7 times before stabilizing]

This instability existed before v2.1.12 but sessions recovered. The v2.1.12 rendering changes appear to have broken recovery from this condition.

Reproduction

  1. Use VS Code Remote SSH (or any environment with MCP WebSocket instability)
  2. Run Claude Code v2.1.12
  3. Give it a task that completes (tool calls, file edits, etc.)
  4. After completion, terminal freezes ~55 seconds later

Frequency: 5 out of 5 sessions with WebSocket disconnects hung on v2.1.12. Previously (v2.1.9), 0 out of multiple sessions with disconnects hung.

Workaround

Downgrade to v2.1.9 (untested but expected to work based on evidence).

Diagnostic Data

I have preserved debug logs and session files for all affected sessions. Happy to provide any additional information.

---

Related Issues

  • Possibly related to #19195 (background task queue operations after completion)
  • Different from #16251 (large session file bug - that shows 100% CPU, this shows 0% CPU)

View original on GitHub ↗

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