[bug] v1.3.1 breaks Codex CLI TTY startup with "stdout is not a terminal"
Summary
[email protected] appears to break interactive Codex CLI startup by forwarding the real Codex process with piped stdout/stderr instead of inheriting the terminal. In 1.3.0, the wrapper used stdio: "inherit", but 1.3.1 changed this to stdio: ["inherit", "pipe", "pipe"] in order to capture output for retry/fallback handling. With recent Codex CLI versions, the native Codex binary requires stdout to be a real TTY, so the wrapped codex command exits immediately with Error: stdout is not a terminal.
Reproduction
- Install compatible current versions globally:
npm install -g @openai/[email protected] [email protected] - Ensure the codex binary resolves to the codex-multi-auth wrapper.
- Run Codex from an interactive terminal: codex
Expected Behavior The Codex TUI should start normally, preserving the interactive terminal/TTY exactly as it did with [email protected]. Actual Behavior Codex exits immediately with: Error: stdout is not a terminal This appears to be caused by the 1.3.1 wrapper spawning the real Codex process with: stdio: ["inherit", "pipe", "pipe"] instead of the previous: stdio: "inherit" Since stdout is piped, the native Codex binary no longer sees a terminal. Environment
-
codex --version: 0.124.0
-
codex auth status output summary: not collected; normal codex startup fails before the interactive CLI opens
-
npm ls -g codex-multi-auth: [email protected]
-
OS: Ubuntu 24.04 LTS, Linux arm64/aarch64
-
Node.js: please fill in with node --version Diagnostic Outputs Include relevant outputs from:
-
codex auth check Not collected yet.
-
codex auth report --json Not collected yet.
-
codex auth doctor --json Not collected yet.
Logs (Optional) No plugin request logs included. The failure happens before normal interactive Codex startup. If needed, I can temporarily enable: ENABLE_PLUGIN_REQUEST_LOGGING=1 and provide sanitized logs from: ~/.codex/multi-auth/logs/codex-plugin/ Compliance Confirmation
- [x] I am using this project for personal development workflows.
- [x] This report does not request policy bypasses or prohibited usage.
- [x] I removed any secrets/tokens from this report.
[!CAUTION] CodeRabbit could not initialize plan tracking. Please try again later.
I've updated the plan above based on your feedback. Ready to proceed when you are!