Skip to content

[codex] Use TurnInput for session task input#24151

Merged
pakrym-oai merged 1 commit into
mainfrom
pakrym/session-task-turn-input
May 22, 2026
Merged

[codex] Use TurnInput for session task input#24151
pakrym-oai merged 1 commit into
mainfrom
pakrym/session-task-turn-input

Conversation

@pakrym-oai
Copy link
Copy Markdown
Collaborator

@pakrym-oai pakrym-oai commented May 22, 2026

Why

The idea here is to erase the difference between initial and followup inputs to a turn. Followup inputs are already represented as TurnInput.

Eventual goal is not to have explicit on task input at all and pull everything from input Q.

What Changed

  • Changes SessionTask::run and the erased AnySessionTask::run path to accept Vec<TurnInput>.
  • Wraps user-submitted spawn input as TurnInput::UserInput at the session task start boundary.
  • Updates run_turn to record initial TurnInput using the same hook and recording path used for pending input.
  • Keeps review-specific conversion local to ReviewTask, where the sub-Codex one-shot API still expects Vec<UserInput>.
  • Moves the synthetic compact prompt into CompactTask and starts compact tasks with empty task input.

Validation

  • cargo check -p codex-core
  • just test -p codex-core -E 'test(task_finish_emits_turn_item_lifecycle_for_leftover_pending_user_input) | test(queued_response_items_for_next_turn_move_into_next_active_turn) | test(steered_input_reopens_mailbox_delivery_for_current_turn)'

@pakrym-oai pakrym-oai force-pushed the pakrym/session-task-turn-input branch from f3b744e to 46257d5 Compare May 22, 2026 21:51
@pakrym-oai pakrym-oai marked this pull request as ready for review May 22, 2026 21:57
@pakrym-oai pakrym-oai requested a review from a team as a code owner May 22, 2026 21:57
@pakrym-oai pakrym-oai merged commit fbd4efa into main May 22, 2026
31 checks passed
@pakrym-oai pakrym-oai deleted the pakrym/session-task-turn-input branch May 22, 2026 22:21
@github-actions github-actions Bot locked and limited conversation to collaborators May 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants