ERROR log "needs_follow_up: false" on normal turn completion

Resolved 💬 0 comments Opened Jan 15, 2026 by ozan-s Closed Jan 15, 2026

What version of Codex is running?

codex-cli 0.84.0

What subscription do you have?

ChatGPT Pro

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Darwin 24.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Ghostty

What issue are you seeing?

Summary

Normal turn completions are emitting an ERROR log line:
ERROR codex_core::codex: needs_follow_up: false

This is a normal state (no follow-up needed), so logging it at ERROR is misleading and noisy for downstream tooling.

Expected

No error-level log on successful completion. If this is needed for debugging, it should be DEBUG/TRACE or removed.

Actual

Every normal completion can log:
ERROR codex_core::codex: needs_follow_up: false

Why this matters

Downstream tools (e.g. TUI wrappers) surface stderr to users and treat ERROR lines as failures, which makes successful runs look broken.

Repro (minimal)

  • Run codex exec "hi" (or any short prompt).
  • Observe stderr: ERROR codex_core::codex: needs_follow_up: false

Environment

  • codex-cli: 0.84.0 (observed), 0.85.0 (still present)
  • OS: macOS (Darwin arm64)
  • Installed via npm: @openai/codex

Suspected source

Introduced by PR #9077 (commit cbca43d) which adds:

needs_follow_up |= sess.has_pending_input().await;
error!("needs_follow_up: {needs_follow_up}");

in codex-rs/core/src/codex.rs near the ResponseEvent::Completed handler.

If this was meant as temporary debug logging, please downgrade to debug/trace or remove it.

What steps can reproduce the bug?

Repro (minimal)

  • Run codex exec "hi" (or any short prompt).
  • Observe stderr: ERROR codex_core::codex: needs_follow_up: false

What is the expected behavior?

Expected

No error-level log on successful completion. If this is needed for debugging, it should be DEBUG/TRACE or removed.

Additional information

_No response_

View original on GitHub ↗