npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-basic-subagents

v1.0.0

Published

Minimal subagents for pi, where each subagent is a regular pi session with the same tools and access as your agent.

Readme

pi-basic-subagents

npm version

Minimal subagents for pi, where each subagent is a regular pi session with the same tools and access as your agent, rather than task-specific restricted subagents.

A pi session with two running subagents above the editor, while the parent is ready for another prompt

Scripted demo with real pi sessions and tools; model names are illustrative.

Install

pi install npm:pi-basic-subagents

Design

  • Just a pi session. Each subagent runs in your project with your settings, extensions, MCP servers, skills, and AGENTS.md, and its transcript is a normal pi session you can open.
  • Minimal. No agent definitions, prompts, or tool lists to write: install it and ask your agent to delegate. It exposes three tools for your agent, modeled on Claude and Codex so models already know them. No commands, skills, or additions to your agent's system prompt; subagents get a few lines telling them how to work and report. No workflow engine: your agent scripts subagents with codemode.
  • Never blocking. Your agent starts a subagent and can steer or stop it while it works; the subagent reports back when it finishes. Your agent stays free to talk to you.

Use

Ask for it in plain words; your agent calls the tools:

Have a subagent research the best queuing approach while you fix the failing test.

Have two subagents review this work, one using Opus and one using GPT, and compare what they find.

Starting a subagent returns right away, so you can keep talking to your agent. Running subagents show live above the editor with their model, context size, and time. When one finishes, its report lands in your conversation and wakes your agent. Your agent can steer running subagents, or resume finished ones, by sending them messages. With codemode, it can also script many subagents and pass on only what matters.

There are no subagent types: your agent's prompt carries any constraints, such as not changing anything. A subagent uses the same model as your agent unless your agent picks another.

To steer subagent usage and model choices, add guidance to your AGENTS.md, for example:

## Subagents

Delegate to subagents only when asked. Choose model and thinking level by task:

- Complex implementation or research: `gpt-6.1-sol:medium`
- Well-specified edits to 1–3 files: `gpt-6-luna:low`
- Reviews: `claude-opus-5-5:high` or `gpt-6.1-sol:high`

Configuration

Optional. Set any of these under basicSubagents in ~/.pi/agent/settings.json, or in .pi/settings.json in a trusted project, which overrides it per setting:

{
  "basicSubagents": {
    "maxConcurrent": 5
  }
}

| Setting | Default | Description | |---|---|---| | maxConcurrent | 20 | How many subagents can run at once per session. | | maxDepth | 1 | How many layers of subagents are allowed below your session. At 1, subagents can't start their own. |

Compared to other subagent packages

The most used pi subagent packages, and the example that ships with pi, as of October 2026 (pi-subagents 0.78.0, @tintinweb/pi-subagents 0.22.0, pi-subagent-manager 0.29.1, pi's subagent example in 1.3.0):

| | pi-basic-subagents | pi-subagents | @tintinweb/pi-subagents | pi-subagent-manager | pi's example | |---|---|---|---|---|---| | Subagent runs as | its own pi process | inside your pi process (foreground) or a separate runner (background) | inside your pi process | inside your pi process | its own pi process | | Gets your extensions, MCP, skills, AGENTS.md | yes | depends on agent and mode | yes; AGENTS.md only in general-purpose | your conversation and tools; no skills or AGENTS.md | yes | | Setup | none | none (7 built-in agents) | none (3 built-in agents) | none (6 built-in agents) | agent files and symlinks | | Custom agents, per-agent tools and model | no | yes | yes | yes | yes | | Model-facing tools | 3, plus 1 that waits, for codemode scripts | 1 main, plus helpers | 3 | 8 | 1 | | Background runs, reports wake your agent | yes | yes | yes | optional | no (blocks) | | Steer / stop / resume | yes / yes / yes | yes / yes / except stopped | yes / UI only / up to 10 min after it finishes | yes / yes / yes | no / no / no | | Subagent can ask your agent questions | no (stops and reports) | yes | no | no | no | | Workflows & orchestration | via codemode | custom scripts, parallel, lanes | custom scripts, parallel, pipelines | nested subagents | parallel, chains | | Manage git worktrees | no | yes | yes | no | no | | Source lines | ~1.1k | ~101k | ~21k | ~13k | ~1.1k |

FAQ

Why is there no tool for my agent to wait for subagents?

So you can keep talking to your agent. Given a wait tool, models tend to call it right after starting subagents, shutting you out until they finish; Claude Code removed its wait tool for the same reason (research memo). Waiting happens only in codemode scripts, which get subagent_start_and_wait: like await agent() in Claude Code's workflows, it returns the subagent's report, so a script can fan out with Promise.all and return only what your agent needs. Stopping a script (Esc) stops the subagents it's waiting on, and calls past maxConcurrent fail, so batch big fan-outs.

Why one-way communication? What if a subagent gets stuck?

A subagent works in the background, where nobody is watching to answer questions, and your agent, busy with its own work, is a poor stand-in. So a subagent makes routine judgment calls itself and states its assumptions in its report. At a decision that would change the outcome, it stops and reports what needs deciding. Your agent, or you through it, answers with a message, which resumes the subagent with its full history.

Can a subagent be read-only?

Only by instruction. Your agent can tell it not to change anything, but it has the same tools as any pi session, and read-only work often needs bash, which can edit any file. For enforced limits, use a sandbox or a permission system.

Can two subagents work on the same files?

They can, and they can collide: subagents work in your project directory, not a copy, so that your project's settings and trust apply to them. Give parallel subagents separate files, or ask for isolation when you delegate: a subagent can create a git worktree and work there.

Can I see what a subagent did?

Expand its report for the transcript path. Each finished report is also saved as a Markdown file next to the transcript. pi --session <path> opens it; to continue the work yourself, use pi --fork <path>, which leaves the original for your agent to resume.

What happens to running subagents when I quit pi?

They're stopped (so are they on /reload, /new, and /resume). When you reopen the session, your agent hears which ones were cut short and where any missed reports are, and can resume them with a message.

Learn more

License

MIT