codex cli sometimes exits, saying "The cursor position could not be read within a normal duration"
Resolved 💬 2 comments Opened Aug 28, 2025 by pchalasani Closed Sep 3, 2025
💡 Likely answer: A maintainer (nornagon-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
0.25.0
Which model were you using?
gpt-5
What platform is your computer?
macos
What steps can reproduce the bug?
When I leave Codex unattended for a while, sometimes it randomly exits with this message:
The cursor position could not be read within a normal duration
I don't know if this makes a difference, but I'm usually inside a tmux session. I don't even know if this happens outside of tmux.
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
2 Comments
I am using a custom PTY manager to spawn agent TUI sessions. I was able to work around this issue by responding to the cursor position request.
I am not a terminal emulation expert but it seems nonstandard to exit if there is no response to the query. Or perhaps tmux should be responding, I really don't know.
Should be fixed by https://github.com/openai/codex/pull/2870