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
session/resume fails right after initialize with "Location plugins did not finish activating" #57204
I run OpenCode over ACP from a third-party IDE client (the AgentBridge plugin for IntelliJ). On client startup the normal flow completes the initialize handshake and then immediately sends session/resume for an existing session. Roughly one in six of these resume attempts fails with:
{"code":-32603, "message":"Internal error: Internal service failure: {\"errorName\":\"ServiceUnavailableError\"}"}
The server log shows the underlying cause:
level=ERROR message="ACP request failed" cause="ServiceUnavailableError: Location plugins did not finish activating"
at cli.acp.session.resume
Retrying the same session/resume a few seconds later succeeds, so the session exists and is healthy; the failure is purely a startup race. I counted nine occurrences over four days, always within the first seconds after process start, and today one of six resume attempts failed this way while the other five succeeded.
Because initialize responds immediately and advertises sessionCapabilities.resume, the client has no signal to wait and no way to distinguish this from a real service failure, so the only safe fallback is a fresh session, which silently drops the conversation context.
In packages/cli/src/acp/service.ts on v2.0.32, resumeSession goes straight to getSession and ACPDirectories.activate with no wait for Location plugin activation. The catalog path already solved this in #46682 with an activation wait (POST /api/plugin/await-activation) before ACP's first catalog read; the resume path appears to lack the same barrier.
Send initialize, and immediately after the response send session/resume with the sessionId of an existing session and the project cwd.
Some attempts fail with the error above; the identical request sent a few seconds later succeeds.
Expected: session/resume should wait for Location plugin activation before its first directory-scoped read, the same way the catalog path does after #46682, so a resume arriving right after initialize either blocks briefly and succeeds, or returns an error a client can distinguish and retry.
Screenshot
No response
Operating System
Windows 11
Terminal
Not applicable, running over ACP from the AgentBridge plugin in IntelliJ
Thanks for the detailed report. I can reproduce this on v2.0.32, and it still happens on the latest dev (6bac3b9).
To stand in for slow Location activation, I used a test project with a local plugin whose setup sleeps 15 seconds. Then I started opencode acp, sent initialize, and sent session/resume for an existing session right away. After about 10 seconds the resume failed with -32603 Internal service failure / ServiceUnavailableError. The same resume in a process without the delay succeeded at once. The script below reproduces it.
One thing differs from your analysis: resume does already wait for activation, because attaching the session loads the ACP catalog. But that wait gives up after 5 seconds of polling plugin.list, and then model.list gives up after another 5 seconds on the server, which produces "Location plugins did not finish activating". So any activation longer than about 10 seconds (which a large $HOME, as in #55937, could easily cause) makes resume fail with an error your client can't tell apart from a real failure. With an 8-second delay, the resume blocked and then succeeded. session/new and session/load go through the same catalog load, so they are probably affected too.
Related: #53358 (the activation wait before ACP's first catalog read) and #55937 (the $HOME-wide watcher that slows activation).
Another data point on 2.1.2 (npm @opencode/cli, Linux x64), with session/new on a fresh opencode acp process and no artificial plugin delays.
Trigger: skill discovery. The config has about 1.3k skills in the shared agents skill directory, plus the same skills symlinked into the Claude-compatible skill directory. The debug log shows the watcher for the second skill root starting about 13s after "location services booted", and the first session/new fails at about 10s with -32603 / ServiceUnavailableError ("Location plugins did not finish activating").
Retry: re-sending the identical session/new 3s later succeeds (about 16–17s after initialize in total). Delaying the first request doesn't help, because the private server only starts on the first request.
Impact: an ACP bridge that spawns opencode acp on demand fails the first message after every spawn.
Workaround: a stdio proxy that re-sends session/new/load/resume on that exact error.
#57237 would fix it for us if the bounded readiness wait covers about 20s. A way to pin a longer activation wait, or to let opencode acp use the running background service instead of a private server, would also avoid it.
Activity
opencode-agent commentedon Oct 19, 2026
Thanks for the detailed report. I can reproduce this on
v2.0.32, and it still happens on the latestdev(6bac3b9).To stand in for slow Location activation, I used a test project with a local plugin whose setup sleeps 15 seconds. Then I started
opencode acp, sentinitialize, and sentsession/resumefor an existing session right away. After about 10 seconds the resume failed with-32603 Internal service failure/ServiceUnavailableError. The same resume in a process without the delay succeeded at once. The script below reproduces it.One thing differs from your analysis: resume does already wait for activation, because attaching the session loads the ACP catalog. But that wait gives up after 5 seconds of polling
plugin.list, and thenmodel.listgives up after another 5 seconds on the server, which produces "Location plugins did not finish activating". So any activation longer than about 10 seconds (which a large$HOME, as in #55937, could easily cause) makes resume fail with an error your client can't tell apart from a real failure. With an 8-second delay, the resume blocked and then succeeded.session/newandsession/loadgo through the same catalog load, so they are probably affected too.Related: #53358 (the activation wait before ACP's first catalog read) and #55937 (the
$HOME-wide watcher that slows activation).Reproduction script (repro.py)
Run it:
python3 repro.pyRaviTharuma commentedon Oct 21, 2026
Another data point on 2.1.2 (npm
@opencode/cli, Linux x64), withsession/newon a freshopencode acpprocess and no artificial plugin delays.session/newfails at about 10s with-32603/ServiceUnavailableError("Location plugins did not finish activating").session/new3s later succeeds (about 16–17s afterinitializein total). Delaying the first request doesn't help, because the private server only starts on the first request.opencode acpon demand fails the first message after every spawn.session/new/load/resumeon that exact error.#57237 would fix it for us if the bounded readiness wait covers about 20s. A way to pin a longer activation wait, or to let
opencode acpuse the running background service instead of a private server, would also avoid it.