[Bug] Session becomes unresponsive after machine restart; messages silently dropped
Bug Description
# Bug report: Claude desktop app opens a window to a headless session; typed messages are ignored
Draft 2026-10-14. App: Claude desktop (Code tab) on macOS (Darwin 25.6.0), bundled Claude Code engine 2.1.295.
## Summary
After a machine shutdown, a session that was started through a project thread ("Run Pudlo annotation") still opens in the desktop app as a normal chat window. But nothing is running behind it. Messages typed in the window, or sent from the project thread, are never delivered. The app gives no error and no sign that the session is dead.
## Steps to reproduce (as observed)
1. Start a session from a project thread; it runs on the Mac as a Remote Control session (startedViaRemoteControl: true). Session: local_d6f763ac-43e8-4e70-8105-64d5c8fa02fa, cloud session cse_01BrvygdjSukkUocL9rDwcdB.
2. The Mac shuts down abruptly (battery) at about 20:59 UTC; the app restarts at 21:03 UTC ("Previous run did not exit cleanly").
3. Open that session in the app and type a message (twice), and also send "ping: A" in its project thread at 21:34:52 UTC.
## Expected
Either the session resumes and answers, or the app shows that the session is gone and offers a way to restart it.
## Actual
- The window opens and accepts input, but no turn starts. The session's record file in the app's session store stays unchanged (last write 20:45 UTC), and its transcript ends 20:45:41 UTC.
- No Claude process exists for the session after the restart.
- The session reports isRunning: false, remoteControlState: off, and cannot be switched back on (startedViaRemoteControl: true, toggle locked).
- The app log (main.log, remote-control.log) records no error, no send failure and no activity for the session after the restart. The user's messages leave no trace.
- Meanwhile, the Mac's Remote Control poller admits only brand-new cloud sessions after the restart (three were admitted at 21:07, 21:17 and 21:24 UTC). The old session was never re-admitted, so messages addressed to it have no receiver. The remote-control watcher also logged repeated "connecting -> backoff" cycles (30 in 30 minutes, none reaching "connected").
## Cloud-side evidence (project coordinator)
- After the shutdown, the cloud listed the session (cse_01BrvygdjSukkUocL9rDwcdB) as state "active", connected false, served false, with a note that the user's next message in the thread "starts it again with its transcript". That was false: messages at 21:04, 21:11, 21:13 and 21:34:52 UTC never started it.
- The project thread kept accepting messages with no error shown to the user.
- At 21:35:55 UTC the coordinator stopped and restarted the session for that thread; the new session (cse_01LGHmqpeX5PTVfi6wt5eHjd) started at once on the same Mac. So the device link worked and only the stale binding was dead.
- A separate diagnosis found the session's Remote Control "off and locked" in the Mac app, because the session was created from claude.ai.
## Impact
The user believes commands were sent to a live session and that a long job is being supervised. Messages were silently dropped, with no warning, for over ten minutes of attempts.
## Suggested fix
- Detect a session whose worker is gone and mark it dead in the app UI and in the project thread.
- Or re-admit and resume it on restart, or show an error when a send has no receiver.
- Log undelivered sends.
## Evidence
- Logs: ~/Library/Logs/Claude/main.log and remote-control.log (search the session ids above, and "admitted (new, tier poll)").
- Session store: ~/Library/Application Support/Claude/claude-code-sessions/.../local_d6f763ac-43e8-4e70-8105-64d5c8fa02fa.json.
## Where to send it
Per the current docs (troubleshooting page): run /feedback inside Claude Code to report to Anthropic, or open an issue at https://github.com/anthropics/claude-code/issues. Not verified: whether the Claude desktop app or the project app has its own feedback form; the docs I read do not name one.
Environment Info
- Platform: darwin
- Terminal: Apple_Terminal
- Version: 2.1.281
- Feedback ID: 57f73507-315f-49e7-aad7-c4ef9264af4e
Errors
[]