How to run delegate threads for RustCode work (start_thread, fan_out, run_workflow) once the user has asked for delegation: accounts and models, prompts, waves, waiting and merging. Read it before starting any delegate.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Delegate?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/lhagfoss-delegate)
---
name: delegate
description: How to run delegate threads for RustCode work (start_thread, fan_out, run_workflow) once the user has asked for delegation: accounts and models, prompts, waves, waiting and merging. Read it before starting any delegate.
---
# Delegating RustCode work
Only when the user asked. Every delegate spends usage of its own, and every
one that finishes wakes the orchestrator, which resends its whole context
(120–350k tokens; one 42-delegate batch woke it 41 times).
## Starting delegates
- Unless the user names another model, run delegates on Opus 5.5 or Sol 6.1
at medium effort, each with an explicit `account` that is not the
orchestrator's. A delegate bills the account it runs on; with none set, 32
of 39 ran on the orchestrator's account or the default sign-in.
- Keep each task small and self-contained, so it finishes in a short turn
instead of exploring. Give each thread its own worktree and disjoint files,
with `file:line` pointers, concrete target values and the acceptance
criteria. Run the `prior-art` skill first and pass its hits on, so a
delegate does not repeat the search.
- Repeat the repository rules that apply in the prompt and tell it to read
`AGENTS.md`: a delegate inherits none of this conversation, and a thread
started from another project does not load `AGENTS.md` on its own. Name a
skill's `SKILL.md` path if it matters; listed skills went unread.
## What every delegate prompt says
- Never rebase a task branch, merge `origin/main` with `--no-edit` when it
needs updating, and pass `-m` to commits. A delegated shell has no TTY, so
anything that waits for an editor, a pager or input holds the turn until
someone interrupts it.
- Wrap anything that can block (Git, scripts, browsers, dev servers, checks)
in `timeout 120`, with a longer explicit limit for a known long check. A
delegated shell has no default timeout, and a timer can keep a one-off
script alive after its work is done: make scripts exit. If a command times
out, report it and inspect the worktree before resuming; do not blindly
rerun it.
- Gate on `cargo check` / `bun run check` once at the end, then on CI (seven
delegates building tests at once drained the user's battery), and end the
turn with the PR URL. Reviewers read the code and the PR's CI instead of
building it. Ask for screenshots only when the change needs them;
home-made CDP drivers were the main time sink.
## Running a wave
- Start fewer, larger waves: put everything that is ready into one `fan_out`
(or several `start_thread` calls), then either end the turn or call
`wait_thread` once with every `link_ids` and `all: true`, which answers
when the whole wave has settled.
- Read progress with `thread_status` (with no thread id: every delegate, with
branch, pull request and checks) and merge with `merge_when_green`.
- Do not `cd` into delegate worktrees, read their CI logs, or tail
background merge output from the orchestrator; a delegate that needs fixing
gets a `message_thread`.
- Local notes, if present (git-excluded):
`research/orchestrator/pi-deepseek-subagents.md`.