Bug: Review turns lack TurnStarted event, inconsistent with other task types

Resolved 💬 2 comments Opened Apr 20, 2026 by hobostay Closed Apr 20, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Description

In codex-rs/core/src/session/review.rs lines 152-154, there is a known inconsistency:

// TODO(ccunningham): Review turns currently rely on `spawn_task` for TurnComplete but do not
// emit a parent TurnStarted. Consider giving review a full parent turn lifecycle
// (TurnStarted + TurnComplete) for consistency with other standalone tasks.
sess.spawn_task(tc.clone(), input, ReviewTask::new()).await;

Review turns emit TurnComplete but not TurnStarted, making them inconsistent with all other task types. This means:

  1. Clients/UIs that track turn state via TurnStarted + TurnComplete pairs will have mismatched state for review turns.
  2. Event consumers expecting a TurnStarted before TurnComplete will see an orphaned TurnComplete event.
  3. This could cause issues in the TUI or any external client listening to the event stream.

Suggested fix

Emit TurnStarted before spawn_task for review turns, matching the lifecycle of other task types.

Environment

  • File: codex-rs/core/src/session/review.rs, lines 145-164

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #18516

Powered by Codex Action

etraut-openai contributor · 4 months ago

Please do not file bug reports of this nature. It's not helpful for us to receive bug reports about TODOs in our code base. We know about those already.