Repository navigation
Use the Codex RPC budget for initialization - #591
Merged
Merged
Conversation
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.
Codex initialization had a separate 10-second deadline while ordinary JSON-RPC responses use a 60-second default. Valid metadata probes during self-hosted initialization can exhaust that shorter window before execution begins. Use the existing request budget for initialize, retaining configured request timeouts, parent cancellation, response timing after writes and native child cleanup. No new setting, timer, cache or native behavior is introduced.
A bounded real startup trace recorded 12 slow native metadata calls totaling 9.040 seconds with overlap and another probe still pending at termination; the same pinned binary initialized locally in 172.75 ms without a model. This does not explain the earlier 18.100 seconds before launcher execution, isolate tracing/network overhead or establish successful self-hosted qualification after the change. Original failure evidence is preserved; live qualification remains pending.
Validation: full Codex and clirunner packages; focused RPC initialization/write/reaping tests under race; names/docs/CI hygiene; diff check. Real child-process tests cover an 11-second initialize using the default budget, a configured 100 ms timeout, owner cancellation and cancellation during a blocked initialization write, including child reaping. The 11-second test fails against original cdf03 source through a Go overlay at the original 10-second deadline, and passes with this change.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.