Skip to content

Suppress OSC taskbar reset on plain/piped stdout - #37646

Merged
ljacomet merged 1 commit into
releasefrom
eskatos/9.5/osc-plain
Apr 23, 2026
Merged

ljacomet merged 1 commit into
releasefrom
eskatos/9.5/osc-plain

Conversation

@eskatos

@eskatos eskatos commented Apr 23, 2026

Copy link
Copy Markdown
Member

The shutdown hook that emits ESC]9;4;0 BEL to clear iTerm/ConEmu/ Ghostty/Kitty taskbar progress was registered whenever the host terminal was detected via env vars, ignoring the active console mode and whether stdout was actually a terminal. That leaked the trailing control sequence into piped output and into --console=plain runs.

Gate the hook on the configuration that actually renders progress: skip it for ConsoleOutput.Plain, and for ConsoleOutput.Auto when stdout is not a TTY. Rich, Verbose, Colored, and Auto-with-TTY are unchanged, preserving the previous behavior.

Reviewing cheatsheet

Before merging the PR, comments starting with

  • ❌ ❓must be fixed
  • 🤔 💅 should be fixed
  • 💭 may be fixed
  • 🎉 celebrate happy things

The shutdown hook that emits ESC]9;4;0 BEL to clear iTerm/ConEmu/
Ghostty/Kitty taskbar progress was registered whenever the host
terminal was detected via env vars, ignoring the active console mode
and whether stdout was actually a terminal. That leaked the trailing
control sequence into piped output and into --console=plain runs.

Gate the hook on the configuration that actually renders progress:
skip it for ConsoleOutput.Plain, and for ConsoleOutput.Auto when
stdout is not a TTY. Rich, Verbose, Colored, and Auto-with-TTY are
unchanged, preserving the previous behavior.
@eskatos eskatos added this to the 9.5.0 RC4 milestone Apr 23, 2026
@eskatos eskatos self-assigned this Apr 23, 2026
@eskatos eskatos added a:bug This doesn't work as expected in:console output progress tty mintty cygwin cli labels Apr 23, 2026
@eskatos

This comment was marked as outdated.

@bot-gradle

This comment was marked as outdated.

@eskatos
eskatos marked this pull request as ready for review April 23, 2026 05:54
@eskatos
eskatos requested a review from a team as a code owner April 23, 2026 05:54
@eskatos
eskatos requested review from abstratt and asodja and removed request for a team April 23, 2026 05:54
@ljacomet
ljacomet added this pull request to the merge queue Apr 23, 2026
@cobexer cobexer linked an issue Apr 23, 2026 that may be closed by this pull request
Merged via the queue into release with commit 0ad6dd8 Apr 23, 2026
19 of 27 checks passed
@ljacomet
ljacomet deleted the eskatos/9.5/osc-plain branch April 23, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a:bug This doesn't work as expected in:console output progress tty mintty cygwin cli

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extra OSC characters leaking to output in iTerm

4 participants