Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/VineeTagarwal-code/claude-code/llms.txt

Use this file to discover all available pages before exploring further.

Remote sessions let you start Claude Code on any machine — a server, your workstation, a cloud VM — and then interact with it from a web browser or the Claude mobile app. The session runs entirely in your terminal; the browser or phone is just a remote input/output interface.

How it works

When you start Claude Code with --remote, it creates a session on claude.ai and establishes a bidirectional bridge. Messages you type on your phone or in the browser are forwarded to the running Claude Code process. Responses stream back in real time. The session URL follows the pattern:
https://claude.ai/code/<session-id>

Starting a remote session

1

Launch Claude Code in remote mode

Add the --remote flag when starting Claude Code:
claude --remote
Claude Code authenticates with claude.ai, creates a new session, and displays a QR code along with the session URL.
2

Get the session URL

After startup, run /session to display the QR code and URL at any time:
/session
The command shows:
  • A text-art QR code that links to your session URL
  • The URL in plain text for copying: Open in browser: https://claude.ai/code/<session-id>
Press Esc to close the session panel and return to the prompt.
/session only works when Claude Code was started with --remote. If you run it outside of remote mode, you will see: “Not in remote mode. Start with claude --remote to use this command.”
3

Connect from your device

Scan the QR code with your phone’s camera or open the URL in any browser. You will land on the claude.ai interface connected to your running session.From here you can send messages, view responses, and use the full conversation interface — all backed by the Claude Code process running in your terminal.

Connecting the Claude mobile app

The /mobile command shows QR codes for downloading the Claude mobile app:
/mobile
The command displays QR codes for both iOS and Android. Press Tab or the arrow keys to switch between platforms. Press Esc to close.
  • iOS: https://apps.apple.com/app/claude-by-anthropic/id6473753684
  • Android: https://play.google.com/store/apps/details?id=com.anthropic.claude
Once you have the app installed, open it and use /session to get the session URL, then navigate to it in the app’s browser.

The /desktop command

The /desktop command initiates a handoff to the Claude desktop application. Use this to transfer a session from the terminal interface to the desktop app for a richer experience.
/desktop

Commands available in remote mode

When Claude Code is running in remote mode, the set of available slash commands is restricted to those that are safe to use without a local filesystem, IDE connection, or shell execution context:
CommandDescription
/sessionShow QR code and URL for the current remote session
/mobileShow QR codes for the Claude mobile app
/exitExit Claude Code
/clearClear the conversation
/helpShow available commands
/themeChange the terminal color theme
/colorChange the agent response color
/vimToggle vim keybindings
/costShow session cost so far
/usageShow token usage
/copyCopy the last message
/btwAdd a note to the conversation
/feedbackSend feedback
/planToggle plan mode
/keybindingsManage keybindings
/statuslineToggle the status line
/stickersStickers
Commands that depend on local resources — /ide, /memory, /mcp, /plugin, and others — are not available during a remote session.

Commands that work over the bridge

When commands arrive from the mobile or web client over the Remote Control bridge, an additional set of local-type commands is permitted. These produce text output that streams back to the remote client:
CommandDescription
/compactShrink context
/clearWipe transcript
/costShow session cost
/summarySummarize conversation
/release-notesShow changelog
/filesList tracked files
Slash commands of type prompt (skills and plugin commands that expand to text sent to the model) are always safe over the bridge.

Security

Session tokens

Each remote session is identified by a session ID embedded in the URL. The session ID is tied to your claude.ai authentication — only your logged-in account can access it. Session IDs follow the format session_<uuid> in production. Staging sessions contain _staging_ in the ID, and local development sessions contain _local_.

Trusted device tokens

The bridge uses trusted device tokens to authorize reconnection without re-authentication. These tokens are stored locally and exchanged during the bridge handshake.

Bridge protocol

The bridge uses a CCR v2 transport (Server-Sent Events or WebSocket depending on the server endpoint). The session connects via:
  1. POST /v1/code/sessions — creates the session and returns a session ID.
  2. POST /v1/code/sessions/{id}/bridge — exchanges an OAuth token for a short-lived worker JWT.
  3. The worker JWT is used to maintain the SSE/WebSocket connection.
The bridge JWT is refreshed proactively before expiry. A 401 on the SSE stream triggers an automatic credential refresh and transport rebuild without dropping the session.
Do not share your session URL with untrusted parties. Anyone with the URL and access to your claude.ai account session can interact with your running Claude Code process.

Build docs developers (and LLMs) love