[BUG] Inserts raw escape sequences into the input

Resolved 💬 2 comments Opened Mar 10, 2026 by Almazick Closed Mar 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When I run OpenCode in a CLI session through PuTTY, opening the command menu with Ctrl+P and then pressing the Down arrow causes raw characters to be inserted into the input instead of moving the selection. The last version that I know which works is opencode 1.2.15. Anything that I tried after 1.2.20 - 1.2.24 are broken

I also see characters being typed automatically when I move the mouse while OpenCode is open in the terminal.

What Should Happen?

There shouldn't be any raw escape sequences

Error Messages/Logs

Steps to Reproduce

  1. Open a remote shell using PuTTY.
  2. Start OpenCode in the CLI.
  3. Press Ctrl+P to open the command menu.
  4. Press the Down arrow key.
  5. Observe that raw escape sequences are typed into the input instead of moving the selection.

or

  1. Open a remote shell using PuTTY.
  2. Start OpenCode in the CLI.
  3. Move the mouse over the terminal.
  4. Observe that more characters / escape sequences are typed automatically.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

opencode-bin-1.2.15

Claude Code Version

clause is not installed

Platform

Other

Operating System

Other Linux

Terminal/Shell

Non-interactive/CI environment

Additional Information

!Image
!Image

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗