You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG/FEATURE] Light Mode doesn't work in Zellij #4464
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)
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.
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
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
Activity
rekram1-node commentedon Nov 18, 2025
will fix
benodiwal commentedon Jan 5, 2026
@rekram1-node can i work on this issue ?
linuxmobile commentedon Jan 6, 2026
Light mode is working fine in zellij, the issue with zellij is the cache zellij-org/zellij#3590 (comment)
pureboys commentedon Jan 12, 2026
upgrade zellij 0.43.1 is work for me
smeijer commentedon Jan 12, 2026
Same issue inside Jetbrains IDE's. Does anyone know a fix?
Br1an67 commentedon Mar 1, 2026
I'd like to work on this. Added a
theme_modeoption (light/dark/system) totui.jsonthat 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 commentedon 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
Affected Modules
Proposed Solution (PR #15612)
Add config option to :
Valid values: , , (default)
Priority Order
Alternative Fix
Upgrade Zellij to 0.43.1+ which fixes the underlying cache issue.
Risks
Full research: logs/issues/4464/research.md
fix: detect light mode in Zellij terminal multiplexer
kommander commentedon 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 commentedon 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 commentedon 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.