[codex] Allow empty turn/start requests#23409
Merged
Merged
Conversation
613d208 to
87ecaa2
Compare
87ecaa2 to
2c0815f
Compare
jif-oai
approved these changes
May 19, 2026
| } | ||
|
|
||
| if input.is_empty() { | ||
| return Err(SteerInputError::EmptyInput); |
Collaborator
There was a problem hiding this comment.
This changes the client side contract. Can you make sure it does not impact the clients, analytics and flywheel?
2c0815f to
0b7b780
Compare
# Conflicts: # codex-rs/core/src/session/turn.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
turn/startalready accepts an input array on the wire, including an empty array, but core treated empty input as a no-op before the turn could reach the model. App-server clients need to be able to start a real turn even when there is no new user message, for example to let the model proceed from existing thread context.What changed
run_turnearly return that skipped empty-input turns when there was no pending input.steer_inputempty-input check until after core has determined whether there is an active regular turn.previous_turn_settingslike other regular turns, so follow-up context injection state advances consistently.turn/startwithinput: []emits started/completed notifications, sends one Responses request, and does not synthesize an empty user message.Validation
cargo test -p codex-app-server --test all turn_start_with_empty_input_runs_model_request