Skip to content

[Opencode Go] Frequent jitter / possible truncation when calling opencode-go/muse-spark-1.2 via Codex (opencodex proxy, openai-chat) #43680

Closed as not planned

Description

@Tao-Yida

Description

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}

Plugins

opencodex (on codex)

OpenCode version

1.18.11

Steps to reproduce

  1. Configure opencode-go (baseUrl https://opencode.ai/zen/go/v1, any modelContextWindows)
  2. ocx sync (catalog 35 models, muse-spark present) and opencodex at 127.0.0.1:10100 (openai_base_url injected)
  3. Via Codex (ChatGPT account, codex 0.147.0, opencodex 2.28.0):
    codex exec -m opencode-go/muse-spark-1.2-contributor "List files"
    or: codex exec -m opencode-go/muse-spark-1.2-contributor "Run: cat | head -n 3"
  4. Enable ocx debug provider on to see stream-truncated on each tool turn.

Screenshot and/or share link

No response

Operating System

CentOS7

Terminal

Linux Terminal

Activity

  1. github-actions commented on Aug 20, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions