[BUG] terminalProgressBarEnabled (OSC 9;4) doesn't work inside tmux
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When terminalProgressBarEnabled is set to true in settings.json, the progress bar doesn't appear when Claude Code is running inside tmux.
Claude Code emits raw OSC 9;4 sequences but doesn't wrap them in tmux's DCS passthrough format (\ePtmux;\e...\e\\), so tmux silently drops them.
Wrapping manually works. printf '\ePtmux;\e\e]9;4;1;50\e\\\e\\' correctly shows the progress bar in Ghostty through tmux, confirming passthrough is configured correctly on the tmux side (allow-passthrough on, tmux 3.6a).
Fix: detect $TMUX env var and wrap OSC sequences with DCS passthrough when running inside tmux.
What Should Happen?
Progress bar appears in the terminal when Claude Code is working, same as when running outside tmux.
Steps to Reproduce
- Set terminalProgressBarEnabled: true in ~/.claude/settings.json
- Run Claude Code inside tmux (tmux 3.6a,
allow-passthrough on) - Give Claude a task that takes a few seconds
- Observe: no progress bar appears
Outside tmux: progress bar works correctly.
Confirm passthrough itself works:
printf '\ePtmux;\e\e]9;4;1;50\e\\\e\\'
(this shows the bar, so tmux passthrough is fine, Claude Code just doesn't use the wrapper)
Claude Model
None
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.133 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Ghostty (v1.3.1)
Additional Information
Relevant tmux.conf settings:
```tmux
set -g default-terminal "tmux-256color"
set -g allow-passthrough on
Relevant `~/.claude/settings.json`:
```json
"terminalProgressBarEnabled": true
Tested with allow-passthrough all as well. Same result. The fix is straightforward: check for $TMUX env var at startup and wrap all OSC escape sequences with \ePtmux;\e...\e\\ when inside tmux.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗