Skip to content

Duplicate assistant messages in Web UI #21335

@PierreMesure

Description

@PierreMesure

Description

When using OpenCode Web UI, getting an answer from the assistant takes a long time. After checking the context, this is because it seems many answers are generated and only one at the end is shown. This bug is absent from the terminal UI, even on the same session.

Plugins

No response

OpenCode version

1.3.17 (and tested with 1.3.10 as well)

Steps to reproduce

  1. Open opencode web in an empty folder, no need for opencode.json either.
  2. Write "hey" to the assistant
  3. Open the Context tab to see which messages were exchanged. A dozen assistant messages are appended BEFORE the user message that are not shown in the actual conversation.

Screenshot and/or share link

https://opncd.ai/share/R3hUH8lv

Image

The first user message is sent using the TUI, then the second one through the web UI (and gets many answers, the last one being the only visible in the web chat thread). The third one is through the TUI again and the 4th from the web UI (with many answers again).

hey (user)
Thinking: The user is just saying "hey" - a simple greeting. I should respond concisely.
Hey! How can I help you today?
▣ Build · Big Pickle · 3.4s
Just testing
Thinking: The user is just testing. I should keep my response very brief and casual.
All good! Let me know when you have a task you'd like help with.
▣ Build · Big Pickle · 2.0s
Thinking: The user is just testing, so I'll keep my response brief and friendly, letting them know I'm ready to help when needed.
All good! Let me know when you need help with something.
▣ Build · Big Pickle · 3.8s
Thinking: The user is just testing my functionality. I should give a brief, friendly response acknowledging this and letting them know I'm ready to help.
All good! Let me know when you have something you'd like help with.
▣ Build · Big Pickle · 5.7s
Thinking: The user is just testing, so I'll keep my response brief and casual.
Got it! Ready when you need me.
▣ Build · Big Pickle · 7.3s
Thinking: The user is just testing. I'll give a brief, casual response.
Got it! Ready when you need me.
▣ Build · Big Pickle · 8.5s
Thinking: The user is just testing, so I'll keep my response brief and casual, letting them know I'm ready to help.
Got it! Ready when you need me.
▣ Build · Big Pickle · 9.6s
Thinking: The user is just testing, so I'll keep my response brief and casual.
Got it! Let me know when you need help with something.
▣ Build · Big Pickle · 11.4s
Switch agent
Thinking: The user is just testing. I should give a brief, casual response acknowledging this and letting them know I'm ready to help when needed.
Got it! Ready when you need me.
Build
Big Pickle
OpenCode Zen
▣ Build · Big Pickle · 12.8s
Thinking: The user is just testing. I should give a brief, casual response acknowledging this and letting them know I'm ready to help when needed.
Got it! Let me know when you need help with something.
▣ Build · Big Pickle · 14.2s
Thinking: The user is just testing, so I should give a brief and friendly response.
Got it! Ready when you need me.
▣ Build · Big Pickle · 15.6s
Thinking: The user is just testing. I should give a brief, friendly response acknowledging this and letting them know I'm ready to help.
Got it! Ready when you need me.
▣ Build · Big Pickle · 17.0s
Thinking: The user is just testing, so I should give a brief, casual response acknowledging this.
Got it! Ready when you need me.
▣ Build · Big Pickle · 18.1s
Thinking: The user is just testing. I'll keep my response brief and casual, just acknowledging and letting them know I'm ready.
All good! Let me know when you have something you'd like help with.
▣ Build · Big Pickle · 19.7s
Thinking: The user is just testing, so I should give a brief, casual response acknowledging this.
All good! Let me know when you need help with something.
▣ Build · Big Pickle · 21.1s
There seems to be a bug with you (user)
Thinking: The user says there's a bug with me. They might be referring to my response - I notice I sent a lot of duplicate messages in my last response, which is indeed a bug. Let me acknowledge this.
Apologies for the duplicate messages in my last response - that was a glitch on my end.
What can I help you with?
▣ Build · Big Pickle · 2.9s
Trying again with opencode web instead of serve (user)
Thinking: The user is saying they're trying opencode with web instead of serve. This seems like a comment about their setup/configuration, not a specific task request. They might be troubleshooting an issue or just informing me about their environment.
I should respond briefly and let them know I'm ready to help.
Got it. Let me know if you run into any issues or need help with something!
▣ Build · Big Pickle · 2.8s
Thinking: The user seems to be setting up their environment. They're noting that they're using opencode with web instead of serve. I should acknowledge this and let them know I'm ready to help if they encounter any issues or need assistance with anything.
Thanks for the update! I'm ready to help when you need it.
▣ Build · Big Pickle · 4.8s
Thinking: The user seems to be testing their setup with opencode using the web interface instead of the serve command. They mentioned "trying again" which suggests they may have had issues before.
I should acknowledge this briefly and let them know I'm here to help if they need anything. No need for a lengthy response.
Got it, switching to the web setup. Let me know if you need any help!Got it! Switching to web mode. Let me know if you need help with anything!Got it, using web now. Let me know if you need any help!Got it! Using web now. Let me know if you need any help!Got it! Let me know if you need any help!
▣ Build · Big Pickle · 8.2s
Thinking: This is clearly a test message. The user is just testing the system. I should respond very briefly.
Understood. Testing the web setup?
▣ Build · Big Pickle · 9.9s
Thinking: Testing Web-Based Tools
I'm currently focused on how the user interacts with the tool via the web interface. There seems to be some feedback loop affecting the tool's responsiveness, and I'm trying to understand if it's specific to the web configuration. The user's initial reports of a bug may be related to this.
Got it! Switching to web mode. Let me know if you need any help!Got it, testing the web interface now. Ready to help!Got it! Using web now. Let me know if you need anything!Got it! Ready to help when you are. Got it, using web now. Let me know if you need any help!Got it! Let me know if you need help with anything.Got it! Ready when you need me. Got it! Let me know if you need help.Got it! Switching to web now. Let me know if you need any help!Got it, testing with web. Ready when you need me!
▣ Build · Big Pickle · 13.6s
Thinking: I need to stop the repeated response glitch. Let me just give a single clean response.
Got it, testing with the web setup. Let me know if you run into any issues!
▣ Build · Big Pickle · 14.9s
Thinking: I need to stop the repeated response glitch. Let me just give a single clean response.
Got it! Switching to web mode. Let me know if you need help with anything.
▣ Build · Big Pickle · 16.4s
Thinking: The duplicate response glitch seems to be happening again. I need to stop and give just ONE response. Let me just acknowledge the user briefly.
Got it. Testing the web setup? Let me know if you need any help!
▣ Build · Big Pickle · 18.6s
Thinking: The duplicate response issue happened again. Let me try to give just one clean response.
Got it. Let me know if you need any help!
▣ Build · Big Pickle · 20.2s
Thinking: That response was a mess - I had another duplicate response glitch. I need to give just ONE simple response now.
Understood. I'm here if you need any help!
▣ Build · Big Pickle · 22.0s

Operating System

Ubuntu 24.04

Terminal

VS Code terminal

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions