Install
Install with PiG
pig install npm:@pi-in-go/pigpen-tintinweb-subagentsPackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package. This one is published by the PiG project from the Pigpen repository; that is not a verification claim.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"extensions/tintinweb-subagents"
]
}README
Written by the package's publisher, shown as published in version 0.1.1 (README.md). PiG does not review it.
tintinweb-subagents (Go port, partial)
A Go extension for PiG that lets the model hand work to subagents, as Claude Code does: the Agent tool starts a
specialist (general-purpose, Explore or Plan, or one you define in a Markdown file), by default in the
background; you are notified when it finishes, get_subagent_result fetches the full answer, steer_subagent
redirects a running one, and /agents lists the types and the agents of the session. It is a port of
@tintinweb/pi-subagents 0.19.0 by tintinweb (see CREDITS.md), made with the
extension porting Skill. It needs no Node runtime, and starts no process until an
agent is started.
This is not components/subagents, the port of nicobailon/pi-subagents: a different
project with a different tool. The two can be installed side by side.
Install
pig install ./components/tintinweb-subagents
or take the pig-essentials Piglet, which selects it together with
tintinweb-tasks: TaskExecute of that port starts its agents through this one, over the same event-bus protocol
(version 2: subagents:rpc:ping, spawn, stop, consume, and the subagents:ready, created, completed,
failed and steered events).
How an agent runs
Each agent is a child pig --mode rpc --no-session process, started in your workspace with the agent's tools and
system prompt, the parent's model and thinking level (unless the call or the agent file sets its own), and the task as
its prompt. The original runs the agent inside Pi's process through Pi's SDK; a Go extension cannot, so an agent here
costs one process (and one start-up of pig). A child registers no agent tools, so there is no nesting. The pig that
is started is, in order: TINTINWEB_SUBAGENTS_PIG_BINARY, the pig that started this extension (PIG_HARNESS_BINARY,
which PiG sets for its extension processes), the parent process (Linux and Android), this executable (in a Piglet
Binary, the Binary itself, so agents have the same built-in members), pig on PATH; the first that answers
--version is used. The child inherits your environment, so it reads the same credentials and settings.
An agent with a turn limit (max_turns, the agent file's max_turns or defaultMaxTurns) is told to wrap up when it
reaches the limit, and aborted if it is still working graceTurns turns later (default 5); it then reports as
steered or aborted, and a run whose last turn failed (a provider error) reports as an error, as in the original.
Stopping an agent (or ending the session) stops its process group: SIGTERM, then SIGKILL five seconds later.
Agent files
Custom agents are Markdown files with YAML frontmatter, read from <agent dir>/agents/, <workspace>/.agents/agents/
and <workspace>/.pi/agents/ (later ones win), exactly as in the original: name, description, tools
(all, none, a list, ext: selectors), model, thinking, max_turns, prompt_mode, run_in_background,
enabled, disallowed_tools, extensions, skills, isolated and the rest are parsed the same way (the 76 cases of
the original's custom-agents tests are twinned). Settings come from <agent dir>/subagents.json and
<workspace>/.pi/subagents.json: maxConcurrent (default 10), defaultMaxTurns, graceTurns, fallbackSubagent (an
unknown type goes to general-purpose, to a named agent, or with "none" is refused) and disableDefaultAgents.
What is not ported
This port ships the slice above. The original's other features are named in port/slices.json and
port/PORT.md: the SubagentWorkflow JS workflow runtime, scheduled runs, worktree isolation, @name
mentions, the widget, fleet and conversation-viewer UI, persistent agent memory, nested delegation, inherit_context
(the call is refused with a message), the settings menu, and output transcripts. resume starts a new agent with the
earlier agent's final answer in its prompt (a child's session is not kept). isolated: true starts the child with no
extensions. The Agent tool is advertised with the original's text and schema as it is with workflows, scheduling and
worktree isolation switched off.
The proof that the shipped slice matches the original is in port/PORT.md.