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
Go provider: 400 MissingSessionID - x-opencode-session header not sent #47763
When using OpenCode Go provider, requests fail with a 400 error:
400: {"type":"MissingSessionID","message":"Error from provider (Console Go): Request is missing x-opencode-session and cannot be routed efficiently."}
Expected Behavior
The opencode client should send the x-opencode-session header on all requests to the Go provider, or the Go provider should handle requests without it gracefully.
Actual Behavior
The Go backend rejects the request with a 400 error, making the provider unusable.
Environment
OS: Windows (win32)
opencode version: latest
Provider: OpenCode Go
Notes
This appears to be an issue with the opencode client not sending the session header, or the Go provider's routing logic being too strict. Either the client should ensure the header is always sent, or the provider should degrade gracefully when it is missing.
Reacted by Parsa, regulus735, Robert, Simone, VASHvic, jamestas, Daniel Braniewski, vinvcn and Genmutant
I had already cancelled my OpenCode Go subscription due to bad limit policies and service. Now, I wanted to use up my remaining credit through my script, which was working 100% fine for filling the tiny burst limit of OpenCode Go before and now it doesn't even let me use up the rest of my tokens with the same script? Trash service. Seriously.
Thanks for the report! The current OpenCode v2 client sends the x-opencode-session header on its requests to the Go provider, both for regular session messages and for one-off generations such as plugin calls. Something specific to your setup is probably involved, so could you share a few details?
The exact output of opencode --version ("latest" could mean v1 opencode-ai or v2 @opencode/cli), and how you installed it (npm, scoop, installer, desktop app, …)
Which model under OpenCode Go you selected
What you were doing when the error appeared: a normal chat message in the TUI, opencode run, a subagent, or something else. Does it happen on every request or only sometimes?
Whether you use any plugins, a custom provider entry in opencode.json pointing at the Go endpoint, or another tool or editor integration that calls the Go API directly. If so, please paste the relevant config with any API keys removed.
You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.
We're closing this for now because we haven't heard back with the details we asked for: the exact opencode --version, how you installed it, the model, what you were doing when the error appeared, and any plugins or custom provider config. The current v2 client already sends the x-opencode-session header on its requests to OpenCode Go, so we need those details to see why it's missing in your case.
If you still see the MissingSessionID error, please reply here with that information or open a new issue, and we'll take another look. Thanks!
Activity
github-actions commentedon Sep 7, 2026
This issue might be a duplicate of existing issues. Please check:
Please review these issues and comment there if your situation matches, or clarify how yours differs.
fengwang commentedon Sep 7, 2026
Same error here.
Fix OpenCode MissingSessionID 400: add x-opencode-session header
Fix OpenCode MissingSessionID 400: add x-opencode-session header
Fix OpenCode MissingSessionID 400: add x-opencode-session header
Fix OpenCode MissingSessionID 400: add x-opencode-session header
Fix OpenCode MissingSessionID 400 in streaming endpoint: add x-openco…
Akkitto commentedon Sep 10, 2026
I had already cancelled my OpenCode Go subscription due to bad limit policies and service. Now, I wanted to use up my remaining credit through my script, which was working 100% fine for filling the tiny burst limit of OpenCode Go before and now it doesn't even let me use up the rest of my tokens with the same script? Trash service. Seriously.
opencodejr commentedon Oct 28, 2026
Thanks for the report! The current OpenCode v2 client sends the
x-opencode-sessionheader on its requests to the Go provider, both for regular session messages and for one-off generations such as plugin calls. Something specific to your setup is probably involved, so could you share a few details?opencode --version("latest" could mean v1opencode-aior v2@opencode/cli), and how you installed it (npm, scoop, installer, desktop app, …)opencode run, a subagent, or something else. Does it happen on every request or only sometimes?opencode.jsonpointing at the Go endpoint, or another tool or editor integration that calls the Go API directly. If so, please paste the relevant config with any API keys removed.You can reply here with the details or edit the issue. If you edit it, please also leave a comment saying you've updated it so we know you're done.
opencodejr commentedon Oct 31, 2026
We're closing this for now because we haven't heard back with the details we asked for: the exact
opencode --version, how you installed it, the model, what you were doing when the error appeared, and any plugins or custom provider config. The current v2 client already sends thex-opencode-sessionheader on its requests to OpenCode Go, so we need those details to see why it's missing in your case.If you still see the
MissingSessionIDerror, please reply here with that information or open a new issue, and we'll take another look. Thanks!