target string and returns a structured report describing what would happen if the real runtime were invoked. These are placeholder implementations — they exercise the harness plumbing without establishing actual connections.
What remote modes are
Claude Code supports several remote execution paths: remote control, SSH proxying, Teleport session resume/create, direct-connect, and deep-link launch. Claw Code mirrors each of these as a named CLI command backed by a small dataclass, allowing the routing and reporting infrastructure to be tested without a live remote target.CLI commands
- remote-mode
- ssh-mode
- teleport-mode
- direct-connect-mode
- deep-link-mode
Report dataclasses
The five modes split across two report types.RuntimeModeReport — remote, SSH, and Teleport
Defined in src/remote_runtime.py:
DirectModeReport — direct-connect and deep-link
Defined in src/direct_modes.py:
RuntimeModeReport uses a detail field for the connection description, while DirectModeReport echoes the target directly. The two formats are intentionally different to mirror the structural split between the remote-proxy modes and the local-launch modes in the original TypeScript source.Mode reference
remote-mode
Remote control runtime. Represents the branch taken when Claude Code is being driven from a remote control interface. Reports
connected=True with a detail string naming the target.ssh-mode
SSH proxy runtime. Represents the branch taken when connecting through an SSH tunnel. Reports
connected=True with a detail string naming the target.teleport-mode
Teleport resume/create runtime. Represents the branch taken when resuming or creating a Teleport session. Reports
connected=True with a detail string naming the target.direct-connect-mode
Direct-connect runtime. Represents the branch taken for a direct connection launch. Reports
active=True and echoes the target.deep-link-mode
Deep-link runtime. Represents the branch taken when Claude Code is launched via a deep link URL. Reports
active=True and echoes the target.Placeholder behavior
All five implementations are stubs. Each function constructs its report dataclass directly without performing any I/O:Use cases
- Testing runtime branching logic: Confirm that each mode is reachable from the CLI and returns a correctly shaped report without needing a real remote target.
- Validating harness plumbing: Use in CI to ensure the dispatch table in
main.pycorrectly routes each subcommand to its handler and that theas_text()serialization produces the expected output format. - Incremental porting: The placeholder structure makes it straightforward to replace each stub with a real implementation once the corresponding TypeScript runtime slice is ported.