Claude Code is one of the most powerful AI-powered coding assistants available today, but using it from a local console window has real limitations: you're tied to the machine where it's installed, you can't access it from your phone, and there's no easy way to share a session with a colleague.
sgcClaudeCodeRemote solves all of this. It's a lightweight Windows server that wraps Claude Code inside a web-based terminal, letting you connect from any browser — on your desktop, laptop, tablet, or phone. Under the hood, it uses the Windows ConPTY pseudo-console API for a real terminal session, and sgcWebSockets to stream the terminal I/O to the browser in real time.
This article covers the features, configuration options, and advantages over running Claude Code directly from the console.
Why Use Claude Code Remotely?
sgcClaudeCodeRemote addresses the most common friction points developers face when working with Claude Code on the console.
|
Access from Any Device Open a browser on your phone, tablet, or laptop and connect to Claude Code running on your development machine. No Node.js, no CLI installation — just a URL. |
Collaborative Sessions Multiple developers can join the same named session and see Claude's output in real time. Built-in pair programming — no screen sharing tools needed. |
Secure by Default Password authentication with brute-force protection, configurable timeouts, IP blocking, and optional TLS 1.3 encryption for internet-facing deployments. |
Mobile-Friendly Terminal
The web interface is designed to work on mobile devices. A touch-optimized key toolbar at the bottom of the screen provides the special keys that Claude Code needs but mobile keyboards lack:
| Button | Function |
|---|---|
| Esc | Cancel the current operation or go back |
| Tab | Accept suggestions and autocomplete |
| Intro | Confirm input (Enter key) |
| Ctrl | Sticky modifier — tap once, then tap a letter for combos like Ctrl+C (interrupt) |
| ↑ ↓ ← → | Navigate command history and menus |
The toolbar uses pointerdown events for instant response on touch screens, and prevents focus stealing so the terminal stays active. The viewport adapts to the mobile browser chrome using dynamic viewport units (dvh), ensuring the toolbar is always visible without scrolling.
Named Sessions
Each connection can specify a session name (e.g. “backend-refactor”, “devops”, “testing”). Sessions persist for the lifetime of the server, so you can disconnect and reconnect later to the same Claude Code instance.
- Multi-client sessions. Multiple browsers can join the same session simultaneously — everyone sees the same terminal output and can type into the same console.
- Session history. The browser remembers your 10 most recent sessions in localStorage, with a dropdown to quickly reconnect.
- Session indicator. The active session name is displayed in the header bar after authentication.
Authentication & Security
sgcClaudeCodeRemote includes multiple layers of protection out of the box:
|
Password Authentication A single shared password protects access. No username is required — just the password. The login form disables browser credential autocomplete to prevent accidental storage. |
Brute-Force Protection After 5 failed attempts from the same IP, that address is blocked for 5 minutes. Blocked IPs are rejected at the connection level before any further processing. |
|
Authentication Timeout Clients must authenticate within a configurable window (default 15 seconds). Idle connections that don't send credentials are disconnected automatically. |
TLS 1.3 Encryption For internet-facing deployments, enable TLS with a certificate and key file. All traffic between browser and server is encrypted end-to-end. |
Skip permission prompts. A checkbox on the login screen (checked by default) launches Claude Code with the --dangerously-skip-permissions flag. This is essential for remote sessions where you can't interact with permission dialogs on the server console.
sgcClaudeCodeRemote vs. Console Claude Code
A side-by-side comparison of running Claude Code locally versus through sgcClaudeCodeRemote.
| Feature | Console | sgcClaudeCodeRemote |
|---|---|---|
| Access from any device | No | Yes |
| Mobile / tablet support | No | Yes (touch toolbar) |
| Multiple users on same session | No | Yes |
| Named persistent sessions | No | Yes |
| Password protection | No | Yes (brute-force blocking) |
| TLS encryption | N/A | TLS 1.3 |
| Client software required | Node.js + CLI | Just a browser |
| Pair programming | External tools | Built-in |
| Real-time latency display | No | Yes |
| Client platforms | Same machine only | Windows, macOS, Linux, Android, iOS |
Getting Started
Download sgcClaudeCodeRemote and run it from the command line with a password:
sgcClaudeCodeRemote.exe --password MySecretPassword
Then open your browser and navigate to http://your-server-ip:8765/. Enter the password, choose a session name, and you're in.
Examples
Custom port with higher connection limit:
sgcClaudeCodeRemote.exe --port 9000 --password MyPass --max-conn 20
With TLS encryption for secure access over the internet:
sgcClaudeCodeRemote.exe --tls --tls-cert cert.pem --tls-key key.pem --password MyPass
Command-Line Options
| Option | Description | Default |
|---|---|---|
--port |
Server listening port | 8765 |
--password |
Access password (required when auth enabled) | — |
--command |
Command to run in the terminal | claude |
--cols / --rows |
Initial terminal dimensions | 120 × 40 |
--max-conn |
Maximum concurrent connections | 10 |
--timeout |
Authentication timeout in seconds | 15 |
--no-auth |
Disable authentication entirely | — |
--tls |
Enable TLS 1.3 encryption | — |
--tls-cert / --tls-key |
Certificate and private key PEM files | — |
--tls-password |
Private key password (if encrypted) | — |
--tls-port |
TLS listening port | Same as --port |
Use Cases
- Work from your phone. Review code, ask Claude questions, or run commands from anywhere — the couch, the train, or a coffee shop.
- Team collaboration. Multiple developers connect to the same session and interact with Claude in real time. No screen sharing needed.
- Headless build servers. Run Claude Code on a powerful remote machine and access it from a thin client or terminal-less environment.
- Demos and presentations. Share a session URL with your audience. Everyone sees the same live terminal and follows along.
- Secure remote access. Enable TLS, set a strong password, and use Claude Code securely over the internet from any location.
How It Works
sgcClaudeCodeRemote is a Delphi console application built on three core technologies:
|
Windows ConPTY The Windows 10 pseudo-console API creates a real terminal session with full VT100/ANSI sequence support. Claude Code runs inside this console exactly as it would in a normal terminal window. |
sgcWebSockets The sgcWebSockets library handles all WebSocket communication, HTTP serving, and optional TLS encryption. Binary frames carry terminal output; JSON text frames handle authentication and control messages. |
xterm.js The browser renders the terminal using xterm.js with the fit addon (auto-resize to window) and web-links addon (clickable URLs). The dark theme matches the Claude Code aesthetic. |
System requirements. The server requires Windows 10 version 1809 or later (for ConPTY support) and Claude Code installed on the host machine. Clients need only a modern web browser.
Web Interface Features
The single-page web UI is embedded directly in the executable — no external files to deploy. It includes:
- Status indicator. Color-coded badge (green = connected, red = disconnected, blue = login required, amber = connecting) with a pulse animation.
- Real-time latency. Displays round-trip latency in milliseconds, updated on every frame.
- Terminal dimensions. Shows the current columns × rows and updates dynamically on resize.
- Fit button. Instantly resizes the terminal to fill the browser window.
- Copy & paste. Full clipboard support — Ctrl+C copies selected text, Ctrl+V pastes into the terminal.
- Auto-reconnect. If the connection drops, the client automatically attempts to reconnect after 3 seconds.
- 10,000-line scrollback. Scroll up to review previous Claude Code output without losing any history.
sgcClaudeCodeRemote is built with sgcWebSockets — high-performance WebSocket components for Delphi and .NET.