anomalyco / anomalyco/opencode
Go provider: 400 MissingSessionID - x-opencode-session header not sent
@fwang is already working on this.
Since Sep 7, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.