mirror of
https://github.com/openai/codex.git
synced 2026-11-05 20:10:33 +00:00
Skip empty user messages for automatic idle turns (#39174)
## What changed Start sampling for automatic idle `UserInput` requests without adding an empty message to the input queue. Continue queuing automatic response-item input. GitOrigin-RevId: 5d304aed9e7e165380b29b5b59d9245e97b40659
This commit is contained in:
@@ -347,9 +347,9 @@ async fn start_if_idle(
|
||||
turn_context.session_telemetry.user_prompt(content);
|
||||
}
|
||||
task_input.push(pending_turn_input(input));
|
||||
} else if is_automatic_idle_work {
|
||||
// Recovery resumes an existing turn, so it must not queue a new empty
|
||||
// user message for that turn.
|
||||
} else if is_automatic_idle_work && !matches!(&input, SubmittedTurnInput::UserInput { .. }) {
|
||||
// Automatic response-item work still needs to be queued, but an empty
|
||||
// user-input request should start sampling without adding a message.
|
||||
session
|
||||
.input_queue
|
||||
.extend_pending_input_for_turn_state(
|
||||
|
||||
Reference in New Issue
Block a user