Repository navigation
[Bug] OpenCode TUI breaks during submit_plan #1893
Description
What happened?
OpenCode TUI breaks during submit_plan: render escape sequences are inserted as text into the input box and the UI becomes unreadable
Description
When the agent calls submit_plan, the OpenCode TUI glitches. A long line of raw terminal escape sequences appears in the input box and keeps growing, and I can no longer see what the agent is doing. The only way out is to cancel, quit OpenCode, and resume the session. This happens every time submit_plan is used, and for some time now. It was not fixed by updating Plannotator to [vX.Y.Z] yesterday.
What appears in the input box
The text is OpenCode's own rendering output shown literally, for example:
[?2026h [?25l [32;4H [38;2;47;75;115m [48;2;10;10;10m ········ [0m [28;6H [?25h [?2026l [?2026h [?25l [32;4H [38;2;45;73;111m ...
(synchronized-update markers, cursor hide/show, cursor positioning, 24-bit color changes). The colors shift slightly between repeated frames, so it looks like an animated element redrawing in a loop. The same text also appears in the input as the plan panel is visible on the right.
Steps to reproduce
- Start
opencodewith the Plannotator plugin - Let the agent call
submit_plan - The input box fills with the escape-sequence line and the TUI becomes unusable
Expected behavior
The TUI keeps rendering normally while the plan is open for approval.
Actual behavior
Render output is inserted as text into the input field and the display breaks until I quit and resume the session.
Environment
- OS: Windows 10 22h2
- Shell: Zsh (MSYS2)
- Terminals: Windows Terminal, Alacritty, WezTerm (same glitch in all three)
- opencode: 1.90
- oh-my-opencode-slim: 3.04
- @plannotator/opencode: [version]
- Node 22, Python 3.11
Screenshots
Workaround
Quit OpenCode and resume the session.
Possibly related (secondary)
After quitting while in this state, mouse tracking sometimes stays enabled and mouse movement is typed into the shell as 65;95;29M-style text. This may just be a consequence of the unclean exit.
Plannotator version
0.28.11
OS
Windows
Agent
OpenCode
Where did it happen?
Plan review
Activity