OpenCode now treats empty model turns as errors instead of successful assistant replies
CyberPunk-2022 · ghdev · 2026-07-19
OpenCode now surfaces empty provider responses as errors
This PR changes OpenCode's session handling so that if a provider returns stop plus usage data but no text and no tool call, the turn is no longer recorded as a successful assistant response. Instead, OpenCode stores an EmptyResponseError and emits a session error event.
Key points
- The finish reason and usage are still preserved for debugging.
- The fix is intentionally harness-level; it does not try to explain why the provider returned an empty completion.
- Tests were added and passed, including a regression that simulates a stop stream with usage but no text or tool call.
More from coding & agent
- NVIDIA says Nemotron 3 Ultra hit 97.1% on agentic RTL chip-design tasks — NVIDIAAI · 2026-07-27
- Tokyo Agent Forge hackathon shipped production-ready AI agents in one day — DavidBennett__ · 2026-07-27
- Long-running agents will need immutable event logs, this thread argues — sebpaquet · 2026-07-27
- Agentic Data Science in Practice: Agents Write Code but Answer Wrong Questions — hugobowne · 2026-07-27
- A VS Code extension adds Markdown-style highlighting to Alchemy string templates — samgoodwin89 · 2026-07-27
- Claude’s Stripe MCP connector is being called unusable after repeated disconnects — evielync · 2026-07-27