Fix Codex login detection when status is written to stderr - #243
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 3 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe CLI wrapper now forwards stderr. Codex authentication detection checks both output streams for a standalone login status. The fake CLI and tests cover login status reported through stdout. ChangesCodex authentication compatibility
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The change makes Codex login detection recognize successful status written to either output stream while preserving the existing failure behavior. It is merge-ready after normal checks, with no actionable merge-blocking risk remaining. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Looks great, Thanks for the addition |
Summary
stderralongsidestdoutthrough the sharedexecClihelperstdoutRoot cause
codex login statusexits successfully, but Codex CLI 0.147.0 writesLogged in using ChatGPTtostderr. OpenMausBot only inspectedstdout, so it reported a valid session asauthenticated: falseand unnecessarily prompted the user to runcodex login.Impact
OpenMausBot now recognizes existing Codex sessions correctly. The check still fails closed when the command returns an error or reports
Not logged in.Validation
pnpm exec vitest run server/drivers/codex.test.ts: 19 tests passedpnpm typecheck: passedpnpm exec vitest run --reporter=dot: 106 test files passed, 1,029 tests passed, 8 skippedgit diff --check: passedpnpm lintremains red because of existinganti-slopviolations outside the diff. The targeted lint run did not report any line changed by this PR.Summary by CodeRabbit