Repository navigation
Start Environment initialization sooner after a Runtime boots - #812
Merged
Merged
Conversation
The Runtime daemon ran its Harness preflights one after another before it connected, and Core found the connected Runtime only on its next 250 ms initialization scan. Both sit on every hosted cold start. The daemon now runs the preflights concurrently and replays their output in declaration order. The gateway signals the first agent-kind declaration of a connection, and the initialization loop scans on that signal; the poll stays as recovery.
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
Two steps on every hosted cold start, between the VM being created and Environment initialization starting:
codex --version, mcode) concurrently instead of one after another. Output is replayed in declaration order.No protocol, store or setting change.
Measurement
mx2 microsandbox node, fresh install of this commit, same workload as the #811 run (hosted regression, then
prep_cache.pyS1–S5, then S1–S4 again). Seconds from the VM create step finishing to Environment initialization starting, Core clock:About 0.5–0.65 s off every hosted cold start. Hosted regression 9/9 for codex and claude_sdk; every cache case answered correctly.
Tests
TestDiscoveryAndRegistrationfails when preflights run sequentially and checks output order.TestFirstHeartbeatAnnouncesAgentKinds: only the first declaration of a connection signals.