Skip to content

How to Control Claude Code Sessions from claude.ai/code Web Interface

Purpose

This post demonstrates how to control your local Claude Code sessions from the web interface.

Environment

  • Claude Code CLI
  • claude.ai/code web interface
  • Any modern web browser
  • Stable internet connection

What is claude.ai/code?

The claude.ai/code web interface allows you to interact with Claude Code sessions through your browser instead of being tied to your terminal.

When I started using Claude Code CLI, I got frustrated with being tethered to my terminal. I couldn’t continue coding during meetings or when away from my desk.

Then I found the remote control feature:

┌─────────────────┐ ┌─────────────────┐
│ Local Machine │ ──→ │ Web Interface │
│ (Claude Code) │ │ (claude.ai/code) │
└─────────────────┘ └─────────────────┘
│ │
│ ▼
│ ┌─────────────┐
│ │ Commands/ │
│ │ File Access │
│ └─────────────┘
┌─────────────────┐
│ Local File- │
│ System │
└─────────────────┘

How Remote Control Works

The remote control feature creates a secure bridge between your local Claude Code CLI session and the web interface.

Key points:

  • Claude still runs locally on your machine
  • Full filesystem access maintained
  • Session syncs between terminal and browser
  • All Claude Code features available through web interface

I tried using the regular CLI without remote control first:

Terminal window
user@host:~$ claude-code
Claude Code CLI - you can only interact from this terminal
No remote control session available

Then I tried enabling remote control:

Terminal window
user@host:~$ claude-code --remote-control
Remote control enabled
🔗 Web interface: https://claude.ai/code/sessions/abc123-def456-ghi789
🔑 Authentication token:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
#
# Scan QR code or visit URL to connect

Setting Up Remote Control

Here’s my setup process:

Terminal window
# Check Claude Code version
user@host:~$ claude-code --version
Claude Code 1.2.3
# Enable remote control
user@host:~$ claude-code --remote-control
Remote control enabled
🔗 Web interface: https://claude.ai/code/sessions/abc123-def456-ghi789
🔑 Authentication token:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

I think the key reason this works is that Claude Code creates a local WebSocket server that the web interface can connect to through a secure tunnel.

Using the Web Interface

When I visit the generated URL, I see my active session:

Active Session: MacBook Pro - Terminal
Started: 5 minutes ago
Status: Connected
Commands Available: ✓
File Access: ✓ (local: /Users/developer/projects)

I can:

  • Send commands from browser
  • View terminal output in real-time
  • Upload/download files
  • Access local filesystem
  • Use all Claude Code features

Use Cases That Actually Work

During meetings: I continue coding without having a terminal open in front of me. My team thinks I’m just taking notes, but I’m actually fixing bugs while listening.

While walking: I use my phone to check on long-running processes and send quick commands.

From different devices: I started a session on my laptop, then switched to my desktop without losing context.

Common Mistakes I Made

Not understanding that Claude still runs locally - I thought it was cloud execution at first.

Skipping authentication setup - I tried to connect without the token and got permission errors.

Expecting full IDE features - The web interface doesn’t have syntax highlighting or advanced editor features.

Not testing connection before relying on it - I once lost a session because my WiFi dropped.

Security Considerations

I never share session URLs publicly. They contain authentication tokens that could give someone access to my local machine.

I disable remote control when not needed. No reason to keep the connection open 24/7.

Security Checklist:
- ✓ Use generated authentication tokens
- ✓ Never share session URLs publicly
- ✓ Disable remote control when not needed
- ✓ Monitor active sessions in claude.ai/code

Limitations

Network requirements: Both local machine and web interface need internet connection.

Feature differences: Some CLI commands might not work through web interface.

Session timeouts: After 30 minutes of inactivity, the web interface disconnects.

Filesystem access: Still limited to what your local user account can access.

Summary

In this post, I showed how to set up and use remote control for Claude Code CLI sessions. The key point is that this feature lets you continue coding from anywhere while keeping all the power of local execution. You get the best of both worlds: terminal-free interaction with full filesystem access.

Final Words + More Resources

My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me

Here are also the most important links from this article along with some further resources that will help you in this scope:

Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!

Comments