claude-code - 💡(How to fix) Fix Docs: document CLAUDE_CODE_TMUX_TRUECOLOR in env-vars reference [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46146Fetched 2026-04-11 06:27:51
View on GitHub
Comments
0
Participants
1
Timeline
4
Reactions
0
Participants
Timeline (top)
labeled ×3subscribed ×1

CLAUDE_CODE_TMUX_TRUECOLOR=1 is a real, functional escape hatch inside src/ink/colorize.ts (function clampChalkLevelForTmux, lines ~47–57). When set, it disables the defensive chalk.level = 2 clamp that Claude Code applies whenever $TMUX is present, restoring full 24-bit truecolor rendering inside tmux panes.

It is currently undocumented.

Root Cause

CLAUDE_CODE_TMUX_TRUECOLOR — When set to any truthy value, disables the defensive 256-color clamp that Claude Code applies inside tmux. Use this if your tmux is already configured for truecolor passthrough (terminal-features ',<term>:RGB') and you are seeing washed-out colors in the TUI. Must be exported from the shell (e.g. in ~/.zshrc / ~/.bashrc / ~/.config/fish/config.fish), not settings.json, because the clamp is evaluated at module load before settings env injection. See #36785 for context on the underlying issue.

Fix Action

Fix / Workaround

The underlying truecolor-clamp regression is tracked in #36785 and is visually observable in #37215 (Claude mascot rendering as pink/salmon instead of terracotta), #35148, #37770, #35806, and #32365. Until that underlying bug is fixed, CLAUDE_CODE_TMUX_TRUECOLOR is the only user-facing workaround that actually restores correct colors for users with truecolor-capable terminals (Ghostty, Alacritty, iTerm2, kitty, WezTerm) running inside properly-configured tmux. Without documentation, users must either read the bundled source or get lucky finding a stale comment thread.

This issue is scoped specifically to documentation. #36785 tracks the underlying clamp logic and whether it should be relaxed. Even if the clamp is eventually fixed, CLAUDE_CODE_TMUX_TRUECOLOR should still be documented as the interim workaround for users on older versions.

RAW_BUFFERClick to expand / collapse

Summary

CLAUDE_CODE_TMUX_TRUECOLOR=1 is a real, functional escape hatch inside src/ink/colorize.ts (function clampChalkLevelForTmux, lines ~47–57). When set, it disables the defensive chalk.level = 2 clamp that Claude Code applies whenever $TMUX is present, restoring full 24-bit truecolor rendering inside tmux panes.

It is currently undocumented.

Where it's missing

Checked and not mentioned on any of:

The only public mention on the entire internet is a user comment in #36785.

Why it matters

The underlying truecolor-clamp regression is tracked in #36785 and is visually observable in #37215 (Claude mascot rendering as pink/salmon instead of terracotta), #35148, #37770, #35806, and #32365. Until that underlying bug is fixed, CLAUDE_CODE_TMUX_TRUECOLOR is the only user-facing workaround that actually restores correct colors for users with truecolor-capable terminals (Ghostty, Alacritty, iTerm2, kitty, WezTerm) running inside properly-configured tmux. Without documentation, users must either read the bundled source or get lucky finding a stale comment thread.

Ask

Add a short entry to https://code.claude.com/docs/en/env-vars (and ideally cross-link from the terminal-config page) with roughly this content:

CLAUDE_CODE_TMUX_TRUECOLOR — When set to any truthy value, disables the defensive 256-color clamp that Claude Code applies inside tmux. Use this if your tmux is already configured for truecolor passthrough (terminal-features ',<term>:RGB') and you are seeing washed-out colors in the TUI. Must be exported from the shell (e.g. in ~/.zshrc / ~/.bashrc / ~/.config/fish/config.fish), not settings.json, because the clamp is evaluated at module load before settings env injection. See #36785 for context on the underlying issue.

Not a duplicate of #36785

This issue is scoped specifically to documentation. #36785 tracks the underlying clamp logic and whether it should be relaxed. Even if the clamp is eventually fixed, CLAUDE_CODE_TMUX_TRUECOLOR should still be documented as the interim workaround for users on older versions.

Environment

Not strictly required for a docs issue, but for completeness: macOS 15 (Darwin 25.4.0), Ghostty, tmux 3.6a, Claude Code 2.1.100.

extent analysis

TL;DR

Add documentation for the CLAUDE_CODE_TMUX_TRUECOLOR environment variable to the Claude Code documentation.

Guidance

  • Add a short entry to the environment variables documentation page describing the purpose and usage of CLAUDE_CODE_TMUX_TRUECOLOR.
  • Consider cross-linking from the terminal configuration page for easier discovery.
  • Ensure the documentation includes the requirement to export the variable from the shell configuration file (e.g., ~/.zshrc, ~/.bashrc, or ~/.config/fish/config.fish).
  • Verify that the documentation is accurate and up-to-date, even if the underlying issue is eventually fixed.

Notes

The documentation update is a separate task from resolving the underlying issue tracked in #36785, and it will remain relevant as a workaround for users on older versions.

Recommendation

Apply workaround: Document the CLAUDE_CODE_TMUX_TRUECOLOR environment variable to provide a clear and accessible solution for users experiencing color rendering issues in tmux.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING