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 ↗

3 Comments

badpenguin · 1 month ago

Same problem here with screen had to switch to tmux

ctkm-aelf · 1 month ago

Reproduction notes and proposed fix path

I took a pass at reducing this to an actionable code path before suggesting a fix.

Breakdown:

  • Root cause: codex-rs/tui/src/terminal_title.rs:90
  • Impact: calibrated priority score 45.39446986

Proposed approach:

  • Keep the patch scoped to the code path around codex-rs/tui/src/terminal_title.rs:90, so the behavior changes where the regression is introduced rather than broadening the surface area.
  • Validation plan: ran just test -p codex-tui → pass
  • Prepared fork branch: codex-saga/fix-codex-triage_dup_openai_codex_29598 · compare vs upstream
  • I will not open an unsolicited PR; if this direction matches maintainer expectations, I can open the prepared branch for review.

Precedent: #29189 Codex Desktop 26.616.41845 node_repl fails: codex/sandbox-state-meta missing sandboxPolicy

How I shaped this comment from prior successful threads:

  • Nearest successful examples considered: 3.
  • The shared pattern was to show the repro/root-cause evidence first, state the smallest viable fix, defer to maintainers on direction, and disclose AI assistance.

This analysis was prepared with AI assistance.

<!-- fkst:codex-saga:engage:codex-triage:dup:openai/codex#29598 -->

rkdxodud-tyk · 1 month ago

I am closing this issue because the issue is more than 1 week old without getting attention. This is for maintainers to focus better on higher impact issues.