anomalyco / anomalyco/opencode
tmux: terminal's replies to startup capability probes printed at the prompt
@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:
- tmux with
set -g allow-passthrough on - open two or more windows
- run opencode in one of them
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.