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] Frequent jitter / possible truncation when calling opencode-go/muse-spark-1.2 via Codex (opencodex proxy, openai-chat) #43680
Calling opencode-go/muse-spark-1.2-contributor (also muse-spark-1.2) through Codex → opencodex (openai-chat → https://opencode.ai/zen/go/v1/chat/completions) frequently jitters: Codex spins, retries 1/5…5/5, then stream disconnected before completion: upstream stream ended mid tool call without a terminal signal — possible truncation. Pure chat (echo hi) is stable; tool-calling turns (List files, cat …, any tool_calls with ~119 tools) reproduce at high rate.
Possible root cause: upstream stream for this model ends as tool_calls → usage/cost with no finish_reason and no [DONE]. src/adapters/openai-chat.ts:1689 treats !sawFinish && pendingToolCalls>0 as truncation even when pendingUsage already arrived. deepseek-v4-flash under identical conditions correctly sends finish_reason:"tool_calls" and succeeds.
[ocx:openai-chat:stream-truncated] {"finishReason":null,"hadUsage":true,"pendingToolCalls":1}
Activity
github-actions commentedon Aug 20, 2026
This issue might be a duplicate of existing issues. Please check:
finish_reason— strict OpenAI-compatible clients enter a retry loop (same model, same root cause: missingfinish_reason/[DONE]on muse-spark via the Zen OpenAI-compat endpoint)gpt-5.6-lunavia opencode-go returnsfinish_reason:null/ no[DONE](same gateway-level missing terminal signal pattern)upstream stream ended mid tool call without a terminal signalerror, same opencodex proxy path)thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊