Skip to content

Silent empty assistant response makes long GUI sessions appear stuck #30411

Closed as not planned

Description

@askforoneZY

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.5 in 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:

  1. Open OpenCode GUI/web UI.
  2. Use an OpenAI GPT model.
  3. Keep a session running for a long time with many normal prompts and tool calls, so the conversation becomes large.
  4. Send another ordinary prompt after the session is already large.
  5. Sometimes the assistant turn ends silently with no text, no tool call, and no patch.
  6. The UI does not show a clear error, so the session appears unable to continue.
  7. Run /undo one or more times, or run /compact.
  8. 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

  1. github-actions commented on Jun 2, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The description reads as an AI-generated analysis of potential failure modes rather than an actual observed bug. The bug report template explicitly asks to avoid pasting AI-generated summaries.
    • No environment information is provided (OS, OpenCode version, model used) — these help maintainers reproduce and triage the issue.
    • No concrete steps to reproduce are included. The "observed failure modes" are listed abstractly without describing what actually happened in a real session.

    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.

  2. changed the title [-]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[/+] on Jun 2, 2026
  3. github-actions commented on Jun 2, 2026

    @github-actions
    Contributor

    This issue still doesn't fully meet our contributing guidelines.

    What still needs to be fixed:

    • No environment information: OS, OpenCode version, and model/provider used are still missing. These are necessary for maintainers to reproduce and triage the issue.
    • No concrete reproduction steps: The description says the failure occurred "during a normal conversation" but doesn't describe what actually happened — what prompt was sent, what model/provider was in use, what the session looked like before the empty response occurred. Without this, the issue can't be reproduced.
    • Content still appears AI-generated: The disclaimer at the top doesn't change that the body reads as a structured analysis of hypothetical failure modes ("DCP-style compaction", "OMO-style workflows", grouped symptom categories) rather than a firsthand account of a real bug. The referenced related issues (Opencode halts on "Generating.." when context reaches around 35% for qwen3-coder-480b #3189, BUG: Compact + Queue interaction #2609, client.session.summarize hangs 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:

    1. Your OS, OpenCode version (run opencode --version), and the model/provider you were using
    2. A short, concrete description of what you did before the empty response occurred

    Keep the description focused on what you actually observed.

  4. changed the title [-]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[/+] on Jun 2, 2026
  5. github-actions commented on Jun 2, 2026

    @github-actions
    Contributor

    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.

  6. naufalahmadfauz commented on Jun 3, 2026

    @naufalahmadfauz

    Bump, this is frustrating i need to send "Continue" everytime it gets stopped silently

  7. askforoneZY commented on Jun 4, 2026

    @askforoneZY
    Author

    哎,真烦人,每次程序静默停止后我都得手动发送“继续”命令。

    我已经修复了这个BUG。但是PR还没合并。静默失败大概率是上下超过了。还需配置opencode-dcp插件。这个插件能够分片压缩。而opencode本身的压缩,gpt上下超了压缩不成功(没分片,上下大了,gpt端没返回)这样能够解决动不动静默失败的问题,但是opencode-dcp本身也有问题,压缩比太低了,压缩了对话没几下又压缩。多重压缩虽然可以一直运行。但是很费token。

  8. askforoneZY commented on Jun 4, 2026

    @askforoneZY
    Author

    这个静默失败问题起码存在半年了。。。原因很好找,但是修改挺费事,跑了20多亿token才整好。最好官方把/compact给整个大改了。现在压缩上下文基本没什么用。上下文超过了大概率压缩失败

  9. github-actions commented on Aug 4, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions