Skip to content

TUI remains active after agent loop logs exiting loop with local OpenAI-compatible vLLM provider #31109

Closed as not planned

Description

@BostjanR

Description

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.

Screenshot and/or share link

No response

Operating System

Ubuntu 24.04

Terminal

Ubuntu terminal

Activity

  1. github-actions commented on Jun 6, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • 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:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. added
    needs:complianceThis means the issue will auto-close after 2 hours.
    and removed
    needs:complianceThis means the issue will auto-close after 2 hours.
    on Jun 6, 2026
  3. github-actions commented on Jun 6, 2026

    @github-actions
    Contributor

    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.

  4. github-actions commented on Aug 6, 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