Escape sequences such as [105;1:3u are inserted when typing prompts
Open 💬 14 comments Opened Dec 10, 2025 by hkroger
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.66.0
What subscription do you have?
Some enterprise, I don't know exactly
Which model were you using?
gpt-5.1-codex-max
What platform is your computer?
Darwin 25.1.0 arm64 arm
What issue are you seeing?
Sometimes while typing, different escape sequences appear in the prompt.
For example [105;1:3u but also many others.
What steps can reproduce the bug?
This does not happen always, so this is a bit tricky to reproduce.
What is the expected behavior?
No escape sequences like the one mentioned above apprear in the prompts.
Additional information
I'm using iTerm2 Build 3.6.6 as a terminal emulator.
echo $TERM outputs xterm-256color.
This is very similar to bug reported in #2572
14 Comments
Example of what's happening:
<img width="922" height="152" alt="Image" src="https://github.com/user-attachments/assets/62baf483-2bf3-494c-9f09-b2fb71671798" />
Slightly annoying that the execution breaks because something is causing those weird signals.
Actually changing "Apps can report how keys are reported" option doesn't change anything. It was just a coincidence.
I'm getting this in macOS's Terminal.app when changing focus to and from the app.
When Terminal loses focus it inputs
[O. When clicking on Terminal to focus it, it inputs[Oor sometimes[I.I am using local gpt-oss (Ollama) as my model.
Having exactly the same issue. It is making my usage of codex extremely miserable.
Support and proses earnings
codex is unusuable compared to cursor or claude due to this bug.
@tschellenbach, do you have a reliable repro? If so, please share. We've struggled to repro this bug.
@amake @jnardiello @hkroger can you send me the output of this command on the terminal (assuming Linux or macOS):
@amake much appreciated. I will try to replicate it here. I assume it still happens with the latest version of Codex (v0.104.0) correct?
Yes. However I should add that it seems there is some sort of terminal state involved, because a fresh terminal did not exhibit the issue while a terminal I had used for a variety of other tasks did.
Unfortunately I don't know enough about what kinds of state a terminal or shell can keep. If there's a good command for surfacing that then I would be happy to supply the output.
This is good information. Also from your Terminal.app version I assume you are running macOS 15 (Sequoia) right?
Correct.
Seeing this behavior as well but only with the
--dangerously-bypass-approvals-and-sandboxsession flag. Standardcodexsessions have been fine for months.Currently using
codex-cli 0.117.0