Repository navigation
Closed as not planned
Description
Environment
- OpenCode 2.0.26 (bundled bun runtime), Linux Bazzite (immutable, Fedora-based), kernel 6.x
- Reproduces both via the shared background service (
127.0.0.1:49374) and with--standalone; also with--serverattach - Affected plugin in our traces:
@tarquinen/opencode-dcp(but the mechanism looks plugin-agnostic — see below)
Symptom
Every TUI start: Loading plugins… for ~5–6 minutes, then startup proceeds normally. Server side shows nothing wrong.
Evidence chain (timestamps UTC, from ~/.local/share/opencode/log/opencode.log)
17:47:44 plugin operation stalled ... id=49 stage=setup elapsedMs=5000 plugin=opencode-dcp target=@tarquinen/opencode-dcp role=cli
17:49:58 plugin operation failed component=plugin id=22 stage=setup durationMs=360146
error="Transport: The operation timed out." plugin=opencode-dcp target=@tarquinen/opencode-dcp role=cli
17:49:58 plugin reconciliation completed id=1 durationMs=360304 plugins=15
17:49:58 plugin reconciliation completed id=2 durationMs=3
- The 5 s
stalledline is the diagnostic-only warn (matchespackages/tui/src/plugin/context.tsx~114–140). The op itself never errors until ~300–360 s. - 300–360 s is variable (observed 330532 / 360146 / 146-less variants and a 300022 ms instance): it is a runtime/network timeout, not a code constant (grep for
360000in the binary only hits substrings of3600000= 1 h and unit tables). - Meanwhile the server loads the very same plugin in ~1 s (
loading plugin id=@tarquinen/opencode-dcp ... role=server) and MCPs connect in 1.7–2 s — the shared service is healthy. - After the failure, reconciliation completes and the next reconciliation runs in 3 ms.
Dynamic instrumentation (socat tee in front of the local service + tiny CONNECT-logging proxy)
- The TUI client sends only
GET /api/infoandGET /api/fs/list(both 200), then no further traffic to the local service for >400 s while the UI stays on "Loading plugins…". - Exactly one external connection appears ~2 s after boot:
CONNECT opencode.ai:443. - When that socket is held open by a local proxy, the client never produces an error and hangs indefinitely (observed 400 s).
- In normal networking the fetch still ends with Bun's runtime error code 314 ("The operation timed out.") after ~300–360 s; the
Transport:prefix comes from OpenCode's own client error wrapper (in the binary:class Bb extends Io("TransportError")plus a formatter that strips theErrorsuffix).
Ruled out (checked with the actual artifacts)
- Plugin code: both
@tarquinen/opencode-dcp3.1.15 and 3.2.0 contain zero occurrences ofTransport/timed out/360000. DCP 3.1.15'stui.tsxis sync-fs only (loadConfig+registerCommands); the single fetch in its init is a version check with a 10 sAbortSignal.timeout. No WebSocket/spawn/listen indist/index.js. - Proxy env vars (none in session or in the app's
.env). - A second plugin (
opencode-supermemory) — removed from config earlier with no change in behavior.
Feature request (framed as request, not a confirmed-spec claim)
- A bounded deadline for the client-side plugin setup stage (e.g. 15–30 s), treating a slow/failed external fetch as non-fatal instead of gating the whole first reconciliation on it
- Cancellation of the setup op when startup is aborted / the TUI is closed
- A clearer error line for Bun 314 timeouts from this wrapper (
Transport:alone is opaque)
Notes
- The user-local watchdog for this failure pattern:
grep 'message="plugin operation failed".*stage=setup'withdurationMs>=300000(real incidents today: 17:42, 17:45, 17:49, 17:50, 18:02 UTC + one on Oct 14). - Machine artifacts available on request (tgz checksums, tee logs, no private data included in this draft).
Metadata
Metadata
Assignees
Labels
No labels
Activity
opencode-agent commentedon Oct 18, 2026
Thanks for the detailed write-up and the traces.
I couldn't reproduce this yet. What I tried:
plugins: ["@tarquinen/[email protected]"], started in the TUI. Startup was ready within about 10 s and "Loading plugins…" never appeared.opencode.aipointed at a non-routable address, so HTTPS connections to it hang, standing in for your stuckCONNECT opencode.ai:443. Same result. The DCP command ("Open DCP panel") showed up in the command palette, so the plugin's client-side setup had finished.One thing I noticed in the code: DCP 3.2.0's client-side
setuponly waits on one call,ctx.client.rpc(...).status(...), which goes to the OpenCode service, not to opencode.ai. OpenCode has no deadline on a plugin's setup step (it only logs the 5 s "stalled" warning). So if that call never gets an answer, the first plugin load waits until the connection times out, which would match yourTransport: The operation timed out.line. I couldn't trigger that here, so something in your setup seems to matter.These would help:
@tarquinen/opencode-dcpfrom your config and keep the other 14 plugins? And does it still happen with DCP as the only plugin?--log-level DEBUGif your build supports it), covering the time from launch until reconciliation completes. In particular, the server-side lines for thedcpRPCstatuscall during that window, if any.XDG_CONFIG_HOME/XDG_DATA_HOMEpointed at empty temp dirs) and just DCP installed.Related, but not the same problem: #54974 (the stock TUI client drops long-pending plugin requests at Bun's ~5 min fetch deadline).
opencode-agent commentedon Oct 21, 2026
We couldn't reproduce the hang, and the details we asked for haven't come in, so I'm closing this as not planned for now.
What we tried: OpenCode 2.0.26 on Linux with
@tarquinen/[email protected]. We also ran it withopencode.aiblocked so that connection hangs. In every run, DCP's client-side setup finished within seconds and "Loading plugins…" never stayed on screen.If it still happens for you, please reopen or comment here with:
statusRPC callThanks again for the detailed traces. They'll help if this comes back. Also related: #54974.