Skip to content

core: pass step environments to turn input extensions#30020

Draft
sayan-oai wants to merge 1 commit into
mainfrom
codex/step-context-extension-input
Draft

core: pass step environments to turn input extensions#30020
sayan-oai wants to merge 1 commit into
mainfrom
codex/step-context-extension-input

Conversation

@sayan-oai

Copy link
Copy Markdown
Collaborator

Why

Turn-input extensions currently read environments from TurnContext, which is frozen when the turn starts. With deferred executors, run_turn may already have a newer environment snapshot for the first sampling request.

What

  • pass the first request-owned StepContext through the existing skills/plugins input builder
  • derive static turn data from step_context.turn
  • build extension TurnInputContext.environments from the step snapshot
  • leave the extension API unchanged
  • preserve flag-off behavior because the first step then mirrors TurnContext

Turn-input contributors still run once for submitted turn input. Making their output reactive to environments that attach after the first request remains a separate WorldState/service-refresh change.

Tests

  • just test -p codex-core turn_input_contributors_receive_step_environments
  • just test -p codex-core 'session::turn::tests'
  • just fix -p codex-core
  • just fmt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant