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
server: integration.connect.* and integration.oauth.* return IntegrationNotFound until the location's plugins activate #59730
In a location that has just booted, POST /api/integration/:id/connect/key returns 404 IntegrationNotFoundError for an integration that a plugin provides. Retrying a moment later succeeds. integration.list doesn't have this problem because it does yield* Plugin.awaitActivation first. integration.get, connect.key, connect.external and oauth.* go straight to service.get(id), so they can run before the plugin has registered the integration.
From the server log, with nothing else touching that location:
Thanks for the clear report, I can confirm this. I started opencode serve on 2.2.0 and sent one request per endpoint to a fresh directory (via x-opencode-directory), then repeated it 2 seconds later:
GET /api/integration/opencode: 404 at first, then 200
POST /api/integration/opencode/connect/key: 404IntegrationNotFoundError at first, then 204
POST /api/integration/github-copilot/connect/oauth: 500 at first, then 200
It still happens on the latest dev (f7d0ce1). In packages/server/src/handlers/integration.ts, only integration.list waits for plugin activation before reading the integration service.
The script below reproduces it. Related reports of the same race in other handlers: #51282 (agent.list), #59237 (plugin.list), #51173 / #51947 (vcs), #54192 (MCP).
Activity
opencodejr commentedon Oct 27, 2026
Thanks for the clear report, I can confirm this. I started
opencode serveon 2.2.0 and sent one request per endpoint to a fresh directory (viax-opencode-directory), then repeated it 2 seconds later:GET /api/integration/opencode: 404 at first, then 200POST /api/integration/opencode/connect/key: 404IntegrationNotFoundErrorat first, then 204POST /api/integration/github-copilot/connect/oauth: 500 at first, then 200It still happens on the latest
dev(f7d0ce1). Inpackages/server/src/handlers/integration.ts, onlyintegration.listwaits for plugin activation before reading the integration service.The script below reproduces it. Related reports of the same race in other handlers: #51282 (agent.list), #59237 (plugin.list), #51173 / #51947 (vcs), #54192 (MCP).
Reproduction script (repro.sh)
Run it:
bash repro.shAafimalek commentedon Oct 28, 2026
I would like to investigate the integration activation race and add regression coverage. Could you assign this issue to me?