Skip to content

[CLI] OSC 11 background color query leaks into terminal prompt after freebuff --version (v0.2.38) #1743

Backlog

Description

@durban89

What happened

Describe the bug

After upgrading freebuff CLI to v0.2.38, running non-interactive commands like freebuff --version causes the terminal's OSC 11 background color response (e.g., 11;rgb:2c2c/3737/4646) to leak directly into the next shell prompt buffer.

This appears to be a regression in v0.2.38 where the TUI / terminal theme detection (OSC 11 query) is triggered unconditionally before parsing CLI flags like --version or --help, and the process exits before reading the terminal's reply.

To Reproduce

  1. Open KDE Konsole on Ubuntu.
  2. Run freebuff --version (or NO_COLOR=1 freebuff --version).
  3. Observe the output and the next shell prompt:
\$ NO_COLOR=1 freebuff --version
0.2.38

\$ 11;rgb:2c2c/3737/4646

Expected behavior

Non-interactive flags such as --version and --help (or when NO_COLOR=1 is set) should exit cleanly without emitting OSC 11 terminal color queries or leaving escape sequence replies in the stdin buffer.

Environment

  • OS: Ubuntu Linux
  • Terminal: KDE Konsole
  • Freebuff CLI Version: 0.2.38
  • Node.js Version: v24.12.0

Steps to reproduce

To Reproduce

  1. Open KDE Konsole on Ubuntu.
  2. Run freebuff --version (or NO_COLOR=1 freebuff --version).
  3. Observe the output and the next shell prompt:
\$ NO_COLOR=1 freebuff --version
0.2.38

\$ 11;rgb:2c2c/3737/4646

Where does this happen?

CLI (terminal client)

Operating system

Linux

Version

v0.2.38

Model

No response

Logs or screenshots

Activity

  1. added
    type:bug
    on Nov 27, 2026
  2. added
    area:cli
    bot:triaged
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clibot:triagedtype:bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions