You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature] Per-session remote OpenCode server #1236
I use sandboxed OpenCode servers in containers or MicroVMs which allow me to run compartmentalized work. Today CodeNomad attaches every project to a single local OpenCode daemon, so running an agent in an isolated environment means opening a separate CodeNomad instance or connecting a separate remote CodeNomad window. Each of those has its own tabs, settings and notifications. I would love to have a single CodeNomad instance with tabs instead of one CodeNomad remote connection window per container.
I'm requesting the ability to choose, when opening a project (and every OpenCode session created inside it), which OpenCode server it runs on. The choice would be either the default local shared service or a separately configured OpenCode server identified by URL and credentials, such as a daemon in a container, VM, devcontainer or remote host.
@TheStaticMage Thanks, this is a really interesting request. Choosing which OpenCode server each project runs on would be a real paradigm change for CodeNomad, and it's one I particularly like. I'm studying how to make it possible and will keep you posted.
Thanks for the note. What I've done so far is update my Docker images to bake in CodeNomad and start CodeNomad (not OpenCode) in the entrypoint script. The launcher script chooses an unused port on the host at startup time and forwards that to the CodeNomad port in the container. With this setup, I can use CodeNomad on the host to connect to the "remote" (in-container) CodeNomad and I have the isolation I want.
The downsides of this approach are:
I need a separate CodeNomad window open per remote connection on my host, plus the default launcher window, to make this work. I'd love if I could have just a single window with each remote connection across the top in tabs but I haven't found a way to do this in the current version.
I don't have a stable port to expose on my tailnet for remote access. In the <= 0.19 days the single CodeNomad process was on 9898/9899 and I could just put that port on tailnet. With the new approach I have one port number per container and that gets unwieldy as project count increases.
Thanks for considering this. Hopefully these notes help when understanding your users' use cases.
Thanks, @TheStaticMage! This matches what I'm implementing: one host CodeNomad window, with project tabs connected directly to isolated OpenCode servers, no CodeNomad needed inside containers. Your tailnet clients would use a single CodeNomad endpoint. Still work in progress, with no release date yet.
Quick update on this: I built a working prototype (#1296) where CodeNomad connects directly to a remote OpenCode server and opens its projects in regular tabs, with no CodeNomad needed in the container. It works for sessions and chat, but it loses too much of what makes CodeNomad useful (files, Git, Missions, automations…), since those features live in the CodeNomad server. So I'm now working on the other way around: a CodeNomad server in each container or VM, with its projects opening as tabs in your single CodeNomad window instead of separate windows. Would running a CodeNomad server inside your sandboxes work for you?
Would running a CodeNomad server inside your sandboxes work for you?
That's actually what I have set up now and it works pretty well even though it's not elegant.
My current setup in a nutshell:
Docker container with opencode, CodeNomad, and a bunch of languages and tools
Entrypoint script that starts opencode on port 4096 and codenomad on CODENOMAD_SERVER_PORT
Script on host that does the following:
Bind mount project directory read-write and the .git directory read-only
Track a stable CODENOMAD_SERVER_PORT per project and set that in the container environment when launching
Forward that CODENOMAD_SERVER_PORT from host to container
CodeNomad installed on my host system
In the main instance I only use connect to server never folders
I add individual http://localhost:<codenomad-server-port> servers, one per project
Have main CodeNomad server connect to child server, select project directory, and 🚀
I have to manually start the container for each separate project directory now.
a CodeNomad server in each container or VM, with its projects opening as tabs in your single CodeNomad window instead of separate windows
☝️ is exactly what I would like. When implemented, I would adjust my setup to match it. Don't feel obligated to make my setup work, because it is a hack...
Activity
pascalandr commentedon Nov 1, 2026
@TheStaticMage Thanks, this is a really interesting request. Choosing which OpenCode server each project runs on would be a real paradigm change for CodeNomad, and it's one I particularly like. I'm studying how to make it possible and will keep you posted.
TheStaticMage commentedon Nov 1, 2026
Thanks for the note. What I've done so far is update my Docker images to bake in CodeNomad and start CodeNomad (not OpenCode) in the entrypoint script. The launcher script chooses an unused port on the host at startup time and forwards that to the CodeNomad port in the container. With this setup, I can use CodeNomad on the host to connect to the "remote" (in-container) CodeNomad and I have the isolation I want.
The downsides of this approach are:
Thanks for considering this. Hopefully these notes help when understanding your users' use cases.
pascalandr commentedon Nov 2, 2026
Thanks, @TheStaticMage! This matches what I'm implementing: one host CodeNomad window, with project tabs connected directly to isolated OpenCode servers, no CodeNomad needed inside containers. Your tailnet clients would use a single CodeNomad endpoint. Still work in progress, with no release date yet.
pascalandr commentedon Nov 5, 2026
Quick update on this: I built a working prototype (#1296) where CodeNomad connects directly to a remote OpenCode server and opens its projects in regular tabs, with no CodeNomad needed in the container. It works for sessions and chat, but it loses too much of what makes CodeNomad useful (files, Git, Missions, automations…), since those features live in the CodeNomad server. So I'm now working on the other way around: a CodeNomad server in each container or VM, with its projects opening as tabs in your single CodeNomad window instead of separate windows. Would running a CodeNomad server inside your sandboxes work for you?
TheStaticMage commentedon Nov 5, 2026
That's actually what I have set up now and it works pretty well even though it's not elegant.
My current setup in a nutshell:
CODENOMAD_SERVER_PORT.gitdirectory read-onlyCODENOMAD_SERVER_PORTper project and set that in the container environment when launchingCODENOMAD_SERVER_PORTfrom host to containerhttp://localhost:<codenomad-server-port>servers, one per projectI have to manually start the container for each separate project directory now.
☝️ is exactly what I would like. When implemented, I would adjust my setup to match it. Don't feel obligated to make my setup work, because it is a hack...
refactor(ui): scope the HTTP client and event stream to one backend (#…
refactor(ui): scope instance and restored project identity by backend (…
refactor(ui): scope backend events and reconnect recovery (#1311)
refactor(ui): route sessions and chat by backend (#1323)
refactor(ui): route files and git by backend (#1324)
refactor(ui): route missions through their owning backend (#1340)
refactor(ui): route plugins and extensions through project backends (#…
fix: address review round 1
refactor(ui): route usage, previews and media by backend (#1346)
46 remaining items
feat(multi-backend): list remote projects in Recents and open them fr…
feat(previews): serve remote previews to remote clients through the h…
merge: sync dev into multi-backend (#1615)
fix(multi-backend): restore Tauri build and CI after the dev sync (#1620
feat(multi-backend): enable multiple servers by default (#1624)
fix(multi-backend): address the final review findings (#1630)
feat(multi-backend): adopt the P2 home, browse and tab flow (#1631)
fix(multi-backend): address the final qualification defects (#1632)
fix(multi-backend): let remote browsers sign in to a saved server (#1633
fix(multi-backend): address the macOS qualification defects (#1640)
fix(multi-backend): Home recents and Tauri server deletion (#1643)
refactor(multi-backend): trim help, dead code and duplicate tests (#1649
refactor(multi-backend): second anti-slop pass (#1650)
feat: open projects from several CodeNomad servers in one window (Neu…