[BUG] Connection drops and recent messages lost after re-logging in
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?
When reconnecting to a Claude Code session (remote/mobile access) after a disconnect ("Cannot connect to computer"), several of the most recent messages/turns from right before the disconnect are lost. Severity varies — sometimes only ~5 recent messages, other times close to a full day's worth of conversation/work.
This is NOT caused by:
- Host PC sleep/standby (confirmed sleep timeout is set to "Never" on the host machine)
- Concurrent/duplicate logins (reproduces even with sequential single-session logins only)
- A specific machine (reproduces across different physical computers)
Since there's no indicator of what was or wasn't saved before the drop, in-progress project work becomes impossible to reliably continue after any disconnect.
What Should Happen?
On reconnect, the session should restore up to the actual last durably-saved turn, and any message that failed to persist before a disconnect should be clearly flagged to the user (e.g. "not saved") instead of silently disappearing — so in-progress work is never lost without warning
Error Messages/Logs
No stack trace/console error available. The only message shown to the user is the in-app disconnect notice:
"컴퓨터에 연결할 수 없습니다
절전 모드이거나 오프라인 상태일 수 있습니다. 다시 연결되면 이 세션이 재연결됩니다."
(Translation: "Cannot connect to computer. It may be in sleep mode or offline. This session will reconnect once reconnected.")
No error is shown when the reconnect happens and recent messages turn out to be missing — the loss is silent.
Steps to Reproduce
- Start a Claude Code session via remote/mobile access to a host machine.
- Continue working normally until a disconnect occurs ("컴퓨터에 연결할 수 없습니다" / "Cannot connect to computer, may be asleep or offline").
- Reconnect once the host is available again.
- Observe that the most recent messages before the disconnect are missing, and work cannot be resumed from where it left off.
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
Not working
Claude Code Version
2.1.252
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
OS: Windows 11
Note: reproduced on multiple different machines, not tied to one device's power settings.