Skip to content

Visible escape codes in urxvt with transparent background break interactive prompts (e.g., gh pr create) with gh v2.70.0 #10830

@ei-grad

Description

@ei-grad

Status update: #10830 (comment)

This makes interactive gh commands essentially unusable in urxvt with version 2.70.0.

Environment:

  • gh version: gh version 2.70.0 (2025-04-15)
  • Operating System: Arch Linux
  • Terminal Emulator: urxvt (rxvt-unicode)
  • $TERM environment variable value: Tested with various values (e.g., rxvt-unicode-256color, rxvt-unicode). The issue persists regardless of the specific TERM value set within urxvt.
  • Shell: Reproducible in both bash and zsh.

Steps to Reproduce:

  1. Open the urxvt terminal emulator.
  2. Use either bash or zsh shell.
  3. Run any gh command, for example, gh version.

Observed Behavior:

  1. The command output, as well as the shell prompt area, gets interspersed with visible escape code sequences. These look like ^[]11;rgba:....^[ and ^[[...R.

    Example output when running gh version:

    [user@host ~]$ gh version
    ^[]11;rgba:0000/0000/01ff/c000^[^[[4;1Rgh version 2.70.0 (2025-04-15)
    https://github.com/cli/cli/releases/tag/v2.70.0
    [user@host ~]$ [4;1R11;rgba:0000/0000/01ff/c000[4;1R
    
  2. Crucially, this issue also breaks interactive prompts, preventing commands like gh pr create from completing. When an interactive prompt is displayed by gh, it contains unexpected characters (like [48;1R in the example below), and the command fails with an error related to unexpected escape sequences.

    Example failure during gh pr create:

    → gh pr create
    ? Where should we push the 'ignore-tmp-dagster-home' branch? [48;1R  [Use arrows to move, type to filter]
    could not prompt: unexpected escape sequence from terminal: ['\x1b' ']']
    Command exit code: 1
    

Expected Behavior:
The command output should be displayed cleanly without any visible escape code sequences mixed in.

[user@host ~]$ gh version
gh version 2.70.0 (2025-04-15)
https://github.com/cli/cli/releases/tag/v2.70.0
[user@host ~]$

Additional Context:

  • This issue appears specifically in the urxvt terminal emulator. It was not reproducible in gnome-terminal on the same system using the same shells and gh version.
  • This behavior started with gh version 2.70.0. The previous version I used, gh 2.69.0 (2025-03-19), worked correctly and did not produce these visible escape codes in the same urxvt terminal environment. This strongly suggests a change or potential regression introduced in v2.70.0 related to terminal interaction, specifically with urxvt.
  • Changing the TERM environment variable value within urxvt did not resolve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-prrelating to the gh pr commandmore-info-neededMore info needed from user/contributorneeds-triageneeds to be reviewed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions