Repository navigation
Fix environment checkout hanging during shell bootstrap - #16661
Merged
Merged
Conversation
Co-Authored-By: Warp <agent@warp.dev>
joeywangzr
approved these changes
Oct 28, 2026
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.
Description
Fix environment setup hanging after repositories finish cloning. Pending commands could run after the
Bootstrappedhook but before the final bootstrap prompt replaced the active block. The driver then waited for completion of the wrong block.The fix uses the existing pending-command mechanism rather than dropping the command or adding a polling loop:
execute_command_or_set_pending()saves the command in the input buffer and setshas_pending_commandbefore attempting execution.execute_pending_command()now waits forPostBootstrapPrecmd. Its early return leaves the saved command and pending flag intact.BootstrapPrecmdDoneretries directly, andAfterBlockCompletedschedules a retry after the existing short delay.Separately, add a 30-minute deadline around the checkout helper, covering command start and completion. This reports stalled checkout as an error; it does not trigger the retry or terminate the helper process.
Linked Issue
No linked issue; diagnosed from reproducible local Oz runs.
ready-to-specorready-to-implement. — No linked issue.Testing
I was able to consistently repro the issue before this fix, and now it doesn't happen after this fix
Author tested the fix against the local Oz stack and confirmed the previously reproducible hang is resolved.
13 focused tests passed, including bootstrap readiness, checkout timeout, and existing driver lifecycle coverage.
Broader input/environment suite: 251/252 passed.
teamless_cloud_mode_host_selector_ignores_team_worker_cachefails a host-selector visibility assertion, including in isolation; it does not exercise command execution.cargo check -p warp --libpassed.cargo clippy -p warp --lib --tests -- -D warningspassed../script/formatcompleted after validation.Full integration coverage omitted by author choice; regression unit tests and local end-to-end verification cover this change.
I have manually tested my changes locally with
./script/run— Author confirmed local Oz verification; the exact launch command was not recorded.Agent Mode
CHANGELOG-OZ: Fixed environment setup getting stuck after cloning repositories and added a timeout for stalled repository checkouts.
Co-Authored-By: Warp agent@warp.dev