Repository navigation
perf: provision executor worktrees warm — never cold-install - #24
Open
erkamdemirci wants to merge 1 commit into
Open
erkamdemirci wants to merge 1 commit into
erkamdemirci wants to merge 1 commit into
Conversation
Every execute dispatch pays a cold-start tax: the fresh worktree shares git history but not node_modules or build caches, so the executor cold-installs and cold-builds before the first plan step — minutes of pure overhead per plan on JS/TS repos. The old note in closing-the-loop.md documented the cost; this makes avoiding it part of the dispatch protocol. - Dispatch gains a provisioning block in the subagent prompt: clone deps from the main checkout (cp -Rc on macOS, cp -al on Linux, robocopy /E on Windows; pnpm: --prefer-offline), copy ignored caches (.next/cache, .turbo, *.tsbuildinfo), never symlink node_modules. - The executor confirms the toolchain with the plan's typecheck command instead of installing by reflex; the "one build if checks resolve from dist/" caveat moves into the same block (it lived in Review, read too late to help). - plan-template: the Install row is scoped to cold trees. Same worktree, same isolation guarantees — just warm at step 1. 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.
Problem
Every
executedispatch pays a cold-start tax. The fresh worktree shares git history but notnode_modulesor build artifacts, so before the first plan step the executor runs a cold install plus cold typecheck/build/test — minutes of pure overhead per plan on JS/TS repos, repeated for every plan executed. closing-the-loop.md currently documents the cost ("the executor must install dependencies first") but doesn't avoid it.Change
Warm provisioning becomes part of the dispatch protocol:
cp -Rc(APFS clone) on macOS,cp -al(hardlinks) on Linux,robocopy /Eon Windows; pnpm repos canpnpm install --prefer-offlineagainst the machine store — and copy ignored cache dirs (.next/cache,.turbo,*.tsbuildinfo) before the first build. Clone or hardlink, never symlinknode_modules(symlinks break.binresolution and file watchers).dist/caveat moves to dispatch: "expect one build if check tooling resolves fromdist/" lived at the top of Review, where it's read after dispatch already happened. It now travels with the provisioning block, and the stranded Review note is removed.What doesn't change
The isolation model. Same disposable worktree, same guarantees, same review flow — the worktree is simply warm when the executor starts.
🤖 Generated with Claude Code