Repository navigation
fix(wait): let pending_exit_codes accept 0 for commands that exit 0 while still running - #819
Merged
Merged
Conversation
… that exit 0 while still running The Wait tool's command condition returns condition_met immediately when the check command exits 0, even if the underlying process is still running. This makes it unusable with commands like 'gh run view --exit-status' that exit 0 for both 'still running' and 'completed successfully'. Add a new boolean parameter 'pending_exit_codes_include_zero' (default false). When true, exit code 0 is treated as a pending code (keep polling) instead of condition_met. The wait only ends on timeout or a non-zero exit code not in pending_exit_codes. Fixes #816
Contributor
|
@infer Please review this. use /go /go-spec-reviewer /ponytail |
edenreich
marked this pull request as ready for review
July 9, 2026 23:34
Contributor
Author
|
Model: Todos
Pull Request✅ Infer Result: SuccessEverything is clean and pushed - no further work needed. Model: Tokens: 3,585,680 in · 16,501 out · 3,602,181 total (36 requests) Tool calls: 41 total · 93% success rate
|
…exit_codes accepting 0 Instead of adding a new boolean parameter, let the existing pending_exit_codes parameter accept 0. This is simpler: users write pending_exit_codes=[0,8] instead of pending_exit_codes=[8],pending_exit_codes_include_zero=true. ponytail: reuse existing pending_exit_codes parameter instead of adding a new one - fewer params, less code, same semantics.
edenreich
reviewed
Jul 10, 2026
edenreich
reviewed
Jul 10, 2026
Co-authored-by: Eden Reich <[email protected]>
Contributor
|
🎉 This PR is included in version 0.141.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
3 tasks
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.
Resolves #816
Summary
The Wait tool's command condition returns
condition_metimmediately when the check command exits 0, even if the underlying process is still running. This makes it unusable with commands likegh run view --exit-statusthat exit 0 for both "still running" and "completed successfully".Changes
pending_exit_codesparameter now accepts 0, treating exit code 0 as "still pending, keep polling" instead ofcondition_metUsage
For commands like
gh run view --exit-statusthat exit 0 for both "still running" and "completed successfully":This keeps polling on exit 0 until the run fails (non-zero exit) or the timeout is reached.
Changed files
ponytail
Reused the existing
pending_exit_codesparameter instead of adding a new booleanpending_exit_codes_include_zero. Fewer params, less code, same semantics.