claude-code - 💡(How to fix) Fix [BUG] terminalProgressBarEnabled (OSC 9;4) doesn't work inside tmux

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…

Code Example

set -g default-terminal "tmux-256color"
  set -g allow-passthrough on

---

"terminalProgressBarEnabled": true
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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

  1. Set terminalProgressBarEnabled: true in ~/.claude/settings.json
  2. Run Claude Code inside tmux (tmux 3.6a, allow-passthrough on)
  3. Give Claude a task that takes a few seconds
  4. 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:

set -g default-terminal "tmux-256color"
set -g allow-passthrough on

Relevant ~/.claude/settings.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.

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