Skip to content

[BUG/FEATURE] Light Mode doesn't work in Zellij #4464

Closed as not planned
Closed as not planned

Description

@not-reed

Description

when using https://zellij.dev/ opencode is always in dark mode. This alone could be a bug in how zellij reports system theme or something, however it would be nice to be able to manually select light/dark mode instead of only the 'theme' and have light-dark auto detected. 'system' seems to not actually follow the system in this case (only opencode has this issue for me)

OpenCode version

1.0.57

Steps to reproduce

  1. install zellij
  2. set light mode in zellij (catppuccin-latte)
  3. start zellij (its light mode)
  4. start opencode (its dark mode)

Screenshot and/or share link

No response

Operating System

Arch

Terminal

Ghostty 1.2.3

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 18, 2025
  2. rekram1-node commented on Nov 18, 2025

    @rekram1-node
    Collaborator

    will fix

  3. benodiwal commented on Jan 5, 2026

    @benodiwal

    @rekram1-node can i work on this issue ?

  4. linuxmobile commented on Jan 6, 2026

    @linuxmobile

    @rekram1-node can i work on this issue ?

    Light mode is working fine in zellij, the issue with zellij is the cache zellij-org/zellij#3590 (comment)

  5. pureboys commented on Jan 12, 2026

    @pureboys

    upgrade zellij 0.43.1 is work for me

  6. smeijer commented on Jan 12, 2026

    @smeijer

    Same issue inside Jetbrains IDE's. Does anyone know a fix?

  7. Br1an67 commented on Mar 1, 2026

    @Br1an67

    I'd like to work on this. Added a theme_mode option (light / dark / system) to tui.json that overrides terminal background color detection — set "theme_mode": "light" to force light mode in Zellij or other terminals that misreport the system theme.

    PR: #15612

  8. JuliaKalder commented on Mar 14, 2026

    @JuliaKalder

    Research Summary

    Root Cause

    The issue is caused by a Zellij cache bug (zellij-org/zellij#3590): OSC 10/11 queries return incorrect colors (always black) due to a caching problem. This causes opencode to incorrectly detect dark mode.

    Terminal Detection Flow

    1. opencode queries terminal background via
    2. Zellij returns black due to cache bug
    3. opencode detects dark background → applies dark mode

    Affected Modules

      • Theme detection
      • Config validation

    Proposed Solution (PR #15612)

    Add config option to :

    Valid values: , , (default)

    Priority Order

    1. (manual override) - highest
      • persisted preference
    2. Terminal detection (default)

    Alternative Fix

    Upgrade Zellij to 0.43.1+ which fixes the underlying cache issue.

    Risks

    • Low: Backward compatible (optional config)
    • Works for JetBrains IDE terminals which have similar issues

    Full research: logs/issues/4464/research.md

  9. added a commit that references this issue on Mar 15, 2026
    cdd38e8
  10. removed
    bugSomething isn't working
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on May 3, 2026
  11. kommander commented on May 3, 2026

    @kommander
    Collaborator

    Does it work with ctrl+p command palette and then choose "light mode" manually? That should also lock it in so it always starts up in light mode.

  12. not-reed commented on May 4, 2026

    @not-reed
    Author

    yes, switching manually with the palette seems to work fine now! (still would be nice if it followed the system theme though - but yes, seems this is might be a zellij cache bug at its core)

    with ghostty -> opencode, i can switch my system between light and dark and opencode follows the theme correctly.

    with ghostty -> zellij -> opencode, it is always dark unless i manually change it with the palette as you suggested

    i am using zellij 0.44.1 so the previous comments "Research Summary" doesn't seem to work for me

  13. 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