Repository navigation
Silent empty assistant response makes long GUI sessions appear stuck #30411
Description
Environment
- OS: Windows 11 LTSC 10.0.26100
- OpenCode version: 1.15.13 (
opencode.cmd --version) - UI: GUI / web renderer
- Provider/model observed: OpenAI GPT model (
openai/gpt-5.5in the affected local session) - Notes: I have seen this most often with GPT-family models in the GUI/web UI. In my usage it is easy to hit in long-running sessions across recent GUI/web builds, but the concrete session I inspected was on 1.15.13.
What I actually observed
In a long-running GUI/web session, after many normal conversation turns and tool calls, I sent another normal prompt. The exact prompt content did not seem special; this happened while continuing ordinary coding/debugging work in an already large session.
The assistant turn then ended with no visible output:
- no assistant text
- no tool call
- no patch
- no visible error or warning in the UI
From the user's point of view, the session looked stuck or dead. It appeared as if the session could no longer continue the conversation.
Concrete reproduction shape
I cannot make it happen on the first prompt in a fresh session, but I can reproduce the failure shape easily in the GUI/web UI with long sessions, especially with GPT models:
- Open OpenCode GUI/web UI.
- Use an OpenAI GPT model.
- Keep a session running for a long time with many normal prompts and tool calls, so the conversation becomes large.
- Send another ordinary prompt after the session is already large.
- Sometimes the assistant turn ends silently with no text, no tool call, and no patch.
- The UI does not show a clear error, so the session appears unable to continue.
- Run
/undoone or more times, or run/compact. - The same session can often continue responding again afterward.
Actual result
OpenCode silently accepts the empty assistant turn as if the turn completed. There is no clear error and no obvious recovery instruction.
This is the main bug I am reporting: an empty model/provider response should not be swallowed silently.
Expected result
If the model/provider returns an empty assistant response with no text, no tool call, and no patch, OpenCode should surface that as an error instead of silently ending the turn.
If the session is near a context limit, OpenCode should either trigger compaction or report a clear compaction/context error so the UI or automation can react.
If compaction itself fails, that failure should also be shown clearly. It should not look like the assistant simply stopped replying.
Recovery I observed
The session was not permanently broken. After the silent empty turn, I was able to recover the same session by using multiple /undo commands or by running /compact.
That is why I suspect this is related to context pressure or compaction: reducing or rewinding the session lets the conversation continue.
Why this matters
For users, the failure looks like the whole session is broken. For automation or multi-agent workflows, the same silent empty turn can cause retries or repeated compaction attempts because there is no explicit error signal to react to.
The minimal expected fix is: do not silently pass an assistant response that contains no text, no tool call, and no patch. Surface a deterministic error, and if context pressure is detected, allow the normal compaction/recovery path to run.
Activity
github-actions commentedon Jun 2, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
If you believe this was flagged incorrectly, please let a maintainer know.
[-]Session can stall from empty responses and compaction races[/-][+]Silent empty model responses can make a session appear stuck until /undo or /compact is run[/+]github-actions commentedon Jun 2, 2026
This issue still doesn't fully meet our contributing guidelines.
What still needs to be fixed:
client.session.summarizehangs forever in Plugin #5449, etc.) also appear to be from a different project, which suggests the content was not written from direct experience with this codebase.Please edit the issue to include:
opencode --version), and the model/provider you were usingKeep the description focused on what you actually observed.
[-]Silent empty model responses can make a session appear stuck until /undo or /compact is run[/-][+]Silent empty assistant response makes long GUI sessions appear stuck[/+]github-actions commentedon Jun 2, 2026
Thank you for updating the issue! It now includes the environment details, concrete reproduction steps, and a clear description of what you observed. The report looks good — we appreciate you taking the time to revise it.
naufalahmadfauz commentedon Jun 3, 2026
Bump, this is frustrating i need to send "Continue" everytime it gets stopped silently
askforoneZY commentedon Jun 4, 2026
我已经修复了这个BUG。但是PR还没合并。静默失败大概率是上下超过了。还需配置opencode-dcp插件。这个插件能够分片压缩。而opencode本身的压缩,gpt上下超了压缩不成功(没分片,上下大了,gpt端没返回)这样能够解决动不动静默失败的问题,但是opencode-dcp本身也有问题,压缩比太低了,压缩了对话没几下又压缩。多重压缩虽然可以一直运行。但是很费token。
askforoneZY commentedon Jun 4, 2026
这个静默失败问题起码存在半年了。。。原因很好找,但是修改挺费事,跑了20多亿token才整好。最好官方把/compact给整个大改了。现在压缩上下文基本没什么用。上下文超过了大概率压缩失败
github-actions commentedon Aug 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.