Skip to content

[codex] route sleep through time providers - #29973

Merged
rka-oai merged 3 commits into
mainfrom
codex/time-provider-sleep
Jun 25, 2026
Merged

[codex] route sleep through time providers#29973
rka-oai merged 3 commits into
mainfrom
codex/time-provider-sleep

Conversation

@rka-oai

@rka-oai rka-oai commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a cancellable sleep operation to TimeProvider
  • route clock.sleep through the configured provider
  • extend the supported sleep duration to 12 hours
  • complete the sleep turn item before propagating provider failures

Why

This isolates the core clock abstraction needed by external clock integrations. Existing system and app-server behavior remains wall-clock based in this PR; the stacked follow-up supplies app-server sleeps from an external clock.

@rka-oai
rka-oai requested a review from a team as a code owner June 25, 2026 03:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8ee8e9924c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/tools/handlers/sleep.rs
Comment on lines +115 to +117
result.map_err(|err| {
FunctionCallError::Fatal(format!("failed to sleep: {err:#}"))
})?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regurgitating codex:
The inner ? exits the entire async handler, bypassing emit_turn_item_completed at line 132. The same occurs at lines 124–126. Return the error as the branch value and propagate it only after emitting completion; add a failing-provider integration test.

@rka-oai
rka-oai merged commit f66d793 into main Jun 25, 2026
31 checks passed
@rka-oai
rka-oai deleted the codex/time-provider-sleep branch June 25, 2026 05:17
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 25, 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