You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TUI remains active after agent loop logs exiting loop with local OpenAI-compatible vLLM provider #31109
This does not appear to be a backend/model generation hang.
Environment:
OpenCode 1.16.2
Provider: custom OpenAI-compatible provider via @ai-sdk/openai-compatible
Model endpoint: local LAN vLLM serving Qwen3.5 122B NVFP4
LSP enabled; Pyright was active
Observed behavior:
OpenCode TUI continued to display an active-looking assistant block.
GPU was idle.
There was no active TCP connection from OpenCode to the vLLM host.
Manual kill of the OpenCode process was required to recover the terminal/TUI.
Log evidence:
The OpenCode log showed the agent loop reaching step=25 loop.
Immediately after, it logged exiting loop.
Before that, OpenCode had successfully read a python file.
Pyright/LSP was active and working.
Interpretation:
The model/backend request appears to have completed or been abandoned before the visible hang. The issue looks like the TUI/session state does not transition to a clear done/error/idle state after the agent loop exits.
Related observation:
A previous run showed similar symptoms after step=50 loop followed by exiting loop. After increasing agent.build.steps to 200, the later reproduction still exited at step=25, so this does not appear to be only the configured step limit.
Expected behavior:
When the agent loop logs exiting loop, the TUI should clearly transition to idle/done/error, or surface the reason the loop exited.
Similar issues : #17516 for “hang after completing tool calls” #14972 for premature stop after tool execution / finish-reason loop logic #20669 for local OpenAI-compatible tool-call quirks #12893 / #10630 for Qwen/vLLM local-provider related hangs #15310 for TUI after-stream/finish behavior
Plugins
None
OpenCode version
1.16.2
Steps to reproduce
This is configuration specific issue, not step specific. Configuration is listed.
The OpenCode version template field is left as _No response_ — please fill in the version (you mentioned 1.16.2 in the description body, but it should go in the dedicated field).
The Steps to reproduce template field is empty (_No response_). Bug reports should include concrete reproduction steps so maintainers and others can verify the behavior. Even a rough sequence (e.g., configure custom provider → start session → observe TUI state after loop exits) would help.
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:
Thanks for updating the issue! It now has all the required information and looks good. We appreciate the detailed description, environment info, and log evidence. We'll take a look.
Activity
github-actions commentedon Jun 6, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
_No response_— please fill in the version (you mentioned1.16.2in the description body, but it should go in the dedicated field)._No response_). Bug reports should include concrete reproduction steps so maintainers and others can verify the behavior. Even a rough sequence (e.g., configure custom provider → start session → observe TUI state after loop exits) would help.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:
opencode runhangs after completing tool calls — process never exits #17516:opencode runhangs after completing tool calls (you referenced this yourself — worth confirming if this is distinct)If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon Jun 6, 2026
Thanks for updating the issue! It now has all the required information and looks good. We appreciate the detailed description, environment info, and log evidence. We'll take a look.
route opencode through a persistent `opencode serve`
github-actions commentedon Aug 6, 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.