codex CLI fails to start in non-tty (Jupyter notebook) environments due to raw-mode requirement

Resolved 💬 2 comments Opened Jun 3, 2025 by zazula Closed Oct 16, 2025

Summary

When launching codex CLI in a Jupyter notebook (or other non-tty environments), it fails to start with the following error:

ERROR Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default.
Read about how to prevent this error on
https://github.com/vadimdemedes/ink/#israwmodesupported

Steps to reproduce

  1. Open a Jupyter notebook environment.
  2. Run !codex --session-mode new --skip-ask-mode.

Expected Behavior

Codex CLI should detect the absence of a tty and either:

  • fallback to a plain text mode
  • or provide instructions to disable raw mode or use a flag.

Actual Behavior

Codex CLI immediately errors out and does not provide a usable fallback.

Environment

  • codex version: 0.0.0-dev
  • Node.js version: v24.1.0
  • Jupyter notebook
  • Platform: $(uname -a)

Suggested Fix

Consider detecting non-tty stdin and:

  • Automatically disable Ink's raw-mode and degrade to a plain logging mode.
  • Or provide a --no-tty flag to disable raw-mode.

View original on GitHub ↗

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