Skip to content

opening opencode emits garbled text when tmux allow-passthrough option is on #15744

Closed as not planned

Description

Description

I have been having this issue for a long time, but I am opening a bug so we can track it, as I didn't find anything in the issue tracker.
The issue is that when I open opencode and I have another tab in the same tmux session opencode emmits garbled text (it looks like part of escape sequences) in the other tab. It even sometimes changes the tab to the other one automatically.
This only happens if I have allow-passthrough on in my tmux configuration.

Plugins

none

OpenCode version

1.2.15

Steps to reproduce

  1. Open tmux
  2. Set allow-passthrough on
  3. Open a second tmux tab
  4. Open opencode
  5. Navigate to the second tab
  6. You will see garbled text in the second tab (see screenshot)

Screenshot and/or share link

Image

Operating System

macOS 26.3

Terminal

Ghostty + tmux

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Mar 2, 2026
  2. Padraic-O-Mhuiris commented on Mar 23, 2026

    @Padraic-O-Mhuiris

    Can confirm similar behaviour

  3. dseravalli commented on Apr 26, 2026

    @dseravalli

    I just started getting a similar issue, except it reproduces with default Terminal, opencode, Tmux (except for passthrough on), and zsh env.

    Repro script

    #!/bin/zsh
    set -eu
    
    PREFIX="opencode-passthrough-repro"
    SESSION="$PREFIX-tmux"
    
    REPRO_DIR="/tmp/$PREFIX-pwd"
    CLEAN_HOME="/tmp/$PREFIX-home"
    CLEAN_CONFIG="/tmp/$PREFIX-config"
    CLEAN_DATA="/tmp/$PREFIX-data"
    CLEAN_CACHE="/tmp/$PREFIX-cache"
    
    OPENCODE_BIN="/Users/dseravalli/.opencode/bin/opencode"
    PATH_CLEAN="/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin"
    
    rm -rf /tmp/${PREFIX}-*(N)
    
    mkdir -p "$REPRO_DIR" "$CLEAN_HOME" "$CLEAN_CONFIG" "$CLEAN_DATA" "$CLEAN_CACHE"
    
    tmux -L "$SESSION" kill-server 2>/dev/null || true
    
    tmux -L "$SESSION" -f /dev/null new-session \
      "/bin/zsh -f -c '
        set -eu
    
        tmux set -g allow-passthrough on
    
        cd \"$REPRO_DIR\"
    
        env -i \
          HOME=\"$CLEAN_HOME\" \
          XDG_CONFIG_HOME=\"$CLEAN_CONFIG\" \
          XDG_DATA_HOME=\"$CLEAN_DATA\" \
          XDG_CACHE_HOME=\"$CLEAN_CACHE\" \
          PATH=\"$PATH_CLEAN\" \
          TERM=\"\$TERM\" \
          COLORTERM=\"\${COLORTERM:-}\" \
          SHELL=/bin/zsh \
          OPENCODE_DISABLE_CLAUDE_CODE=1 \
          OPENCODE_DISABLE_AUTOUPDATE=1 \
          \"$OPENCODE_BIN\"
      '"

    Env

    macOS 26.3
    Terminal 2.15 (466)
    zsh 5.9 (arm64-apple-darwin25.0)
    Tmux 3.6a
    Opencode 1.14.25

  4. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  5. github-actions commented on Jul 3, 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