perf(ca): poll agent readiness at 400ms while a normal boot is plausible - #1095
Merged
Conversation
wait_until_running polled every 2s, adding up to 2s of pure wait on every create/code/ssh/wake. Fresh boots reach running in single-digit seconds, so poll at 400ms for the first 20s, then back off to 2s for the tail. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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
wait_until_runningpolled every 2s, so everyca create/code/ssh/wakeate up to 2s of pure wait after the agent was already running (~1s on average).Now: 400ms polls for the first 20s (fresh boots reach running in single-digit seconds), then back off to the old 2s for the tail. Timeout unchanged at 180s.
Cost
Worst case ~50 extra lightweight status queries per launch, only while the agent is actually starting.
Part of the cloud agent startup latency work — measured create→running at 5-9s, so the fast window covers the normal case with room to spare.
🤖 Generated with Claude Code