mirror of
https://github.com/openai/codex.git
synced 2026-11-12 21:20:34 +00:00
Refresh environment dates from the configured clock (#36187)
## Why The `<current_date>` in environment context could diverge from the clock used by current-time features, especially when a host provides an external clock. ## What changed - Read the current time from the session's time provider whenever world state is built, and render its local date in environment context. - Use each session's own thread ID for clock reads, including guardian sessions. - Propagate clock-read failures through turn error events and stop before model inference. ## Testing - Cover date updates across turns and app-server requests. - Verify guardian clock reads use the corresponding root or guardian thread ID and do not run during prewarm. - Verify clock failures emit an error without sending an inference request. GitOrigin-RevId: bb7f32ccc0229b7bc6f14d7356db00bcce78066d
This commit is contained in:
@@ -496,7 +496,7 @@ impl CodexThread {
|
||||
.await?;
|
||||
self.session
|
||||
.record_context_updates_and_set_reference_context_item(step_context.as_ref())
|
||||
.await;
|
||||
.await?;
|
||||
}
|
||||
self.session
|
||||
.inject_no_new_turn(items, Some(turn_context.as_ref()))
|
||||
|
||||
Reference in New Issue
Block a user