anomalyco / anomalyco/opencode

Go provider: 400 MissingSessionID - x-opencode-session header not sent

Open
#47,763 3 comments 9 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.