customType: subagent-slash-result

content: what does the tool babysit do?

type: text

text: what does the tool babysit do?

mode: single

agent: ollama-explain

task: what does the tool babysit do?

status: running


content:
## Subagent result

The **`babysit`** skill is the core execution entrypoint of the `@a5c-ai/babysitter-pi` extension (v6.0.2) installed in this Pi agent environment. It transforms ad-hoc chat requests into structured, process-driven workflows orchestrated by the external **Babysitter SDK**.

**What it does**
- When you invoke `/babysit` (or aliases like `/babysitter`, `/call`), the extension (`extensions/index.ts`, line 98) forwards the command into Pi's native `/skill:babysit` flow rather than handling it directly.
- The skill then installs/ensures the Babysitter SDK/CLI and executes:
  ```bash
  babysitter instructions:babysit-skill --harness pi --interactive
  ```
  (or `--no-interactive` when `AskUserQuestion` is unavailable).
- This kicks off a multi-step orchestration flow that can include **run creation** (`run:create`) with a unique run ID, **task dispatch**, **human-in-the-loop breakpoints**, and **event-sourced journaling** — all logged under `.a5c/runs/<runId>/`.

**Key parts**
- `skills/babysit/SKILL.md` — defines the skill metadata and a non-negotiable rule: *even trivial tasks must use the full Babysitter run lifecycle*.
- `skills/help/SKILL.md` — documents the broader command surface (`/call`, `/resume`, `/yolo`, `/plan`, `/forever`, `/doctor`, etc.), but all of them ultimately route through the `babysit` orchestration core.
- `extensions/index.ts` — the thin Pi extension that registers slash commands and, crucially, hooks into Pi's `agent_end` event (line 64) to auto-continue active Babysitter runs after each assistant turn.

**Why it exists**
Pi excels at one-off coding tasks but lacks built-in support for long-running, multi-step workflows with state recovery. Babysitter fills that gap by adding an orchestration layer on top of Pi. The `babysit` skill is the bridge: it tells Pi how to hand control to the Babysitter SDK, enforce structured processes, and maintain event-sourced state across iterations.

**Edge cases / constraints**
- The skill mandates that **all** structured or loop-like tasks go through the SDK, even if they seem trivial.
- The extension's `agent_end` handler uses a re-entrancy guard (`stopHookInFlight`) so overlapping end-of-turn events don't stack stop-hook subprocesses.
- Hooks are best-effort; failures are swallowed rather than blocking the turn.

## Child session exports

- `/home/liph/.pi/agent/sessions/--home-liph-dotfiles-pi-.pi-agent--/2026-07-24T06-07-49-964Z_019f92bc-bacc-759d-b548-969978281b98/61357be0/run-0/session.jsonl`

## Artifact outputs

- `/home/liph/dotfiles/pi/.pi/agent/.pi-subagents/artifacts/61357be0_ollama-explain_0_output.md`

outputMode: inline

status: attested

level: attested

must: Return a concise result and residual risks when applicable

evidence: manual-notes residual-risks

severity: required

status: satisfied

evidence: Read npm/node_modules/@a5c-ai/babysitter-pi/skills/babysit/SKILL.md, README.md, skills/help/SKILL.md, extensions/index.ts, and package.json to extract the tool's purpose, workflow, and constraints.

validationOutput: The babysit skill is an orchestration bridge that invokes the Babysitter SDK to create event-sourced, process-driven runs with tasks, breakpoints, and resume capability.

diffSummary: No changes made — read-only investigation.

manualNotes: The tool is part of the @a5c-ai/babysitter-pi npm package installed in the Pi agent environment. Its full behavior is dynamically generated by the Babysitter CLI via `instructions:babysit-skill` rather than being hard-coded in the skill file itself.

text: grep {"pattern":"babysit","path":"/home/liph/...

text: find {"pattern":"npm/node_modules/@a5c-ai/bab...

text: find {"pattern":"**/*babysitter*/**/*.md"}

text: grep {"pattern":"babysitter-pi","path":"/home...

text: ls {"path":"/home/liph/dotfiles/pi/.pi/agen...

text: read ~/dotfiles/pi/.pi/agent/npm/node_modules/@a5c-ai/babysitter-pi/README.md

text: read ~/dotfiles/pi/.pi/agent/npm/node_modules/@a5c-ai/babysitter-pi/skills/babysit/SKILL.md

text: read ~/dotfiles/pi/.pi/agent/npm/node_modules/@a5c-ai/babysitter-pi/skills/help/SKILL.md

text: read ~/dotfiles/pi/.pi/agent/npm/node_modules/@a5c-ai/babysitter-pi/extensions/index.ts

text: read ~/dotfiles/pi/.pi/agent/npm/node_modules/@a5c-ai/babysitter-pi/package.json