-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Open
Labels
TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't workingSomething isn't working
Description
What version of Codex CLI is running?
codex-cli 0.98.0
What subscription do you have?
Team Plan
Which model were you using?
gpt-5.2-codex
What platform is your computer?
Linux 6.8.0-79-generic x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
Xterm.js (PTY-backed terminal on the server side, exposed over WebSocket)
What issue are you seeing?
Codex can spin at ~100% CPU while idle if its stdin points to a deleted TTY.
It repeatedly calls read(0, ..., 1024) and gets EOF (= 0) in a tight loop with no backoff/exit.
What steps can reproduce the bug?
Repro steps (
- Start Codex in terminal A.
- Cause terminal A/PTY to disappear (close terminal/session, detached invalid
PTY, etc.). - Leave Codex process running.
- Observe high CPU from one thread and repeated read(0)=0 via strace.
Impact
- Sustained high CPU while “idle”
- Wasted resources and battery
- Misleading “Codex is busy” state
What is the expected behavior?
- On persistent stdin EOF, Codex should either:
- Exit cleanly, or
- Sleep/backoff and avoid busy-spin CPU usage.
Additional information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't workingSomething isn't working