opencode silently stops on empty LLM responses; 1.18.20 claims retry fix

kevinkern · x · 2026-08-21

An opencode issue (#41469) describes that when a model endpoint returns an empty completion (0 tokens, unknown finish reason), opencode treats it as a successful turn: the session loop exits silently with no error or retry, so tasks appear to suddenly stop mid-run. The reporter included repro steps and expected behavior (retry or surface an error). kevinkorn says the retry issue is fixed in opencode 1.18.20, though he already runs that version; since pi struggles too, it's likely a network/endpoint problem — the endpoint sometimes returns empty responses, and harnesses handle them differently: opencode treated it as success while pi retries.

Related event: opencode Fixes Silent Session Exit on Empty API Responses(2 posts)→

Original post →

More from coding & agent

coding & agent channel →