You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delegate: prepare the worktree before an agent starts, and let writers push and stop #991
area:agentsOrchestration, slots, delegate, handoff, wake-ups, model policy, review rulessize:mediumContained, several files or teststype:featureNew behaviour or capability
What: two habits become the default for every delegated agent, not only while usage is paced (#893):
Prepare before the agent starts. For a writer or lens on an existing branch, a script (no Claude usage) makes the worktree, merges main, installs dependencies and runs the baseline tests of the files it will touch. The brief gets the result: worktree path, merge conflicts (if any) and baseline red tests. The agent starts with thinking, not setup.
Push and stop. A writer pushes and ends. It does not sit waiting for CI. The orchestrator's PR watch (upstream watch_pull_request) wakes it when checks finish, and it starts the next step.
Why: agent time is the scarce part (usage limits, agent slots, VM memory). Setup is fixed steps a script does cheaper and the same way every time. A writer waiting 15–30 minutes on CI holds a slot and spends usage on polling. A red baseline found before the agent starts also stops agents "fixing" a test that was already red (known-failing rule).
Exceptions:
A writer may wait on CI when the run is short (about 5 minutes or less) and a fix loop is likely, because a fresh agent would have to re-read everything.
Prepare only what is queued to start soon. Each prepared worktree costs disk and goes stale as main moves; the agent merges main again at start (cheap).
Where: built on upstream T3 delegation (worktree isolation, PR watch), as a thin fork add-on. General: the commands for install and baseline tests come from the project's own config file, not hard-coded.
General vs project: general (any project); the project gives its install and test commands in its config.
Owner addition (in chat, 2026-11-22): a third exception. When an account is behind on using its usage and little time is left before its reset (usage that would otherwise go unused), running as many agents as possible comes first. Then agents may wait on CI and do their own setup, because the spare usage is otherwise lost.
Rule:
On pace or ahead of it: prepare by script, and writers push and stop.
Behind, near the reset: fill every free slot (within the machine capacity checks). A paced-out script step is not worth holding an agent back for.
The usage pacing numbers (#893) decide which case applies. This fits the existing burnFirst setting for accounts whose usage would expire.
Posted by the orchestrator from the owner's chat message.
area:agentsOrchestration, slots, delegate, handoff, wake-ups, model policy, review rulessize:mediumContained, several files or teststype:featureNew behaviour or capability
Activity
scuttletoby commentedon Nov 22, 2026
Owner addition (in chat, 2026-11-22): a third exception. When an account is behind on using its usage and little time is left before its reset (usage that would otherwise go unused), running as many agents as possible comes first. Then agents may wait on CI and do their own setup, because the spare usage is otherwise lost.
Rule:
The usage pacing numbers (#893) decide which case applies. This fits the existing
burnFirstsetting for accounts whose usage would expire.Posted by the orchestrator from the owner's chat message.
🤖 Generated with Claude Code
delegate prepare: merge, install and baseline tests by script before …
delegate prepare: merge, install and baseline tests by script before …
delegate prepare: merge, install and baseline tests by script before …
delegate prepare: merge, install and baseline tests by script before …