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
Mouse Generates Garbled Text Input & Blocks User Input #3199
There is a situation when the agent is executing shell commands within an OpenCode session, then suddenly all text inputs and mouse clicks inside the OpenCode window create the garbled text that you can see in the screenshot.
During this time when the agent is interacting with a shell inside an OpenCode session, OpenCode becomes completely unusable until the agent finishes the shell interactions or I close the session and restart OpenCode completely. This always happens when the agent is interacting with a shell-based password prompt inside an OpenCode session. It seems like the password prompt in the agent's shell is somehow hijacking the OpenCode input box.
It would be really nice if tui can be as simple as a text prompt, would you consider something like "disable tui" option? I really like open code, but I also like how codename-goose handles that.
yeah i think we have another issue someone requested that in, we probably wont do that immediately but at some point there will most likely be a non tui version cant make any promises but ik a few other people have asked for it as well
Reacted by Juan Pablo, Xavier Riu and William George
Reproduced this in-session behavior again on OpenCode 1.18.18 (official Linux binary), on CachyOS Linux/Wayland inside the Cursor integrated terminal (TERM=xterm-256color, TERM_PROGRAM=vscode, COLORTERM=truecolor). After the provider operation completed normally, moving the mouse filled the prompt with raw SGR movement reports such as <35;176;6M, <35;115;18M, and <35;83;23M. The TUI then appeared unresponsive as continued movement added more input, but the OpenCode process remained alive and the correlated logs had no provider, watcher, snapshot, or MCP warnings/errors.
Mouse was not explicitly configured, so the documented mouse: true default applied. OpenCode 1.18.18 uses OpenTUI 0.4.5; with mouse enabled, modes 1000, 1002, 1003, and SGR 1006 are enabled. This looks like a recurrence of mouse input parsing/state desynchronization, potentially triggered by the Cursor/xterm.js + Wayland combination, but I have not isolated whether the fault is in OpenCode, OpenTUI, or the terminal interaction.
Both OPENCODE_DISABLE_MOUSE=1 opencode and setting mouse: false in ~/.config/opencode/tui.json (then restarting) avoid the issue.
Activity
github-actions commentedon Oct 15, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 16, 2025
we are currently rewriting the tui, should be able to fix these things better in the future
atlasoft commentedon Oct 18, 2025
It would be really nice if tui can be as simple as a text prompt, would you consider something like "disable tui" option? I really like open code, but I also like how codename-goose handles that.
-- sorry for the ot
rekram1-node commentedon Oct 18, 2025
yeah i think we have another issue someone requested that in, we probably wont do that immediately but at some point there will most likely be a non tui version cant make any promises but ik a few other people have asked for it as well
reachcreator commentedon Nov 2, 2025
I hadn't had this happen before but using the new version 1 inside Cursor today it happened for the first time. Mousing over it causes craziness.
mirsella commentedon Nov 3, 2025
is there a workaround ? Sometimes it works and sometimes not 🤷
rekram1-node commentedon Nov 4, 2025
We are looking into it, you can use 0.15.31 in the meantime as a work around:
bun x opencode-ai@0.15.31
guysoft commentedon Nov 11, 2025
Was this fixed? I see above 0.15.31 as a workaround, is that a downgrade or an upgrade?
rekram1-node commentedon Nov 11, 2025
@guysoft what version r u on? I think it was fixed but maybe you have a setup it still happens for?
mirsella commentedon Nov 11, 2025
not happening anymore for me
ltribolet commentedon Dec 25, 2025
Still happening for me:
Platform: Windows 11
Shell: PowerShell 7.5.4
Opencode Version: 1.0.198
This happens for me once I exited Opencode TUI, and even Opencode is not properly cleared up.
somera commentedon Dec 25, 2025
Windows 11
Git Bash
Opencode 1.0.200
Problem still exists
ltribolet commentedon Dec 25, 2025
On 1.0.201 that doesn't happen to me anymore.
somera commentedon Dec 25, 2025
Not fixed for me. I see the mouse events ...
Windows 11
Git Bash
Opencode 1.0.201
ltribolet commentedon Dec 25, 2025
Actually the issue arises when I exit with "ctrl+c", but not exiting with "/exit" command.
somera commentedon Dec 25, 2025
I'm exiting with
/exitagutmanstein-scale commentedon Mar 30, 2026
@thdxr @rekram1-node Hey all. I have a genuine fix for this bug here. I see the change to just disable mouse inputs was merged though.
daniel-baf commentedon Aug 14, 2026
Reproduced this in-session behavior again on OpenCode 1.18.18 (official Linux binary), on CachyOS Linux/Wayland inside the Cursor integrated terminal (
TERM=xterm-256color,TERM_PROGRAM=vscode,COLORTERM=truecolor). After the provider operation completed normally, moving the mouse filled the prompt with raw SGR movement reports such as<35;176;6M,<35;115;18M, and<35;83;23M. The TUI then appeared unresponsive as continued movement added more input, but the OpenCode process remained alive and the correlated logs had no provider, watcher, snapshot, or MCP warnings/errors.Mouse was not explicitly configured, so the documented
mouse: truedefault applied. OpenCode 1.18.18 uses OpenTUI 0.4.5; with mouse enabled, modes 1000, 1002, 1003, and SGR 1006 are enabled. This looks like a recurrence of mouse input parsing/state desynchronization, potentially triggered by the Cursor/xterm.js + Wayland combination, but I have not isolated whether the fault is in OpenCode, OpenTUI, or the terminal interaction.Both
OPENCODE_DISABLE_MOUSE=1 opencodeand settingmouse: falsein~/.config/opencode/tui.json(then restarting) avoid the issue.