Skip to content

Prewarm skills during thread resume#26598

Draft
charliemarsh-oai wants to merge 4 commits into
mainfrom
charlie/prewarm-skills-during-resume
Draft

Prewarm skills during thread resume#26598
charliemarsh-oai wants to merge 4 commits into
mainfrom
charlie/prewarm-skills-during-resume

Conversation

@charliemarsh-oai

Copy link
Copy Markdown
Contributor

Stacked on #26469.

Summary

Resuming a thread starts session initialization only after the app server has loaded the thread. Session initialization then resolves plugin skill roots and discovers skills before the resumed thread is ready, leaving that work serialized on the startup path.

This change starts the same plugin and skill warmup when thread/resume begins, allowing it to overlap with loading the thread. Config-scoped skill loads now use a shared in-progress result, so session initialization reuses either the active prewarm or its completed outcome instead of repeating discovery. Existing force-reload and cache invalidation paths continue to clear the config cache.

In 30 alternating release-build pairs resuming the same Ruff session, the median thread_and_widget startup phase decreased from 267ms on #26469 to 248ms on this branch. The branch was faster in 27 of 30 pairs, with a paired median improvement of 21ms. Median time to the first editable composer decreased from 1.043s to 1.026s; that end-to-end measurement is noisier because account/model bootstrap and network latency are outside this change.

Base automatically changed from charlie/reuse-plugin-discovery-startup to main June 5, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant