Await auto-update before interactive tmux handoff#51
Merged
axeldelafosse merged 1 commit intomainfrom Mar 27, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a mechanism to await auto-update checks during specific CLI startup scenarios, specifically for promptless paired tmux launches initiated outside of an existing tmux session. It adds a new awaitAutoUpdateCheck function with a configurable timeout (defaulting to 5 seconds) and refactors the existing auto-update logic to support both synchronous and asynchronous execution. Comprehensive tests were added to verify the timeout behavior and the correct ordering of update hooks. I have no feedback to provide as no review comments were submitted.
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.
Summary
loop/loop --tmuxoutside tmux)Why
Interactive paired tmux startup already spends a few seconds handing off into tmux. That makes it a good place to perform the best-effort update check synchronously, while avoiding extra delay in the rest of the CLI.
Root cause
Auto-update was previously kicked off the same way for every normal CLI invocation, before the CLI knew whether it was entering the promptless paired tmux handoff path. That meant the interactive tmux startup could not intentionally await the update check without risking duplicate checks.
Validation
bun run fixbun test tests/loop.test.ts tests/loop/update.test.tsbun run checkbun test