Codex CLI TUI repeatedly beeps / misbehaves inside GNU Screen

Resolved 💬 3 comments Opened Jun 23, 2026 by rkdxodud-tyk Closed Jul 14, 2026

What version of Codex CLI is running?

0.141.0

What subscription do you have?

pro (x20)

Which model were you using?

gpt-5.5, gpt-5.4, gpt-5.4-mini

What platform is your computer?

Linux 6.8.0-124-generic x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

GNU screen.

Codex doctor report

What issue are you seeing?

When running Codex CLI TUI inside GNU screen, the terminal repeatedly emits audible/visual bells while the agent is thinking. The issue appears to be caused by the terminal-title update path: the TUI animates the title/status text, and each title update writes an OSC title sequence terminated by BEL (\x07). GNU Screen appears to treat or expose those BEL bytes in a way that causes repeated beeping.

The terminal repeatedly emits a bell/beep while Codex is thinking.

Depending on terminal settings, this may appear as:

  • audible beeps;
  • visual bell flashes;
  • repeated screen activity notifications;
  • disruptive terminal-title/status updates.

What steps can reproduce the bug?

  1. Start a GNU Screen session:

``bash(sh)
screen
``

  1. Run Codex CLI in TUI mode inside that session.

``bash(sh)
codex
``

  1. Send a prompt that causes the agent to think for more than a moment.
  1. Observe the terminal while the status/title spinner is active.

What is the expected behavior?

Codex should not emit repeated BEL characters or trigger repeated bells while running inside GNU Screen.

The TUI should continue to render normally, and title/status updates should not cause audible or visual alerts.

Additional information

The likely problematic path is the terminal-title animation logic, not the main TUI rendering path.

In the current code, the default title/status surface includes animated activity, refreshed on a short interval. When that value changes, Codex calls set_terminal_title. That function emits an OSC terminal-title sequence terminated with BEL (\x07).

This means that while the agent is thinking, Codex may emit a BEL byte repeatedly, once per title-spinner frame. GNU Screen has special handling around hardstatus/window-title escape sequences, so those BEL-terminated title updates can surface as repeated beeps.

Relevant code areas:

  • codex-rs/tui/src/chatwidget/status_surfaces.rs
  • default title surface includes activity
  • title/status animation refresh interval is short
  • changed title calls set_terminal_title
  • codex-rs/tui/src/terminal_title.rs
  • set_terminal_title emits OSC title update terminated by BEL
  • codex-rs/terminal-detection/src/lib.rs
  • detects tmux and zellij
  • does not appear to detect GNU screen

Any of these would likely fix or reduce the issue:

  1. Use ST (ESC \\) instead of BEL (\x07) as the OSC string terminator when setting the terminal title.
  2. Disable animated terminal-title updates inside GNU Screen.
  3. Detect GNU Screen and avoid title-spinner animation there.
  4. Throttle title updates so they are not emitted every animation frame.
  5. Add a config option to disable terminal-title updates entirely.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗