[BUG] Remote Control sessions on my own machine get the cloud-container system prompt ("isolated, ephemeral container")
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?
Sessions started by claude remote-control on my own machines get a system prompt section that describes Claude Code on the web. It says the session runs in the cloud in an ephemeral container. None of it is true for a self-hosted Remote Control server.
The appended text starts:
# Your current remote execution environment
You are running Claude Code in a managed remote execution environment,
in the cloud rather than on the user's machine. [...] The session lives in an
isolated, ephemeral container; the repository was cloned fresh when the container
started, and the container is reclaimed after a period of inactivity (or when the
session ends), so anything worth keeping needs to be committed and pushed first.
It goes on with these sections:
- Environment configuration: network policy and setup scripts, with a link to the Claude Code on the web docs.
- Disk space: "Writable disk is a fixed per-session allowance, so
dfmisleads". - Pre-installed browser: Chromium at
/opt/pw-browsers, "Do not runplaywright install". - Git Operations:
git push -u origin <branch-name>, retry with backoff, and restarting "your designated branch" after a merged PR. - Model identity: includes "Do NOT include any model identifier in commit messages".
Why it matters
The model acts on it. On a long-lived checkout it believes work is lost unless it commits and pushes, so it pushes branches nobody asked for. It also describes tooling that is not installed, and applies git rules that contradict the repo's own CLAUDE.md. The checkouts on these machines hold uncommitted work from other sessions, so "cloned fresh" is a harmful assumption.
Where it comes from
The text is not in the binary. The service sends it in the dispatched work item, under claude_code_args["append-system-prompt"]. The Remote Control server writes it to ~/.claude/bridge-spawn/<session>-<random>/append-system-prompt.txt and spawns the child with --append-system-prompt-file=<that file>.
So the fix is probably server-side: the service should not send the cloud environment prompt to a Remote Control environment on a user's device, or should send one that describes that environment.
What Should Happen?
A Remote Control session on the user's own machine should get no cloud-container prompt. If it needs an environment section, that section should say it runs on the user's own persistent machine.
There is also no local way to turn it off. claude remote-control has no flag for it, and editing the file fails the SHA-256 check in the child
(CLAUDE_CODE_BRIDGE_PROMPT_SHA256). An opt-out would help.
Error Messages/Logs
The server's debug log shows:
[bridge:server-config] claude_code_args applied=1 append_prompt=present disallowed_tools=0 not_allowlisted=2
[bridge:server-config] applied sessionId=[REDACTED] args=2 appendPrompt=present metaMcp=unset autoAllow=0 autoModeEnvironment=0
Steps to Reproduce
- On your own machine, run
claude remote-control --name TEST --debug-file /tmp/rc.login a trusted folder. - Wait for the pre-created session to spawn.
- Read
~/.claude/bridge-spawn/*/append-system-prompt.txt, or ask the session from the mobile app what it knows about its execution environment.
A plain claude -p session on the same machine does not get the block.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.295 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Other
Additional Information
Related
- #98789: bridge-spawn root ignores
CLAUDE_CONFIG_DIR - #98005: Remote Control bridge sessions missing Artifact tools
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗