Skip to content

Web UI: Qwen3.6 Plus free model continues generating after asking question without waiting for user answer #28712

Closed as not planned

Description

@aand18

Bug Description

When using the Qwen3.6 Plus free model in the web UI, the assistant asks the user a question (via the question tool) but does not wait for the user's answer — it immediately continues generating as if the user already responded.

This issue is not observed with other models.

Reproduction

  1. Open a session in the web UI
  2. Select the model Qwen3.6 Plus free
  3. Send a message that requires clarification
  4. The assistant asks a question like "Want me to update the spec with this?"
  5. Bug: Instead of waiting for the user's response, the assistant immediately continues reasoning:
Want me to update the spec with this?

         <--- here it doesn't wait for an answer and acts as if I already answered

The user is asking about alternatives to ...

Or in another scenario:

User: what are the downsides of...

Assistant:
Downsides of ....
.....

Want me to update the spec?

         <--- here it doesn't wait for an answer and acts as if I already answered

The user is asking about the downsides of <...>
 ....

Expected Behavior

When the assistant calls the question tool, it should:

  1. Display the question to the user
  2. Block and wait for the user's answer
  3. Only continue generating after receiving the answer

Actual Behavior

The model continues generating text after emitting the question tool call, without waiting for the tool result. The reasoning continues as if the question was already answered.

Root Cause Analysis (Qwen 3.6 Plus generated)

Looking at the codebase, the question tool execution blocks on Deferred.await in packages/opencode/src/question/index.ts:174-179, waiting for the user to reply or reject. The UI correctly hides the question tool when status is pending or running (packages/ui/src/components/message-part.tsx:570).

The issue is likely that the Qwen model provider (via the opencode/zen provider) does not properly stop generation after emitting a tool call. Some models continue streaming text content alongside or after the tool call in the same response, rather than stopping and waiting for the tool result to be sent back.

Relevant Code

  • Question tool blocking: packages/opencode/src/question/index.ts:155-180
  • Question tool UI hiding: packages/ui/src/components/message-part.tsx:570, packages/ui/src/components/session-turn.tsx:98
  • Tool execution in prompt loop: packages/opencode/src/session/prompt.ts:417-446
  • LLM streaming: packages/opencode/src/session/llm.ts:336-415 (uses Vercel AI SDK streamText)
  • Provider transform for Qwen: packages/opencode/src/provider/transform.ts:392,410,454

Possible Fixes

  1. Provider-level: If the Qwen provider supports it, enable proper tool calling mode that stops after tool calls
  2. Stream-level: Detect and discard text content that arrives after a tool call in the same step but before tool results are available
  3. Loop-level: Ensure the prompt loop breaks when a question tool is pending, regardless of finish reason

Environment

  • Model: Qwen3.6 Plus free
  • Provider: opencode / zen
  • UI: Web UI (packages/app)
  • Not reproducible with: Other models (Zen Deepseek V4 Flash free , local Qwen 3.6 27B etc.)

Activity

  1. aand18 commented on May 21, 2026

    @aand18
    Author

    I can reproduce the bug by forking and replaying a message before the issue first occurred (30k tokens in). Eg:

    
    Assistant: 
    A. ..
    B. .. 
    C. ..
    D. ..
    Which approach fits your goals?
    
    User: a ok
    
    Assistant:  
    <think>User confirmed AcoustID approach, now I should continue the brainstorming process with the next clarifying question.
    
              <--- here it looks like it got stuck and didn't wait for a reply but generated the answer again
    
    <think> User confirmed AcoustID approach. Now need to ask next clarifying question about P2P network topology. </think>
    
    Great, A it is!
    

    Note: I did use the "brainstoming" skill from the Superpowers package before noticing the issue:

    https://gist.github.com/aand18/28af4a764e6a68b089ab019ef96f0482

  2. aand18 commented on May 21, 2026

    @aand18
    Author

    I can reproduce it in web UI, not in TUI.

  3. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Collaborator

    Automated: closing question issues.

    GitHub Issues are for bug reports and feature requests only — questions / support are no longer tracked here.

    If this is a bug or feature request, please open a new issue with the appropriate template.

  4. rekram1-node commented on Jun 23, 2026

    @rekram1-node
    Collaborator

    Reopening – this was incorrectly closed by automated question-issue cleanup. Sorry for the noise.

  5. github-actions commented on Aug 23, 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