-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
[Bug]: opencode-go provider streaming — API calls complete on provider side but gateway never receives stream termination signal #93610
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.bugSomething isn't workingSomething isn't workingclawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.regressionBehavior that previously worked and now failsBehavior that previously worked and now fails
Type
Fields
Priority
None yet
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
This has happened for at least a week now, now sure what version. But basically I see all my cron jobs fail, whereas if I run the task manually it works fine.
The opencode-go provider plugin intermittently fails to forward stream completion events from the provider API to the gateway runtime. The provider-side HTTP stream delivers tokens successfully, but the final [DONE] / stream-close signal is never propagated. The gateway sits stuck on model_call:stream_progress until stuckSessionAbortMs (600ms) kills it, resulting in "LLM request failed." and "Request was aborted" errors.
This affects any model routed through the opencode-go provider (observed on deepseek-v4-flash).
Symptoms
Steps to reproduce
Expected behavior
Cron jobs to run completely.
Actual behavior
OpenClaw version
2026.6.6
Operating system
docker
Install method
docker
Model
opencode-go/deepseek-v4-flash
Provider / routing chain
openclaw->opencode-go
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Session Trajectory (from one affected run) seq=1 session.started 05:00:01 EDT seq=2 trace.metadata 05:00:01 seq=3 context.compiled 05:00:01 seq=4 prompt.submitted 05:00:01 18k total tokens ⬐ 622 seconds of silence ⬏ seq=5 model.completed 05:10:23 aborted=true externalAbort=true seq=6 trace.artifacts 05:10:23 seq=7 session.ended 05:10:23 promptError="This operation was aborted" Key detail: model.completed at seq=5 shows: The model produced 226 output tokens — visible on the provider side as a completed call — but model.completed only fired because the stuck-session recovery aborted it. The stream never closed naturally. Gateway Log Entries (diagnostic) stalled session: age=502s activeWorkKind=model_call lastProgress=model_call:stream_progress lastProgressAge=497s recovery=none stuck session recovery: age=622s action=abort_embedded_run aborted=true embedded_run_failover_decision: decision: surface_error provider: "opencode-go" fallbackConfigured: true aborted: true rawErrorPreview: "Request was aborted"Impact and severity
Affected: opencode-go users
Severity: blocks cron jobs
Frequency: 90% of cron jobs are failing for me.
Consequence: Missed tasks
Additional information
No response