Comment by afruitpie

5 days ago

Native apps connecting to the OpenCode server is a great way to run sessions on remote hosts!

I wish Claude Code would adopt the same model. The desktop app deploys a separate engine that restarts and clobbers long-running sessions upon reconnect (Remote Control is their recommended solution but requires a Claude.ai account).

I’ve been vibe coding a native macOS Claude Code app that spawns a server that wraps Claude Code on remote hosts, but the UX and features are always lagging behind.

I am quite keen on this as well, I have been trying to move all my active development to happen inside a container, including the harnesses. This, of course, makes it very hard to run GUI harnesses. I prefer CLI, but it would be neat to be able to better isolate gui-based harnesses as well.

I have been using VSCodium with https://github.com/jeanp413/open-remote-ssh so (most of) the IDE also runs inside the container. I have been trying to get everything inside the container, including the projects I work on, the IDE, the harness, the dependencies, etc. Both for security and for portability so I can have the same setup in both my work and home computers.

One thing I haven't been able to do is limit the blast radius of is git, github ssh keys give blanket access to all repos tied to my profile and ATM I set up the github SSH key inside the container.

Claude code agents have a protocol that's usable for the same purpose it just listen locally but it's usable i have my own claw-like that has options for claude, codex, and pi (my subscription, wife subscription, and i got a yearly sub on glm when it was cheap)

  • ACP?

    • No because it doesnt get backgrounded and I would need to hold one end of the stream at all time, and feature completedness is spotty

      I use the protocol claude code terminal use to talk to its server to spawn agents, opencode server protocol which is published for the same purpose, and manage pi command lines by pid

      1 reply →

I was experimenting with Paseo for this.

The Opencode desktop app could already connect to a remote web session; does it now talk to the server directly?

Claude Code already has a server mode. The difference is that it connects through Anthropic rather than via a local socket.

  • one server, multiple Claude Code clients is what OP is proposing

    a server like herdr has a server

    • That's already possible too. A single server can handle multiple sessions, and multiple devices can connect to a single session at the same time. However, since the client is limited to Anthropic's app, there is no local API for connecting your own client.

I've developed something similar for personal use. A harness who's only job is to delegate to other harnesses (i.e: AntiGravity, Codex, Claude Code, Hermes) to create an opencode-web-like interface across multiple hosts.

For Claude Code, don't use remote-connections. Your best option is to look at how the closed-source VSCode plugin interfaces with Claude Code. The way it works is that it reads files directly. This API, although unofficial, is likely very stable, because an old VSCode extension still has to interact with new version of Claude Code.

If there's any interest in this sort of thing, maybe I'll open-source it. I would have to cleanup the slop though.

  • I don’t know much about your use case but in case you need some inspiration shout out to t3 codes

    • Oh neat! Yup, that's what I was looking for, and I totally missed this. Thanks for the tip.