Skip to content

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

Closed as not planned

Description

@zhzaill

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.

Activity

  1. github-actions commented on Sep 7, 2026

    @github-actions
    Contributor

    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.

  2. fengwang commented on Sep 7, 2026

    @fengwang

    Same error here.

  3. Akkitto commented on Sep 10, 2026

    @Akkitto

    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.

  4. opencodejr commented on Oct 28, 2026

    @opencodejr

    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.

  5. opencodejr commented on Oct 31, 2026

    @opencodejr

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions