GeezerVison is showing github.com — [BUG/FEATURE] Light Mode doesn't work in Zellij · Issue #4464 · anomalyco/opencode
[BUG/FEATURE] Light Mode doesn't work in Zellij #4464DescriptionDescription
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
- install zellij
- set light mode in zellij (catppuccin-latte)
- start zellij (its light mode)
- start opencode (its dark mode)
Screenshot and/or share link
No response
Operating System
Arch
Terminal
Ghostty 1.2.3 Reacted by Austin Wright and Adam Sherwood Activityrekram1-node commented on Nov 18, 2025 Reacted by Reed and Gregory M. Kapfhammer benodiwal commented on Jan 5, 2026 linuxmobile commented on Jan 6, 2026 Reacted by Ilkka Poutanen Reacted by Reed pureboys commented on Jan 12, 2026 upgrade zellij 0.43.1 is work for me smeijer commented on Jan 12, 2026 Same issue inside Jetbrains IDE's. Does anyone know a fix? Br1an67 commented on Mar 1, 2026 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 JuliaKalder commented on Mar 14, 2026 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
- opencode queries terminal background via
- Zellij returns black due to cache bug
- opencode detects dark background → applies dark mode
Affected Modules
Proposed Solution (PR #15612)
Add config option to :
Valid values: , , (default)
Priority Order
- (manual override) - highest
-
- 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 added a commit that references this issue on Mar 15, 2026This issue will close once commit cdd38e8 is merged into the 'dev' branch.cdd38e8 removed bugSomething isn't working opentuiThis relates to changes in v1.0, now that opencode uses opentui on May 3, 2026kommander commented on May 3, 2026 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. not-reed commented on May 4, 2026 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 github-actions commented on Jul 5, 2026 To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|