One annoyance though – it runs on your local machine. If your laptop goes to sleep, the session dies.
So I tried pointing it at a VPS instead. I had this side project (RAgent) that wraps Claude Code in Docker and gives you a web terminal. Deployed it to Railway, ran claude login + claude remote-control inside the container, scanned the QR code from my phone – and it just worked. Session stays alive because the server doesn't sleep.
Now I can start a task from my desk, close the laptop, and keep going from my phone on the couch. The Claude app handles the UI so I don't have to deal with a terminal on a tiny screen.
It's pretty simple – Node.js + node-pty + xterm.js over WebSocket, with tmux for session persistence. Files live in a /workspace volume so nothing gets lost on restart. You can one-click deploy to Railway or throw it on any VPS with Docker.
GitHub: https://github.com/Chris-bzst/ragent
Remote Control needs a Pro or Max subscription. RAgent itself works with any API key.