anomalyco / anomalyco/opencode

tmux: terminal's replies to startup capability probes printed at the prompt

Open
#40,035 1 comment 1 reaction 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 1, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

hi!

i found a bug where launching opencode inside tmux prints the terminal's replies to
opencode's own startup capability probes as literal text at the prompt.

the replies start with ESC [, and tmux parses that as M-[ before the rest reaches
the pane. i have M-[ bound, so each reply also flips me to another window:

bind -n M-[ previous-window          # Opt+[
bind -n M-] next-window              # Opt+]

what lands in the terminal:

?2027;1$y?2026;2$y

the ESC [ is missing from the visible text because tmux consumed it as the binding.
that's probably also the tab-switching reported in #22210 and #15744.

i think this bug is the same one that was reported in #22210, #16547 and #15744,
which were all auto-closed, and it still reproduces on 1.18.5.

Plugins: none

OpenCode version: 1.18.5

Steps to reproduce:

  1. tmux with set -g allow-passthrough on
  2. open two or more windows
  3. run opencode in one of them
  4. escape sequence text appears at the prompt

Operating System: macOS 26.5.2 (arm64)

Terminal: ghostty 1.3.1 + tmux 3.7b, TERM=tmux-256color

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.