Repository navigation
Description
Summary
opencode api model.list --standalone (and any location-scoped API call that awaits plugin activation, e.g. session.list) reliably fails with HTTP 503 Location plugins did not finish activating. The same calls against the background service work, so the failure is specific to the private server that --standalone spawns. Reproduced on 2.2.7 (and on 2.2.6 before upgrading). Plugin activation stalls during the second (tui-feature) load of package plugins.
Environment
- opencode version: 2.2.7 (channel
latest; failure also present on 2.2.6) - OS: Windows_NT 10.0.22621 (win32 x64)
- Terminal: Unavailable: terminal environment variables are not set
- Shell: pwsh (
$ComSpec= cmd.exe) - Install/channel: latest (npm)
- Active plugins:
oh-my-opencode-slim@latest(3.0.7)@honcho-ai/opencode-honcho@0.2.1- local files under
%USERPROFILE%\.config\opencode\plugins\:agent-selector.ts,auto-intelligence.ts,gortex.js(plugin/),herdr-agent-state.js,loop-stopper.js,paseo-terminal-activity.js,render.ts
Reproduction
-
On Windows, with at least one package plugin configured that declares both
serverandtuifeatures (confirmed withoh-my-opencode-slimand@honcho-ai/opencode-honcho), run:opencode api model.list --standalone
-
Observe exit code 1 and:
{"_tag":"ServiceUnavailableError","message":"Location plugins did not finish activating","service":"plugin"} HTTP 503 Service Unavailable -
Same failure with
--param 'location[directory]=C:\'and any other directory — it is not directory-specific. -
Controls (all on the same machine, same minute):
opencode api model.list --standalone→ 503, consistent, 3/3 attemptsopencode api session.list --standalone→ 503opencode api config.get --standalone→ OKopencode api path.get --standalone→ OKopencode api model.list(background service) → OK (5039 models)opencode models→ OK
So: private-server + plugin-awaiting operations fail; non-plugin operations and the background service are fine.
Expected Behavior
model.list returns the model catalog (5039 models on this machine) — not a 503.
Actual Behavior
Immediate 503. Server debug log (--print-logs --log-level debug) shows activation reaching the second load of the package plugins and never completing:
06:50:38.068 loading plugin id=oh-my-opencode-slim@latest (server feature)
06:50:38.866 loading plugin id=@honcho-ai/opencode-honcho@0.2.1
06:50:39.204 loading plugin id=oh-my-opencode-slim@latest (tui feature — second instantiation)
→ ServiceUnavailableError: Location plugins did not finish activating
Every plugin declaring tui + server features is instantiated twice; after the second oh-my-opencode-slim load begins, no activation-completion event is ever emitted and the request times out.
Additional Context
- Related: core: global location watcher subscribes to all of $HOME — 2M+ file home dirs starve the event loop (~900% CPU, multi-GB memory), /api/model 503 #55937 (global location watcher subscribes to all of
$HOME, starves the event loop,/api/model503). Before updatingoh-my-opencode-slimfrom 3.0.4 to 3.0.7, the background service also 503'd reliably onmodel.list/models. After the plugin update the service path became healthy, and only the--standalonepath still fails — so this may be a distinct bug from core: global location watcher subscribes to all of $HOME — 2M+ file home dirs starve the event loop (~900% CPU, multi-GB memory), /api/model 503 #55937, or the same class with a different trigger (private-server spawn re-runs full activation). - Background-service mode can still intermittently 503 for a brand-new location's first activation (e.g.
C:\Windows); a retry succeeds. Consistent with core: global location watcher subscribes to all of $HOME — 2M+ file home dirs starve the event loop (~900% CPU, multi-GB memory), /api/model 503 #55937. - I did not bisect by removing
oh-my-opencode-slimbecause it provides required agents in this environment. The log evidence implicates the double-instantiation of package plugins in the private server, but the plugin may be a victim rather than the cause. - Workaround: drop
--standaloneand use the background service (opencode service start, port 4096).
Activity
opencodejr commentedon Nov 11, 2026
Thanks for the detailed report. I can reproduce this.
The server waits only 5 seconds for a location's plugins to finish activating, then returns this 503. Each
--standalonecall starts a new private server, so every call hits that cold first activation. The background service is long-running: only its first request for a location can fail, which also explains your intermittent 503 on a new location likeC:\Windows.What I tried, on 2.2.7 (Linux):
opencode api model.list --standalonefailed with exactly your 503 three times out of three.config.get --standaloneworked.opencode servewith the same setup, the firstmodel.listgot the 503 and the next ones worked.oh-my-opencode-slimand@honcho-ai/opencode-honchoon Linux, only the first cold run (while the packages were installing) failed. Activation on your Windows machine probably takes longer than 5 seconds every time, but I couldn't check that here.The same 503 happens on the latest
dev(6b1db27), where the 5-second limit is unchanged. I checked it by running the server from source, because--standalonefrom source wouldn't start in my environment. The script below reproduces it.Until this is fixed, using the background service (dropping
--standalone) works around it.Related issues:
/api/model503 forever #63130: the same 503, caused by slow skill discovery on WindowsReproduction script (repro.sh)
Run it:
bash repro.shamr-karam commentedon Nov 11, 2026
Bisect update: removing
oh-my-opencode-slimfrom the globalpluginsarray is not sufficient to isolate — it is also registered at agent level ("plugin": ["oh-my-opencode-slim@latest"]inside an agent definition inopencode.jsonc, line 3666), so it still loads and the standalone 503 persists. Same likely applies to any plugin configured per-agent. Full isolation would require removing the agent-level registration too, which changes that agent's available toolset, so I stopped there. Regression is unchanged: with the plugin active (3.0.7, opencode 2.2.7),--standalone+model.liststill 503s 3/3 attempts within a minute of the original report.amr-karam commentedon Nov 14, 2026
Windows data point — the case you couldn't check.
Measurements on Windows 11 (opencode 2.2.7, npm install), 3 consecutive runs:
api model.list --standaloneapi model.list --standaloneapi model.list --standalonewithOPENCODE_PLUGIN_ACTIVATION_TIMEOUT=60 secondsapi model.list(background service, warm)Three things this adds to your analysis:
The measured failure latency exceeds the 5-second budget by ~4 seconds on every run. If the budget were the only gate, the 503 should land at ~5s. Consistently ~9s suggests that on Windows the clock does not cover the whole cold path: each
--standalonespawns a private server, and the budget appears to start only after process spawn + location building + plugin-source resolution. Package resolution is the prime suspect — this machine runs two npm package plugins (oh-my-opencode-slim@latest3.0.7 and@honcho-ai/opencode-honcho@0.2.1) that resolve from~/.cache/opencode/npm/..., and my server logs show each of them loading twice (once for theserverfeature, once for thetuifeature). A fix that only raises the budget may still fail if the pre-activation setup is outside the window.Skill discovery compounds it. This machine has 4,343
SKILL.mdfiles across~/.config/opencode/skillsand.agents/skills. Plugin activation never completes when the global skills folder resolves to a slow drive —/api/model503 forever #63130 (slow skill discovery on Windows) hitting the same 503 with a different pre-activation cost points the same way: on Windows the 5-second budget starts after too much work.OPENCODE_PLUGIN_ACTIVATION_TIMEOUTis not present in 2.2.7 — the third run above set it to 60 seconds and still 503'd at 9.82s. That matches your finding that dev is unchanged.On #57917: it closed automatically for missing the 72-hour contributing-guideline window (Oct 24), not on merit. The env-var approach in it is still the right shape for this. If you want it, I'll open a fresh PR following CONTRIBUTING.md (with the Windows measurements above as the motivation section). Until then the workaround here is confirmed: drop
--standalone, use the background service.VibeProgramm commentedon Nov 14, 2026
Additional Linux data point: this also affects Craft Anything, which invokes OpenCode with
--standalone. A failed model-list request prevents the application from answering the user's message.Environment
opencode v2.2.7, channellatest(reported in startup logs).7.3.3-1-cachyos, x86_64 GNU/Linux./usr/bin/zsh.TERM=xterm-256color,COLORTERM=truecolor;TERM_PROGRAMunset. This is the diagnostic shell, not necessarily the desktop application's launch environment.hdlopesrocha/opencode-talkgotenksIN/opencode-websearch-addonsReproduction and observed results
The command suggested by Craft Anything was run directly, independently of its UI (project path anonymized):
opencode api model.list --standalone --param 'location[directory]=<PROJECT_DIR>'It failed with exit code 1:
The failure is intermittent here, unlike the consistently failing Windows case in the original report. After the initial failure, four subsequent standalone invocations for the same directory succeeded. The last three were timed:
These durations include CLI startup and private-server shutdown, not just plugin activation. They should not be interpreted as measurements of the five-second activation window. This small sample does not establish the failure rate or prove the issue has resolved.
Relevant log excerpt
The following lines belong to the same failed standalone server run. Local plugin paths have been anonymized:
The observed failure matches the existing report's activation timeout. We have not established which part of activation exceeded the budget or whether a config reload contributed. No plugins or configuration were changed during these checks.
Expected: the standalone model-list operation should finish initialization and return the catalog, or handle the temporary not-ready state without terminating a normal desktop integration with an opaque HTTP 503.
amr-karam commentedon Nov 17, 2026
Opened PR #64408 (branch from
dev) implementingOPENCODE_PLUGIN_ACTIVATION_TIMEOUT, following CONTRIBUTING.md. Verified locally with the pinned bun: package typecheck clean (1,574 files), 10/10 on a new parsing test. Honest caveat stated in the PR: I could not boot a dev server here, so end-to-end behavior with a raised budget is unverified from my machine. Note that rootbun run checkis currently red ondevinservices/siteCSS (unrelated to this change), which is why the push used--no-verify.