Skip to content
  1. Wiki
  2. How pstack works
  3. Subagents

Subagents

A subagent is a helper AI sent off to do one small job. It reads a lot, then brings back only the conclusion.

An analogy

Like an editor sending a reporter out. The reporter spends all day in the field and comes back with one article, not a pile of notes.

In pstack

Many pstack skills send out helpers. /pstack:how sends a few to read code without changing it. /pstack:arena has several each write a solution. /pstack:swarm gives each helper one piece of the job. /pstack:interrogate brings in different models to find holes.

That way, heavy reading goes to helpers, and the main chat keeps only the conclusions. The principle is called guard the context window. Which model each helper uses comes from the config /pstack:setup-pstack writes.

Common misconceptions

  • "More helpers means faster": helpers burn a lot of tokens. pstack only sends them when it pays off: wider coverage, an independent opinion, or room in the main chat.
  • "Several helpers editing code in one folder is fine": they overwrite each other, and nobody can tell who changed what. Each one that edits code needs its own worktree.

Related: Worktrees, Model roles and the pstack-models config, Tokens and the reasoning budget

An unofficial beginner's guide to pstack, not its official docs. pstack is made by poteto; the official repo is the source of truth for commands and behavior. The original guide source is on GitHub.

Hosted by airali. Adapted from Xiaoxiaodong's MIT-licensed guide.