[BUG] Windows: Remote Control session archives when the terminal closes; desktop Unarchive fails with HTTP 409 ("Failed to restore session")
[BUG] Windows: Remote Control session archives when the terminal closes; desktop Unarchive fails with HTTP 409 ("Failed to restore session")
What happened
A Claude Code CLI session with Remote Control (/rc) enabled is being continued from the Windows desktop app. When the hosting terminal window is closed, the session immediately flips to Archived in the desktop app. Clicking Unarchive shows a "Failed to restore session" toast; the desktop web log records the underlying failure as HTTP 409 from the unarchive endpoint:
2026-08-03 23:00:10 [error] [REACT_QUERY_CLIENT] QueryClient error: {"name":"Error","message":"unarchive failed: 409","stack":"Error: unarchive failed: 409\n at Object.unarchive (https://assets-proxy.anthropic.com/claude-ai/v2/assets/v1/shared-10-DRHP9dWu.js:2:228031)\n at async Object.mutationFn (https://assets-proxy.anthropic.com/claude-ai/v2/assets/v1/shared-10-DRHP9dWu.js:2:244173)"}
2026-08-03 23:07:21 [error] [REACT_QUERY_CLIENT] QueryClient error: {"name":"Error","message":"unarchive failed: 409", ...}
2026-08-03 23:08:22 [error] [REACT_QUERY_CLIENT] QueryClient error: {"name":"Error","message":"unarchive failed: 409", ...}
(from %APPDATA%\Claude\logs\claude.ai-web.log)
The only recovery is relaunching the terminal, resuming the CLI session, and then fully quitting and restarting the desktop app. The Unarchive affordance is effectively dead: it is offered, fails with a vague toast, and the 409 is never surfaced to the user.
Repro steps
- Windows 11, start
claudein a terminal, enable Remote Control (/rc). - Open the session in the Claude desktop app; exchange a few messages (works).
- Close the terminal window.
- Desktop app: the session immediately shows "This session is archived. Unarchive it to continue the conversation."
- Click Unarchive → toast "Failed to restore session"; log shows
unarchive failed: 409. Repeatable (three attempts, three 409s: 23:00:10, 23:07:21, 23:08:22).
Environment
- Claude Code CLI 2.1.220
- Claude desktop app (Windows, MSIX / evergreen): 1.24012.11.0 — auto-updated from 1.22209.3.0 at 2026-08-03 22:59 local, per the AppXDeployment event log; the behaviour also reproduced on 1.22209.3.0
- Windows 11 Home 10.0.26200
- Plan: Max
Notes / likely relation to #81466
#81466 (macOS) traced the same auto-archive-on-end behaviour to a desktop build installed 2026-07-19, with the client sending end_session { "reason": "archived" } when a session ends — including in bulk on app quit. This report appears to be the Windows + Remote Control manifestation of the same change, with an extra defect on top: the desktop Unarchive path fails with 409, while #81466 found the raw API endpoint (POST /v1/code/sessions/<id>/unarchive) returns 200 and works. So the server supports unarchiving; the desktop app's restore flow is what fails.
Two distinct problems:
- Archive-on-close of Remote Control sessions. The docs say the session ends when the local process stops, but ending ≠ archiving. Archived sessions vanish from mobile/web lists and become unreachable (#81466, #67811, #71616, #75941).
- Broken Unarchive in the desktop app. The button is shown, the backend replies 409, the UI reports only "Failed to restore session", and there is no working recovery path in the UI (#67835, #43304, #57586).
Expected
- Closing the terminal should leave the session inactive/disconnected but listed and resumable, not archived, or archiving should be opt-in (#60043).
- If a session is archived, Unarchive in the desktop app should work (the server endpoint evidently does), or the button should not be offered; either way the actual error should be surfaced, not a generic toast.
Related
#81466, #67811, #71616, #67835, #59449, #57586, #60043, #50147