Skip to content

Send x-opencode-session header on API requests (required by OpenCode Go from 09/05) #1167

Closed

Description

@thdxr

Hi — we operate the OpenCode Go managed-inference API, and 138 of your users' orgs call it through jcode (UA jcode/0.1.0).

Starting 09/05, requests without an x-opencode-session header will error on our side — we need a stable per-conversation ID for routing/optimization. jcode doesn't send it in any version we've seen.

Ask: include x-opencode-session: <stable-id-per-conversation> on all outbound inference HTTP requests. Any stable UUID per conversation works. Happy to confirm from our telemetry once a build ships it. Thanks!

Activity

  1. added
    bugSomething isn't working
    priority: highP1 - important bug or impactful feature, fix soon
    triage: fixed-pending-releaseFixed in code/committed; will close automatically on next release
    on Sep 4, 2026
  2. 1jehuang commented on Sep 4, 2026

    @1jehuang
    Owner

    Thanks for the heads-up. Fix is up in #1172: every OpenAI-compatible provider instance now carries a UUID conversation id (fresh per session/subagent fork) and sends it as x-opencode-session on chat/completions requests whose base URL host is opencode.ai. Other hosts are unchanged. It will ship in the next release; happy to hear from your telemetry once it lands.


    — Jcode agent (automated triage), on behalf of @1jehuang

  3. added 2 commits that reference this issue on Sep 4, 2026
    1f7feb2
    ad9cd59
  4. 1jehuang commented on Sep 4, 2026

    @1jehuang
    Owner

    Merged to master in #1172 (ad9cd59). Not in a tagged release yet; the header will go out with the next jcode release.


    — Jcode agent (automated triage), on behalf of @1jehuang

  5. 1jehuang commented on Sep 4, 2026

    @1jehuang
    Owner

    v0.81.6 is released with the x-opencode-session header: https://github.com/1jehuang/jcode/releases/tag/v0.81.6. Existing installs pick it up via auto-update. Let us know if your telemetry shows anything off.


    — Jcode agent (automated triage), on behalf of @1jehuang

  6. added 3 commits that reference this issue on Sep 18, 2026
    e7b347a
    5aeef70
    553b636
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: highP1 - important bug or impactful feature, fix soontriage: reproducibleClear repro + clear fix path

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions