Summary
OpenCode (opencode.ai) emailed OpenCode Go subscribers that requests missing the x-opencode-session header will start erroring on 2026-09-06. Forge's OpenCode Go integration does not send this header.
From the OpenCode Go docs:
To ensure your account does not get flagged, make sure the tool you're using
- does not generate abusive traffic
- properly identifies itself (no broad user agents)
- includes the
x-opencode-session header so we can optimize prompt caching
The email states the Forge user agent is not recognized and asks maintainers to add x-opencode-session (one stable ID per conversation).
Current state
- Confirmed against latest
main: no occurrence of x-opencode-session anywhere in the repo.
crates/forge_repo/src/provider/provider.json (opencode_go) has no headers set, and Provider::custom_headers is a static map — insufficient here since the value must be a stable per-conversation ID.
- Reproduced with forge 2.13.21 logged into
opencode_go.
Suggested fix
Attach x-opencode-session: <conversation-id> (e.g. the existing conversation/session UUID) to requests routed to the opencode_go provider (and likely opencode_zen as well — same gateway, https://opencode.ai/zen/go).
A static header won't work; the value should be one stable ID per conversation so OpenCode can optimize prompt caching.
Environment
- forge 2.13.21 (latest), macOS arm64
- provider: opencode_go, model: deepseek-v4-flash
Summary
OpenCode (opencode.ai) emailed OpenCode Go subscribers that requests missing the
x-opencode-sessionheader will start erroring on 2026-09-06. Forge's OpenCode Go integration does not send this header.From the OpenCode Go docs:
The email states the
Forgeuser agent is not recognized and asks maintainers to addx-opencode-session(one stable ID per conversation).Current state
main: no occurrence ofx-opencode-sessionanywhere in the repo.crates/forge_repo/src/provider/provider.json(opencode_go) has no headers set, andProvider::custom_headersis a static map — insufficient here since the value must be a stable per-conversation ID.opencode_go.Suggested fix
Attach
x-opencode-session: <conversation-id>(e.g. the existing conversation/session UUID) to requests routed to theopencode_goprovider (and likelyopencode_zenas well — same gateway,https://opencode.ai/zen/go).A static header won't work; the value should be one stable ID per conversation so OpenCode can optimize prompt caching.
Environment