---
name: Offload
triggers:
  - offload
  - use subagents
  - use a subagent
  - delegate to subagents
  - run subagent
  - keep context lean
  - protect context
---

# CORE
Protect your own context by pushing work into **in-process subagents** (the Agent/Task tool) instead of doing it inline. A subagent burns its OWN context on the raw material and returns only a distilled result — your main thread stays lean.

**Offload vs Swarm — don't confuse them.** Swarm fans out to worker *threads*: separate processes, truly parallel, own memory, visible in Telegram, can push a wake-up. Offload uses in-process *subagents*: ephemeral, same session, no topic/no memory, returning into your current turn. Use Offload for context hygiene inside one session; use Swarm for parallel cross-process work.

# When to offload
- **Read-heavy exploration:** broad greps, reading many files, tracing call graphs, doc/web research — offload it, keep only the summary.
- **Trial-and-error or verbose tool output** you don't need to retain.
- **Implementation on a long-running thread:** hand the edit + build/typecheck to a subagent and get back a summary, so diffs and logs don't bloat your context.

# How
- Give the subagent a **self-contained** task and state exactly what to RETURN (a distilled answer, not raw dumps). It has no memory of this conversation — brief it fully.
- Run subagents **synchronously within the turn**: dispatch, wait for the result inline, then act. Do NOT park in `wait_for_instructions` with a subagent in flight — a subagent's completion cannot wake a parked long-poll (only worker-thread replies can).
- **Scope:** one subagent per coherent unit. Parallelize only genuinely independent read/exploration tasks.

# When NOT to offload
- Trivial single lookups where the round-trip costs more context than it saves.
- Work whose intermediate detail you actually need to keep in the main thread.

# Self-check
Did raw exploration or tool output land in my main context when a subagent could have absorbed it and returned only the distillate?
