Add system theme support (auto-switch between light/dark)
Description
Claude Code should support following the system theme, automatically switching between light and dark modes based on OS preferences.
Current Behavior
Claude Code has theme settings accessible via /theme or /config commands, allowing users to manually select between light and dark themes. However, there is no option to automatically follow the system theme.
Desired Behavior
Similar to VS Code's system theme support, Claude Code should automatically switch themes based on OS preferences.
VS Code implements this with settings like:
{
"window.autoDetectColorScheme": true,
"workbench.preferredDarkColorTheme": "Solarized Dark",
"workbench.preferredLightColorTheme": "Solarized Light"
}
Claude Code should offer similar functionality:
- Automatically switch to dark theme when system is in dark mode
- Automatically switch to light theme when system is in light mode
- Update in real-time when system theme changes (no restart required)
Use Case
Users who switch between light mode (daytime) and dark mode (nighttime) at the OS level expect all their development tools to follow the same preference. This creates a consistent experience across VS Code, terminals, and Claude Code.
Proposed Implementation
Add a new theme option alongside existing light/dark themes:
Via /theme command:
light(existing)dark(existing)autoorsystem(new - follow OS theme)
Or in ~/.claude/settings.json:
{
"theme": "auto"
}
Environment
- OS: macOS (though this should work on all platforms)
20 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
I have proposed a simple config that might helps
my current workaround: https://github.com/durandom/dotfiles/commit/29c6a04db06fd1f09a4924541abbeb469ebfdc25
obviously heavily bound to macos and wezterm.
+1
+1
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still occurring
need this badly. switching themes twice a day is a lil cumbersome, especially because you can't run /theme while claude is working
One workaround for iTerm2 is to set the Minimum Contrast setting.
<img width="371" height="106" alt="Image" src="https://github.com/user-attachments/assets/6ac2b91d-8b53-46d6-a1a2-8f1a90daf9a3" />
+1
+1
+1
I can't believe this is still active.
+1
+1
+1
+1
+1 — and worth noting: the
"auto"theme setting already exists in the codebase but only checks at startup.I dug into the binary and found that Claude Code already has an
"auto"theme option. Setting"theme": "auto"in~/.claude.jsontriggersdefaults read -g AppleInterfaceStyleto detect macOS appearance — but it only runs once at launch, not reactively.So the detection logic is already there. What's missing is:
NSAppearanceDidChangeNotification(or polling) so the theme updates mid-session when the OS appearance changes"auto"doesn't appear in the/themepicker and isn't documentedMy setup for reference:
theme = "light:CustomLight,dark:Broadcast"(switches live)"theme": "auto"in~/.claude.json(only works at launch)Ghostty and every other tool in my workflow reacts instantly to the appearance change. Claude Code is the only one that requires a fresh session.
@Nismo707, Which version of claude are you running? I use Ghostty and on macOS 26 and it didn't seem to work for me.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.