[BUG] Remote-control session loses context after restart while web UI continues displaying conversation as continuous

Open 💬 1 comment Opened Jun 22, 2026 by takayamaki

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 a claude remote-control process is restarted (e.g. by a supervisor daemon), the web UI at claude.ai/code continues displaying the prior conversation in the same session view, at the same URL. The user can send a new message, which appears inline as a continuation.
However, the backend creates a fresh session with no prior context — the assistant responds as if it has never seen the earlier messages.

On shutdown, the log outputs:
Environment preserved. Restart claude remote-control to reconnect existing sessions.
This suggests session continuity is intended, but the new session receives none of the prior conversation.

What Should Happen?

Either:

  1. The resumed session should receive the prior conversation context so the assistant can continue the conversation, or
  2. The web UI should clearly indicate that the session was reset (e.g. a separator, a new conversation view, or a warning) instead of silently appending to the old conversation

Error Messages/Logs

[01:29:38] Environment preserved. Restart `claude remote-control` to reconnect existing sessions.

supervisor:
[2026-06-23T01:34:20+09:00] supervisor entered (pid=685651)
[2026-06-23T01:36:20+09:00] process missing, starting
[2026-06-23T01:36:20+09:00] remote-control started

Steps to Reproduce

  1. Start claude remote-control --name <name>
  2. Connect from claude.ai/code and exchange a few messages to establish context
  3. Kill the remote-control process
  4. Let it restart (or restart manually)
  5. In the same web UI session (same URL, no page reload), send a message referencing the prior conversation
  6. Observe: the assistant has no knowledge of the prior messages. A new JSONL session file is created on disk, confirming the backend started a fresh session.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.185

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Non-interactive/CI environment

Additional Information

Web UI screenshot — the conversation appears continuous, but the post-restart response has no knowledge of the pre-restart context:
<img width="1920" height="2088" alt="Image" src="https://github.com/user-attachments/assets/767e6072-7efe-4df7-bb8c-d1cf9f3ca9bc" />

Session logs on disk — two separate JSONL files confirm the backend created a new session. The post-restart file (1031ab69...) contains no messages from the pre-restart conversation (d95554c1...):
<img width="2127" height="217" alt="Image" src="https://github.com/user-attachments/assets/ac972b61-2d28-4356-952b-c4ed726bad86" />

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗