Repository navigation
fix(sdk): fail promptly when Studio startup terminates - #195
Merged
Merged
Conversation
Co-Authored-By: Codex <noreply@openai.com>
ethanwharris
marked this pull request as ready for review
October 12, 2026 11:35
ethanwharris
requested review from
justusschock,
k223kim,
rusenask and
tejapulagam
as code owners
October 12, 2026 11:35
dhedey
approved these changes
Oct 12, 2026
justusschock
approved these changes
Oct 12, 2026
bmaydan
pushed a commit
that referenced
this pull request
Oct 14, 2026
Co-authored-by: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR change?
There are cases where start-up errors for some reason or other and the SDK can get stuck. Instead, this PR makes it fail fast when things have failed.
Agent
Root cause and verification
The old loop fetched up to three status snapshots per poll and only checked restore readiness. A workload exiting with code 2 briefly passed through FAILED before STOPPING and DELETED, leaving start blocked until the CI timeout. The new loop binds to the first new instance ID after start and checks one snapshot per poll, including cleanup states.
Validation: 142 tests passed across Studio API, mocked startup lifecycles, and public Studio startup (6.32s). Pinned Ruff and changed-file pre-commit hooks, including mypy, passed.
What else should a reviewer know?
The start response contains no instance ID. If cleanup removes the instance before any poll observes it, the SDK cannot associate that failure with this start. It also cannot recover a failure message already overwritten by the backend. This improves reporting; the underlying GCP workload crash remains unresolved.
— GPT-6, via /create-pr; text not reviewed