In `screen` it repeated beats while thinking
Open 💬 3 comments Opened Apr 30, 2026 by Joshuaalbert
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
0.125.0
What subscription do you have?
pro
Which model were you using?
5.5
What platform is your computer?
Linux 6.8.0-87-generic
What terminal emulator and version are you using (if applicable)?
terminal
What issue are you seeing?
While programming in a screen which is super useful, it beeps while thinking.
What steps can reproduce the bug?
screencodex- turn on speakers
- enter any prompt
- listen to it beep
What is the expected behavior?
no beeping
Additional information
_No response_
3 Comments
I've noticed this too on iTerm+screen+codex. Capturing terminal output when it's drawing the screen I see this over and over "^[]2;4 wannnet^G^H^". Unsure if this is codex trying to update the terminal window name, but the ^G in there may be what's causing the repeated beeping.
Based on the symptoms you're describing, it sounds like
screenis probably mishandling or leaking the BEL-terminated OSC title-update sequence. Codex uses OSC 0 for title updates. You can use the/titlecommand to disable the "Thinking" animation in the title.I can reproduce this as well, and I did some additional debugging.
Environment:
What I verified:
printf '\a'does not produce an audible beep when screen visual bell is enabled, so screen is handling plain BEL correctly.suppressApplicationTitle: trueis already set in the Windows Terminal profile.printf '\033]0;⠼ test\a'printf '\033]0;⠼ test\033\\'perl -e 'binmode STDOUT,":utf8"; for $c (qw/⠼ ⠦ ⠧ ⠇ ⠏ ⠋ ⠙ ⠹ ⠸ ⠴/) { for (1..100) { print "\e]0;$c test\a"; select undef,undef,undef,0.01 } }'\e\\as the OSC terminator also does not beep.env WT_SESSION= WT_PROFILE_ID= TERM=screen-256color codexTERM=screen-256color-noprobes codexu6/u7/u8/u9from terminfo, but Codex still beeped.Captured output:
I captured Codex output with:
script -qfec 'codex' /tmp/codex.typescriptThe capture contained a very large number of terminal escape sequences:
BEL count: 7365OSC count: 7367CSI count: 830005DCS count: 0PM count: 0APC count: 0The most frequent CSI sequences were normal TUI redraw/control sequences such as:
ESC[49mESC[0mESC[KESC[39mESC[?2026hESC[?2026lESC[?25hESC[28;3H,ESC[29;2H, etc.The capture also contains many animated title updates like:
ESC]0;⠹ WSL2-Linux-KernelBELESC]0;⠴ WSL2-Linux-KernelBELESC]0;⠧ WSL2-Linux-KernelBELHowever, testing those OSC title sequences manually does not reproduce the beep in my environment.
I then filtered/replayed the captured output with
cat:This still beeped:
/tmp/codex.typescriptThis did not beep:
Examples of non-beeping filtered variants:
perl -0777 -pe 's/\e\][^\x07]*(?:\x07|\e\\)//g;s/\e\[(?![0-9;]*m)[0-?]*[ -\/]*[@-~]//g' /tmp/codex.typescript > /tmp/codex.only-sgr.typescript && cat /tmp/codex.only-sgr.typescriptperl -0777 -pe 's/\e\][^\x07]*(?:\x07|\e\\)//g;s/\e\[(?![0-9;]*[HfGd])[0-?]*[ -\/]*[@-~]//g' /tmp/codex.typescript > /tmp/codex.only-cursor.typescript && cat /tmp/codex.only-cursor.typescriptperl -0777 -pe 's/\e\][^\x07]*(?:\x07|\e\\)//g;s/\e\[(?![0-9;]*[KJSM])[0-?]*[ -\/]*[@-~]//g' /tmp/codex.typescript > /tmp/codex.only-erase-scroll.typescript && cat /tmp/codex.only-erase-scroll.typescriptperl -0777 -pe 's/\e\][^\x07]*(?:\x07|\e\\)//g;s/\e\[\?[0-9;]*[hl]//g;s/\e\[6n//g;s/\e\[c//g;s/\e\[\?u//g;s/\e\[>[0-9;]*[mu]//g' /tmp/codex.typescript > /tmp/codex.workaround1.typescript && cat /tmp/codex.workaround1.typescriptSo at this point it does not look like a simple plain BEL issue, nor only an animated terminal-title issue. It seems to be triggered by Codex TUI redraw/control behavior interacting badly with GNU screen + Windows Terminal.
Expected behavior:
Codex should not repeatedly trigger audible terminal beeps while working inside GNU screen. Plain terminal bell behavior should remain controlled by the terminal/screen configuration.
Actual behavior:
Codex repeatedly causes audible beeps while thinking/working inside GNU screen.
Suggested fix:
Please consider adding a config option to disable terminal probing / terminal title updates / advanced TUI terminal control sequences more aggressively, or use a more conservative fallback when running under
TERM=screen*. It may also be useful to avoid repeatedly enabling/disabling advanced terminal modes in this environment.Workaround:
Workaround from #16332 seems working.
Setting in .codex/config.toml this and it stopped beeping for me.
``
``[tui]
terminal_title = []