mirror of
https://github.com/openai/codex.git
synced 2026-11-06 08:31:30 +00:00
Refresh step world state for all sessions (#33665)
## Why Changes to the selected working directory can select different `AGENTS.md` instructions. These updates need to reach the model even when the deferred executor feature is disabled. ## What changed - Refresh environment readiness and `AGENTS.md` before capturing each step. - Record model-visible world-state changes for every session instead of gating them on the deferred executor feature. - Preserve the initial environment context without duplicating it. ## Testing - Cover `AGENTS.md` replacement after a working-directory change. - Verify that initial environment context remains unique with the deferred executor both enabled and disabled. GitOrigin-RevId: ea5dbe590cc049170259e7eccb6a3346fb2ed8e6
This commit is contained in:
1 parent
5331d20f6e
commit
71448a29e7
8 files changed
+63
-74
No files matched your search
@@ -259,15 +259,9 @@ pub(crate) async fn run_turn(
|
||||
)
|
||||
.await?;
|
||||
|
||||
if turn_context
|
||||
.config
|
||||
.features
|
||||
.enabled(Feature::DeferredExecutor)
|
||||
{
|
||||
world_state = sess
|
||||
.record_step_world_state_if_changed(&world_state, step_context.as_ref())
|
||||
.await;
|
||||
}
|
||||
world_state = sess
|
||||
.record_step_world_state_if_changed(&world_state, step_context.as_ref())
|
||||
.await;
|
||||
|
||||
// Construct the input that we will send to the model.
|
||||
let sampling_request_input: Vec<ResponseItem> = async {
|
||||
|
||||
Reference in new issue
Block a user