Accept user input when starting idle turns (#36947)

## What changed

- Generalize `CodexThread::try_start_turn_if_idle` to accept exported
  `TurnInput` values, preserving user content and client IDs in the first model
  request.
- Allow non-empty user input to start an idle turn in Plan mode while retaining
  the Plan-mode rejection for automatic response items and empty user input.
- Process idle user input through the normal user-turn path so connector
  selections are cleared, prompt telemetry is recorded, and referenced skill
  instructions are included.

## Testing

- Cover idle user input in Default and Plan modes, response-item mailbox
  merging, empty-input rejection, and skill instruction injection.

GitOrigin-RevId: 116667d160d4464b525d9e4c7e8cc05d23a94008
This commit is contained in:
efrazer-oai
2026-08-04 18:52:41 +00:00
committed by copyberry
parent ceaa818898
commit 989a0b053e
9 changed files with 309 additions and 34 deletions
+2 -1
View File
@@ -9,8 +9,9 @@ use std::sync::Arc;
use tokio::sync::Mutex;
use tokio::sync::watch;
/// Input consumed by a regular turn.
#[derive(Clone, Debug, PartialEq)]
pub(crate) enum TurnInput {
pub enum TurnInput {
UserInput {
content: Vec<UserInput>,
client_id: Option<String>,