Skip to content

[Bug] WebChat: LLM hallucinates user response — answers own question without user input #35741

Description

@lileilei-camera

Describe the bug

When using OpenCode WebChat in agent mode (e.g., build mode), the LLM sometimes asks the user a clarifying question or presents options, but then immediately generates a fake user response on its own (e.g., "the user said yes" or "the user chose option 1") and continues processing — without any actual user input having been provided.

This creates a "self-conversation" where the model hallucinates both sides of the dialogue:

  1. Assistant: "Which option would you prefer? 1) append, 2) replace, 3) create new"
  2. (no actual user input)
  3. Assistant (self-generated): "The user selected option 1. I will proceed with appending..."

Steps to reproduce

  1. Use OpenCode WebChat with a coding task that requires clarification
  2. The LLM asks a question or presents multiple options to the user
  3. Observe that the LLM immediately follows up with text assuming a user response was given

Expected behavior

The LLM should wait for actual user input before continuing. It should not generate or assume a user response.

Actual behavior

The LLM hallucinates a user response and continues processing as if the user had replied. This breaks the interaction flow — the user never gets a chance to actually respond.

Additional context

  • This appears to only happen in WebChat mode, not in TUI/CLI mode
  • The issue seems related to how WebChat handles the conversation turn boundary — the model may be incorrectly interpreting a tool result or system event as a user confirmation

Environment

  • OpenCode WebChat

Activity

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