You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenCode Go provider fails with HTTP 400 MissingSessionID: x-opencode-session header is never sent #7865
Models: mimo-v2.5, muse-spark-1.3-contributor (assigned to all roles)
Problem
Every inference request to OpenCode Go is rejected:
model error: opencode-go returned HTTP 400 (MissingSessionID): Request is missing
x-opencode-session and cannot be routed efficiently.
Please see https://opencode.ai/docs/go/#where-can-i-use-it
The API key and endpoint are correct: list_models succeeds ([providers][list_models] slug=opencode-go fetched 37 models). Only chat and completion requests fail.
Affected paths seen in the logs:
agent.run_single: tinyagents harness and the driver
cron.agent_job
threads:title: title generation falls back to a default title
Cause
OpenCode Go requires clients to send a stable per-conversation session ID in the x-opencode-session header. It also asks clients to identify themselves with their own User-Agent (e.g. my-agent/1.0) instead of a generic SDK name. OpenHuman's OpenAI-compatible provider sends neither. The string x-opencode-session does not appear anywhere in the binary.
There is also no workaround through configuration. [[cloud_providers]] supports only id, slug, label, endpoint and auth_style, with no way to add custom headers.
Steps to reproduce
Add a cloud provider with endpoint https://opencode.ai/zen/go/v1 and an OpenCode Go API key.
Route the chat role to opencode-go:<any model>.
Send a message in chat. The request fails with HTTP 400 MissingSessionID.
Expected
OpenCode Go models work like other OpenAI-compatible providers.
Suggested fix
For OpenCode Go endpoints (opencode.ai/zen/go), send x-opencode-session: <stable id> on every request. A hash of thread_id would work for chat threads; background jobs (cron, title generation, summarization) could use their run or thread ID. The ID must stay the same for all requests in one conversation, including auxiliary calls such as title generation.
Send a product-specific User-Agent, e.g. openhuman/0.64.15.
Optionally, add a generic headers table to [[cloud_providers]] so users can unblock similar provider requirements without waiting for a release.
Thanks for the thorough report and root-cause analysis. We confirmed it on main: no cloud provider request sends x-opencode-session or a product User-Agent, and [[cloud_providers]] has no way to add headers (crates/openhuman-core/src/config/schema/cloud_providers.rs).
A fix is in review in #8059. It sends a stable per-conversation x-opencode-session for OpenCode Go endpoints (shared by title generation and other auxiliary calls in the same conversation), adds an openhuman/<version> User-Agent, and adds an optional headers table to [[cloud_providers]]. It isn't merged yet, so there's no configuration workaround on current releases.
Thanks again for the root-cause analysis. It's still the case on current main: [[cloud_providers]] entries can't carry extra headers, and nothing sends x-opencode-session. #8059 is the open fix (custom headers, a product User-Agent and the OpenCode Go session header) and is in review. This issue will close when it lands.
Activity
M3gA-Mind commentedon Oct 19, 2026
Thanks for the thorough report and root-cause analysis. We confirmed it on main: no cloud provider request sends
x-opencode-sessionor a productUser-Agent, and[[cloud_providers]]has no way to add headers (crates/openhuman-core/src/config/schema/cloud_providers.rs).A fix is in review in #8059. It sends a stable per-conversation
x-opencode-sessionfor OpenCode Go endpoints (shared by title generation and other auxiliary calls in the same conversation), adds anopenhuman/<version>User-Agent, and adds an optionalheaderstable to[[cloud_providers]]. It isn't merged yet, so there's no configuration workaround on current releases.senamakel commentedon Nov 9, 2026
Sentry triage for tinyhumansai/team#46: these unresolved
tauri-rust/tauri-reactissues share this root cause.3 Sentry issue(s), 104 events in total, up to 6 users on a single issue. Releases seen: 0.64.15.
104 events on 0.64.15; also present inside RUNCHAT per-turn issues (9 issues).
M3gA-Mind commentedon Nov 16, 2026
Thanks again for the root-cause analysis. It's still the case on current main:
[[cloud_providers]]entries can't carry extra headers, and nothing sendsx-opencode-session. #8059 is the open fix (custom headers, a product User-Agent and the OpenCode Go session header) and is in review. This issue will close when it lands.