codex resume --last fails with "stdin is not a terminal" in interactive PowerShell (Windows)
Open 💬 0 comments Opened Mar 26, 2026 by Yash2603
What version of Codex CLI is running?
v0.116.0
What subscription do you have?
Free
Which model were you using?
gpt-5.4
What platform is your computer?
Microsoft Windows NT 10.0.26200.0
What terminal emulator and version are you using (if applicable)?
Windows PowerShell
What issue are you seeing?
Running codex resume --last or codex resume --last --no-alt-screen fails with:
stdin is not a terminal
This happens even though the command is executed in a normal interactive PowerShell session.
TTY appears to be valid:
echo $Host.UI.RawUIreturns proper structured output- Terminal is not WSL / not VSCode restricted shell
Also observed warning:
WARNING: proceeding, even though we could not update PATH: Access is denied. (os error 5)
What steps can reproduce the bug?
- Open Windows PowerShell (normal interactive session)
- Run:
codex resume --last --no-alt-screen
- Observe error:
stdin is not a terminal
What is the expected behavior?
The CLI should detect the interactive PowerShell TTY and resume the last session successfully.
Additional information
codex --helpworks correctlycodex resumefails consistently (not just --last)- Environment is not nested (not WSL, not VSCode terminal)
- Suggests a Windows TTY detection issue in Codex CLI v0.116.0