Skip to content

Conversation

@jif-oai
Copy link
Collaborator

@jif-oai jif-oai commented Jan 12, 2026

Add implementation for the wait tool.

For this we consider all status different from PendingInit and Running as terminal. The wait tool call will return either after a given timeout or when the tool reaches a non-terminal status.

A few points to note:

  • The usage of a channel is preferred to prevent some races (just looping on get_status() could "miss" a terminal status)
  • The order of operations is very important, we need to first subscribe and then check the last known status to prevent race conditions
  • If the channel gets dropped, we return an error on purpose

@jif-oai jif-oai merged commit 623707a into main Jan 12, 2026
32 checks passed
@jif-oai jif-oai deleted the jif/waiting-tool branch January 12, 2026 12:16
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 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.

3 participants