[BUG] Remote Control: new session from claude.ai reuses the pre-created session's conversation (deterministic v5 session id)
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?
With claude remote-control running in default mode (--spawn same-dir, --create-session-in-dir on), creating a new session from claude.ai/code against that directory does not create a new conversation. The message is appended to the pre-created session's existing conversation, and the reply is generated with that conversation's full history in context.
The mechanism appears to be that the rc-spawned session gets a deterministic (UUIDv5) session id, while every session started by hand gets a random UUIDv4. Note the version nibble (first character of the third group):
UUIDv5 48b20cc7-0eed-542d-....-............ <- rc-spawned (entrypoint: sdk-cli)
UUIDv4 a5dd9831-fe31-4a76-....-............ <- terminal session
UUIDv4 1de85060-6cc5-4b90-....-............ <- terminal session
UUIDv4 17e7f85b-07de-4f34-....-............ <- terminal session
UUIDv4 6abbc4e0-b966-4d51-....-............ <- terminal session
UUIDv4 f1e6a7fc-33f4-4743-....-............ <- terminal session
A v5 id is a hash of fixed inputs, so all remote sessions opened against a given directory appear to collapse onto one local session id, one transcript file, one conversation.
Impact is not cosmetic. Because the "new" session inherits the whole prior conversation:
- the reply is answered in the context of unrelated earlier work,
- every new remote session pays the token cost of the accumulated history on its first message,
- the single transcript grows without bound. Mine reached 9.4 MB / 4342 records over two days.
This may share a root cause with #86868 (--no-create-session-in-dir prevents session resume). Both are consistent with the bridge keying sessions by directory rather than by session identity: with the pre-created session present, new sessions collapse into it; with it absent, prior sessions fail to re-attach.
What Should Happen?
Creating a new session from claude.ai/code should start a new conversation with empty context and its own transcript file, the same as running claude in a terminal does.
Error Messages/Logs
No error is emitted. The failure is silent — the session looks new in the UI, but the model answers with prior context.
Measured before/after around a single new-session creation, counting transcripts in ~/.claude/projects/<project>/:
count before: 67 transcripts count after: 67 transcripts
new files: none
<rc-session-uuid>.jsonl 9,364,351 -> 9,366,802 bytes (+2,451)
The test message was appended to the existing thread, and the assistant replied with a summary of work from the previous two days rather than treating it as a fresh conversation:
2026-08-16T20:16:17 user test 1234, ignore
2026-08-16T20:16:29 assistant Noted - nothing to do. Standing state, unchanged: the loop is
stopped, no monitors running, [...]
Parsing that transcript after the new session was created still shows a single conversation:
records: 4342
roots (parentUuid=None, type=user): 1
distinct sessionId values: 1
Steps to Reproduce
- In a directory, run
claude remote-control(defaults:--spawn same-dir,--create-session-in-diron). One session is pre-created. - Record the transcript files:
ls ~/.claude/projects/<project-slug>/*.jsonl - From claude.ai/code, create a new session against that directory and send any message.
- List the transcripts again.
Expected: a new .jsonl file. Actual: no new file; the pre-created session's .jsonl grows, and the reply carries that session's prior context.
The session id of the rc-spawned session can be read from ~/.claude/sessions/<pid>.json — it is a v5 UUID, where terminal sessions are v4.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.233
Platform
Claude subscription (Team)
Operating System
Ubuntu 26.04 LTS, Linux 7.0.0-1010-aws (x86_64)
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗