Skip to content

Auto theme mode does not work in tmux popup #19254

Closed as not planned
Closed as not planned

Description

@karamanliev

Description

The new auto theme mode added in #18851 does not work when OpenCode is launched inside a tmux popup.

Auto theme mode works as expected when OpenCode is running:

  • outside tmux
  • in a normal tmux pane
  • in a normal tmux window

The issue seems specific to tmux popup sessions.

Plugins

opencode-handoff

OpenCode version

1.3.2

Steps to reproduce

  1. Use the Unlock Theme Mode setting from the Ctrl+P command panel to set the theme mode follow the OS.
  2. Launch OpenCode inside a tmux popup.
  3. Change the OS appearance between light and dark mode.
  4. Observe that OpenCode in the popup does not follow the OS theme change.

Control cases:
5. Launch OpenCode outside tmux, or in a normal tmux pane/window.
6. Change the OS appearance again.
7. Observe that auto theme mode works correctly there.

Screenshot and/or share link

Video_2026-03-26_11-12-26_noaudio.mp4

Operating System

Arch Linux, Ubuntu

Terminal

kitty, ghostty

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 26, 2026
  2. Kenny-Ch commented on Mar 26, 2026

    @Kenny-Ch

    Can confirm this also happens outside tmux, running opencode directly in Ghostty on macOS.
    Environment:

    • OS: macOS (Dark Mode enabled)
    • Terminal: Ghostty
    • OpenCode: 1.3.2
    • No tmux involved
      Behavior: After updating to 1.3.2, opencode starts with a light theme regardless of the system appearance. Switching macOS back and forth between Dark/Light Mode does not trigger any theme change in opencode.
      Workaround: Manually switch the theme via Ctrl+P → select a dark theme → then Lock Theme Mode. Not ideal but works.

    This suggests the OSC 11 background color query in #18851 either isn't getting a response from Ghostty, or is misinterpreting it. The fallback when the query fails currently defaults to light — but I'd argue dark should be the fallback instead. Most developers using a terminal-based tool like opencode are running dark terminals, and an unexpected flash to a blinding white screen is a much worse experience than defaulting to dark when uncertain.

  3. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  4. github-actions commented on Jul 5, 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