Skip to content

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

Closed as not planned

Description

@undont

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

Activity

  1. github-actions commented on Aug 1, 2026

    @github-actions
    Contributor

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  2. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions