Client or integration
Codex App
Area
Provider adapter
Summary
opencode-go/muse-spark-1.2-contributor via opencodex proxy 10100 consistently truncates on large-context + tool-call streams: 502 upstream_server_error upstream stream ended mid tool call without a terminal signal — possible truncation src/adapters/openai-chat.ts:1734. Small prompts succeed, the same large CodexBar sweep fails at all reasoning levels low/medium/high/xhigh even after reinstall, while opencode-go/deepseek-v4-flash on identical prompt succeeds 200. Codex then does 5/5 useless retries.
Reproduction
- Environment:
opencodex 2.27.0 bun ~/.hermes/node/lib/node_modules/@bitkyc08/opencodex , codex 0.147.0 openai_base_url http://127.0.0.1:10100/v1 , macOS 15.5 Darwin 24.x, muse-spark context 1048576 baseUrl https://opencode.ai/zen/go/v1, workspace CodexBar-bug:feat main a3457dafb
- Minimal large reproduction (deterministic):
codex exec -m opencode-go/muse-spark-1.2-contributor -c model_reasoning_effort="low" --color never \
"Continue aligning the status of CodexBar-bug:feat — sweep branches, local changes and PR/CI. Just run bash tools \`git status\` and \`git branch -vv\` and summarize"
# also reproduces with medium/high/xhigh, same result
- Observe
Codex Reconnecting 1/5...5/5 then stream disconnected before completion: upstream stream ended mid tool call without a terminal signal — possible truncation, localhost:10100/#logs shows 502 with unreported tokens.
- Control:
codex exec -m opencode-go/deepseek-v4-flash -c model_reasoning_effort="high" --color never "same prompt"
# → 200, git status + 41 branches returned
codex exec -m opencode-go/muse-spark-1.2-contributor "hi" # small → 200 even on xhigh
Version
2.27.0
Operating system
macOS 15.5 (Darwin 24.6.0, arm64)
Provider and model
opencode-go / muse-spark-1.2-contributor
Logs or error output
~/.opencodex/usage.jsonl truncated batch (high, still truncates):
ocx-mt1aawks-4f ts 1787216068972 eff xhigh/xhigh status 502 dur 3646 upstreamError mid tool call truncation
ocx-mt1b32u3-d ts 1787217383451 eff high/high status 502 dur 2654
ocx-mt1b3655-e ts 1787217387737 eff high/high status 502 dur 2433
ocx-mt1bdrba-3 ts 1787217881734 eff high/medium(after high->medium map) status 502 dur 3409
...
ocx-mt1bhd5b-h ts ... eff low/low status 502 # even low fails on large sweep
All share: adapter openai-chat status 502 errorCode upstream_server_error recoveryKinds [] usageStatus unreported
Small control (same model, small prompt, succeeds):
ocx-mt1b51yc-2 eff xhigh/xhigh status 200 totalTokens 1066 dur 2500
ocx-mt1bbmaw-2 eff high/medium status 200
DeepSeek control (same large sweep, succeeds):
ocx-mt1bns5q-3 model deepseek-v4-flash eff high status 200
ocx-mt1bo65y-5 model deepseek-v4-flash eff high status 200
codex exec deepseek → git status + 41 branches returned in <30s
Matrix tested:
| Prompt size |
Model |
Effort |
Result |
small hi (8 tokens) |
spark |
xhigh/high/medium/low |
200 |
| synthetic 40k + bash tool |
spark |
medium/low |
200 / high timeout |
| CodexBar large sweep |
spark |
low/medium/high/xhigh |
502 (all) |
| CodexBar large sweep |
deepseek |
high |
200 |
| CodexBar large sweep |
gpt-5.6-luna |
low |
200 |
~/.opencodex/service.log diagnostic:
debugProviderDiagnostic openai-chat stream-truncated {finishReason:null hadUsage:false pendingToolCalls:1} then yield error mid tool call
Screenshots and supporting files
localhost:10100/#logs 2026/08/20 17:16:39-58 5x muse-spark high 502 unreported
Codex UI Reconnecting 1/5...5/5 screenshots (large sweep) vs deepseek success screenshots available on request
Redacted configuration
// ~/.opencodex/config.json providers.opencode-go
{
"modelReasoningEfforts": { "muse-spark-1.2-contributor": ["low","medium","high","xhigh","max"] },
"modelDefaultReasoningEfforts": { "muse-spark-1.2-contributor": "high" },
"modelContextWindows": { "muse-spark-1.2-contributor": 1048576 }
}
// ~/.codex/config.toml (reproduces on default)
model = "opencode-go/muse-spark-1.2-contributor"
model_reasoning_effort = "high"
openai_base_url = "http://127.0.0.1:10100/v1"
After reinstall (ocx uninstall → service install → sync --restart-codex) disabledModels reset and spark still reproduces, proving not local corruption. Mapping high->medium and modelMaxOutputTokens 65536 tested, still 502 on large sweep.
Checks
Client or integration
Codex App
Area
Provider adapter
Summary
opencode-go/muse-spark-1.2-contributorviaopencodex proxy 10100consistently truncates on large-context + tool-call streams:502 upstream_server_errorupstream stream ended mid tool call without a terminal signal — possible truncationsrc/adapters/openai-chat.ts:1734. Small prompts succeed, the same largeCodexBarsweep fails at all reasoning levelslow/medium/high/xhigheven after reinstall, whileopencode-go/deepseek-v4-flashon identical prompt succeeds200.Codexthen does5/5useless retries.Reproduction
opencodex 2.27.0bun~/.hermes/node/lib/node_modules/@bitkyc08/opencodex,codex 0.147.0openai_base_url http://127.0.0.1:10100/v1,macOS 15.5 Darwin 24.x,muse-spark context 1048576baseUrl https://opencode.ai/zen/go/v1, workspaceCodexBar-bug:feat main a3457dafbCodexReconnecting 1/5...5/5thenstream disconnected before completion: upstream stream ended mid tool call without a terminal signal — possible truncation,localhost:10100/#logsshows502withunreportedtokens.Version
2.27.0
Operating system
macOS 15.5 (Darwin 24.6.0, arm64)
Provider and model
opencode-go / muse-spark-1.2-contributor
Logs or error output
~/.opencodex/usage.jsonltruncated batch (high, still truncates):All share:
adapter openai-chat status 502 errorCode upstream_server_error recoveryKinds [] usageStatus unreportedSmall control (same model, small prompt, succeeds):
DeepSeek control (same large sweep, succeeds):
Matrix tested:
hi(8 tokens)~/.opencodex/service.logdiagnostic:debugProviderDiagnostic openai-chat stream-truncated {finishReason:null hadUsage:false pendingToolCalls:1}thenyield error mid tool callScreenshots and supporting files
localhost:10100/#logs2026/08/20 17:16:39-58 5xmuse-spark high 502 unreportedCodexUIReconnecting 1/5...5/5screenshots (large sweep) vsdeepseeksuccess screenshots available on requestRedacted configuration
After reinstall (
ocx uninstall→service install→sync --restart-codex)disabledModelsreset andsparkstill reproduces, proving not local corruption. Mappinghigh->mediumandmodelMaxOutputTokens 65536tested, still502on large sweep.Checks