codex icon indicating copy to clipboard operation
codex copied to clipboard

On windows terminal when ssh to a linux host it render error

Open andjohnsonj5 opened this issue 1 year ago • 21 comments

What version of Codex is running?

v0.44.0

Which model were you using?

gpt-5-codex

What platform is your computer?

Linux 6.12.43+deb13-amd64 x86_64 unknown

What steps can reproduce the bug?

on windows terminal, ssh to a linux host, then execute codex

What is the expected behavior?

The rendering of the input box should be normal.

What do you see instead?

Image

Additional information

it leaks some string

› 10;rgb:cccc/cccc/cccc11;rgb:0c0c/0c0c/0c0c

It's more likely to happen when the network is unstable.

andjohnsonj5 avatar Oct 05 '25 05:10 andjohnsonj5

Potential duplicates detected:

  • #4749
  • #4744

Powered by Codex Action

github-actions[bot] avatar Oct 05 '25 05:10 github-actions[bot]

I dug into this today and it looks like this report is separate from the tmux background/palette issues that were tracked in #4744/#4747.\n\nWhat is happening here: when we regain terminal focus we call , which emits the OSC 10/11 queries ( / ). Those responses come back over the same PTY and crossterm delivers each printable byte as a key event. Because the input stack treats them as real keystrokes, they get appended to the composer, so you see strings like .\n\nIn other words, this is not the background rendering bug fixed by #4747; it is that the OSC response stream bleeds into user input. We need to either filter OSC sequences out of the event loop (so they never reach handling) or change the default-color querying strategy so the replies are consumed out-of-band (e.g. via a raw read that does not race with the input loop).],

andjohnsonj5 avatar Oct 05 '25 07:10 andjohnsonj5

@bolinfest

andjohnsonj5 avatar Oct 05 '25 07:10 andjohnsonj5

@dylan-hurd-oai

andjohnsonj5 avatar Oct 07 '25 14:10 andjohnsonj5

ubuntu 24 same issue

TaoSeekAI avatar Oct 07 '25 22:10 TaoSeekAI

The same problem occurs when trying to SSH to Ubuntu 24 using macOS Terminal, Tabby, or Visual Code. Because of the same color detection problem, Codex Resume has become unavailable and the history conversation list cannot be successfully displayed.

superido245w avatar Oct 08 '25 02:10 superido245w

The same issue occurs in macOS 0.45.0

Image

vbmania avatar Oct 08 '25 06:10 vbmania

same here

linQian99 avatar Oct 09 '25 00:10 linQian99

same here

pixeldepartment avatar Oct 09 '25 09:10 pixeldepartment

I notice when it leaks this string, oftentimes if I've been prompted to permit a command, the first result in the selection ("Yes") is automatically selected when I focus the terminal window, without me hitting Enter. This is significantly more problematic — even potentially dangerous — than the character leak itself. Raising because they seem to occur together.

claytongentry avatar Oct 09 '25 15:10 claytongentry

Yep me too.

stewartcelani avatar Oct 10 '25 07:10 stewartcelani

me too. OpenAI Codex (v0.46.0)

stan1233 avatar Oct 15 '25 01:10 stan1233

same when macos sshed to remote ubuntu codex-cli 0.46.0

me too. macos sshed to remote ubuntu.

stan1233 avatar Oct 15 '25 10:10 stan1233

same issue

Image

Kiyliy avatar Oct 16 '25 18:10 Kiyliy

Image me too

Shunxing-Fan avatar Oct 18 '25 02:10 Shunxing-Fan

Same issue on Cursor. Maybe related: https://github.com/microsoft/vscode/issues/207545

happyme531 avatar Oct 23 '25 16:10 happyme531

Had it been fixed?

IANTHEREAL avatar Oct 24 '25 09:10 IANTHEREAL

same, how to fix?

foreverpiano avatar Oct 24 '25 12:10 foreverpiano

I think this has been fixed in recent versions. If you're still seeing this in the latest version, let us know.

etraut-openai avatar Nov 14 '25 06:11 etraut-openai