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
bug: Hermes Agent — gpt-5.6-luna via opencode-go provider returns finish_reason:null (no [DONE]) #40420
When using opencode-go as a provider in Hermes Agent, every gpt-5.6-luna response fails. The OpenCode Go gateway (https://opencode.ai/zen/go/v1/chat/completions) never sends a terminal finish_reason for this model — streamed or non-streamed: non-streaming returns "finish_reason":null on a complete response, and streaming ends with data: {"choices":[],"cost":"0"} and no [DONE] marker. Hermes requires a terminal event and retries, then errors with "Response remained truncated after 4 continuation attempts" — gpt-5.6-luna is unusable via this provider. All other Go models tested (deepseek-v4-flash, deepseek-v4-pro, kimi-k2.7-code, glm-5.2) return finish_reason: "stop" correctly. Related to but distinct from #36766 (truncated tool args on native OpenAI Responses) — this is the Go gateway omitting the terminal event.
Plugins
N/A — no OpenCode plugins. Consumer is Hermes Agent v0.19.1 (docker, Linux), which fails on every gpt-5.6-luna response.
OpenCode version
N/A — issue is against the hosted Go gateway endpoint, not a local OpenCode install.
If your issue is distinct (specifically the missing terminal event / [DONE] marker rather than stream quality), please clarify how it differs from #39881 so maintainers can track them separately.
Workaround available (verified working 2026-08-07).
Confirmed root cause matches #39881: the OpenCode Go chat/completions path never sends a terminal finish_reason / [DONE] for gpt-5.6-luna (and kimi-k3), while other models on the same endpoint return finish_reason:"stop" + [DONE]. Hermes deliberately refuses to fabricate a terminal marker on a text-only stream (guards a real truncation class — NousResearch/hermes-agent#32086), so the response is treated as a mid-stream drop and every turn fails with "Response remained truncated after 4 continuation attempts".
Since this is an upstream endpoint defect, we shipped a narrow, model-scoped client-side workaround rather than waiting: a patch script that lets Hermes treat luna streams as complete (text IS fully delivered — only the terminal marker is missing):
Applies one boolean clause to the Hermes drop-guard, scoped to gpt-5.6-luna only (extendable to kimi-k3)
Backs up the target file before patching; revert restores it
Requires restarting the Hermes gateway/dashboard service after apply
Note: trade-off is a genuine truncation of the bypassed model would be silently accepted as complete — acceptable as a stopgap
For maintainers: the fix belongs upstream — either emit finish_reason:"stop" / [DONE] on the chat/completions path for these models, or route luna to the /zen/go/v1/responses path where termination is already correct (see #39881). Happy to run additional probes if useful.
Still broken 4+ days after the original report — every Hermes turn on gpt-5.6-luna via this endpoint fails with "Response remained truncated after 4 continuation attempts".
One additional data point isolating the defect: on the same endpoint, deepseek-v4-flash handled a 369,114-prompt-token request (needle retrieval over ~1.2 M chars) in 6 s and returned finish_reason: "stop" with correct usage accounting. The gateway and its large-context path are healthy; the bug is confined to the terminal-event handling of the luna shim (and reportedly kimi-k3) on the chat/completions path, consistent with the routing analysis in #39881.
Activity
github-actions commentedon Aug 4, 2026
This issue might be a duplicate of existing issues. Please check:
gpt-5.6-luna) on OpenCode Go with streaming issues — stream degradation, mid-stream cuts, and continuation loops. The root cause may overlap with thefinish_reason:null/ missing[DONE]reported here.If your issue is distinct (specifically the missing terminal event /
[DONE]marker rather than stream quality), please clarify how it differs from #39881 so maintainers can track them separately.jcmpgit commentedon Aug 7, 2026
Workaround available (verified working 2026-08-07).
Confirmed root cause matches #39881: the OpenCode Go chat/completions path never sends a terminal
finish_reason/[DONE]forgpt-5.6-luna(andkimi-k3), while other models on the same endpoint returnfinish_reason:"stop"+[DONE]. Hermes deliberately refuses to fabricate a terminal marker on a text-only stream (guards a real truncation class — NousResearch/hermes-agent#32086), so the response is treated as a mid-stream drop and every turn fails with "Response remained truncated after 4 continuation attempts".Since this is an upstream endpoint defect, we shipped a narrow, model-scoped client-side workaround rather than waiting: a patch script that lets Hermes treat luna streams as complete (text IS fully delivered — only the terminal marker is missing):
https://gist.github.com/jcmpgit/60087ac45da47c58ffe654781bada8fc
gpt-5.6-lunaonly (extendable tokimi-k3)revertrestores itFor maintainers: the fix belongs upstream — either emit
finish_reason:"stop"/[DONE]on the chat/completions path for these models, or route luna to the/zen/go/v1/responsespath where termination is already correct (see #39881). Happy to run additional probes if useful.antoniosena-code commentedon Aug 8, 2026
Confirming reproduction from a second, independent Hermes Agent deployment (v0.20.0, Docker/Linux), fresh probe as of 2026-08-08:
Still broken 4+ days after the original report — every Hermes turn on
gpt-5.6-lunavia this endpoint fails with "Response remained truncated after 4 continuation attempts".One additional data point isolating the defect: on the same endpoint,
deepseek-v4-flashhandled a 369,114-prompt-token request (needle retrieval over ~1.2 M chars) in 6 s and returnedfinish_reason: "stop"with correct usage accounting. The gateway and its large-context path are healthy; the bug is confined to the terminal-event handling of the luna shim (and reportedlykimi-k3) on the chat/completions path, consistent with the routing analysis in #39881.github-actions commentedon Oct 9, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.