[BUG] Session doesn't recover after host sleep/wake — silently swallows prompts
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?
I had a Claude Code panel open in a remote/cloud dev workspace that auto-suspends after ~10 minutes of idle time and auto-resumes on reconnect. The workspace went idle, auto-suspended, and later auto-resumed. I did not close/reopen the panel across that cycle — I just typed a new prompt into the still-open one.
The panel accepted the prompt (normal "working" state) but never produced any response — no text, no tool calls — for over an hour. I tried again about an hour later in the same panel; same result. Only closing that panel/tab and starting a brand-new session in the same workspace fixed it — that worked immediately.
Happened twice in one day, and I believe it also worked correctly on a previous version (regression), though I can't pin down which version last handled it correctly.
Diagnosis after the fact, from the affected session's local transcript and process list:
Host uptime showed a boot only ~9 minutes before the first stuck prompt — consistent with sleep/wake.
A zombie/defunct process matching the Claude Code CLI binary was present, timestamped ~1 min after that boot — the backend behind the already-open panel appears to have died/been orphaned across the cycle.
The session's local JSONL transcript showed my prompt enqueued and immediately dequeued (as if accepted) at two points ~66 minutes apart, with zero assistant/tool activity between either one — input was captured but nothing was running to process it.
What Should Happen?
Either (a) detect on reconnect that the backend for an open session is dead and transparently restart it, or (b) surface a clear "session disconnected / needs reload" error instead of silently accepting input that's never processed.
Error Messages/Logs
None shown in the UI — that's the core problem. Only after-the-fact evidence: a defunct process in ps aux, and enqueue/dequeue transcript entries ~66 min apart with no assistant activity between them.
Steps to Reproduce
- Open Claude Code in a workspace that auto-suspends on idle.
- Leave the panel open; let it idle long enough to auto-suspend.
- Let the workspace auto-resume without closing/reopening the panel.
- Type a new prompt into the still-open panel.
- Observe: prompt appears accepted, but no response ever arrives, no error shown.
- Workaround: close the panel/tab, start a new session — works immediately.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.210 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Cloud dev workspace platform: Lightning.ai Studio, which auto-suspends after ~10 min idle and auto-resumes on reconnect — very likely the trigger. Expect this to reproduce on any host with a similar suspend/resume policy. The stuck panel gave zero visual indication anything was wrong.