Running opencode web in remote dev workspaces(coder.com), looking for setup advice #9005

Open
opened 2026-02-16 18:11:22 -05:00 by yindo · 1 comment
Owner

Originally created by @MakonnenMak on GitHub (Feb 10, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Question

We're trying to integrate OpenCode's web UI into our remote development platform so engineers can use it directly from the browser. Looking for advice on if the approach is sound / what problems it has.

For the remote dev env, we're using coder https://coder.com/. There's an opencode plugin for it but it's TUI first. I really want it to be a web UI first feature for developers.

What I'm doing:

  • Each developer gets a Kubernetes-based workspace with opencode web --port 4096 --hostname 0.0.0.0 running as a background process on startup
  • OpenCode is installed via curl -fsSL https://opencode.ai/install | bash during workspace provisioning
    Config is written to ~/.config/opencode/opencode.json
  • A reverse proxy (TLS termination + auth) routes browser traffic to the OpenCode server inside the workspace via subdomain-based routing
  • Users click a button in their workspace dashboard to open the web UI in a new tab
  • Provider: amazon-bedrock via iam
  • Version: v1.1.53

What works:

  • Web UI loads, health checks pass, fully functional
  • TUI in a terminal on the same remote machine is fast and responsive

What's not great:

  • Web UI feels significantly slower than the TUI. Same machine, same model -- TUI streams tokens immediately from what I can tell, web UI takes a while before showing anything.
  • Prompts occasionally fail to send, timing out
  • Browser Network tab shows the delay is "waiting for server response" on POST /session/:id/message
    Questions:

Questions

  • Anything we should be doing differently in how we install/configure/run opencode web for this kind of setup?
  • Is running opencode web behind a reverse proxy a supported setup, or is it mainly designed for local use?
  • Could the reverse proxy (ALB + service mesh) be buffering the SSE stream and causing the perceived slowness?
  • Any recommended way to debug the performance gap between TUI and web UI?

Happy to share more details. Thanks!

Originally created by @MakonnenMak on GitHub (Feb 10, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Question We're trying to integrate OpenCode's web UI into our remote development platform so engineers can use it directly from the browser. Looking for advice on if the approach is sound / what problems it has. For the remote dev env, we're using coder https://coder.com/. There's an [opencode](https://registry.coder.com/modules/coder-labs/opencode) plugin for it but it's TUI first. I really want it to be a web UI first feature for developers. What I'm doing: * Each developer gets a Kubernetes-based workspace with opencode web --port 4096 --hostname 0.0.0.0 running as a background process on startup * OpenCode is installed via curl -fsSL https://opencode.ai/install | bash during workspace provisioning Config is written to ~/.config/opencode/opencode.json * A reverse proxy (TLS termination + auth) routes browser traffic to the OpenCode server inside the workspace via subdomain-based routing * Users click a button in their workspace dashboard to open the web UI in a new tab * Provider: amazon-bedrock via iam * Version: v1.1.53 What works: * Web UI loads, health checks pass, fully functional * TUI in a terminal on the same remote machine is fast and responsive What's not great: * Web UI feels significantly slower than the TUI. Same machine, same model -- TUI streams tokens immediately from what I can tell, web UI takes a while before showing anything. * Prompts occasionally fail to send, timing out * Browser Network tab shows the delay is "waiting for server response" on POST /session/:id/message Questions: Questions * Anything we should be doing differently in how we install/configure/run opencode web for this kind of setup? * Is running opencode web behind a reverse proxy a supported setup, or is it mainly designed for local use? * Could the reverse proxy (ALB + service mesh) be buffering the SSE stream and causing the perceived slowness? * Any recommended way to debug the performance gap between TUI and web UI? Happy to share more details. Thanks!
yindo added the perfweb labels 2026-02-16 18:11:22 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 10, 2026):

This issue might be a duplicate of or related to existing issues. Please check:

  • #12748: Web UI timeout over tailscale - Same performance issue over remote/proxied connections
  • #12453: Web UI: "Failed to send prompt" false alarm on mobile browsers - Same SSE streaming delays
  • #9650: Support sessionID Filter for SSE Event Subscription - Architectural issue causing inefficient streaming in remote scenarios
  • #12078: Interface instability and slow performance with complex sessions - General web UI performance degradation
  • #12662: HTTPS Support for opencode web - Related setup concern for reverse proxy deployments
  • #11997: Auto-start web server mirror for remote access - Related remote access architecture discussion

These issues share the common theme of web UI performance/streaming problems, especially in remote or proxied deployments. The root causes appear to be:

  1. SSE stream architecture keeping idle responses for minutes (doesn't work well over remote/proxied connections)
  2. Inefficient event broadcasting (all events to all clients, then filtered client-side)
  3. Reverse proxy compatibility not optimized for this use case
@github-actions[bot] commented on GitHub (Feb 10, 2026): This issue might be a duplicate of or related to existing issues. Please check: - **#12748**: Web UI timeout over tailscale - Same performance issue over remote/proxied connections - **#12453**: Web UI: "Failed to send prompt" false alarm on mobile browsers - Same SSE streaming delays - **#9650**: Support sessionID Filter for SSE Event Subscription - Architectural issue causing inefficient streaming in remote scenarios - **#12078**: Interface instability and slow performance with complex sessions - General web UI performance degradation - **#12662**: HTTPS Support for opencode web - Related setup concern for reverse proxy deployments - **#11997**: Auto-start web server mirror for remote access - Related remote access architecture discussion These issues share the common theme of web UI performance/streaming problems, especially in remote or proxied deployments. The root causes appear to be: 1. SSE stream architecture keeping idle responses for minutes (doesn't work well over remote/proxied connections) 2. Inefficient event broadcasting (all events to all clients, then filtered client-side) 3. Reverse proxy compatibility not optimized for this use case
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9005