This repository has been archived on 2026-08-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
pi-web/.changeset/tracked-subsessions.md
T
Federico Jaramillo Martinez 997b821717 feat: add check_subsession and an exploratory read_subsession transcript reader
Split subsession inspection into two tools: check_subsession gives a quick
glance (status + latest assistant output), while read_subsession reads through
a child's transcript with role/content filters, full-content substring search
(including tool-call args), optional per-value maxChars truncation that flags
clipped parts, includeToolArgs, and pagination.

Filtering and search run on full untruncated content; truncation is an explicit,
caller-owned final projection (no default) so a narrow read never silently hides
a match. Empty page-windows are distinguished from zero-match results.
2026-06-19 23:48:12 +02:00

1.2 KiB

@jmfederico/pi-web
@jmfederico/pi-web
patch

Add tracked subsessions (beta, off by default): agents can spawn child sessions they stay attached to. The new spawn_subsession tool starts a child session linked to its parent (recorded in the session tree), notifies the parent when the child stops working, and lets the parent inspect children via list_subsessions, check_subsession (a quick glance at a child's status and latest output), and read_subsession (read through a child's transcript with role/content filters, full-content substring search, optional per-value maxChars truncation that flags clipped parts, and pagination). The completion notice is delivered as a system-authored message (not attributed to the human), and still wakes an idle parent while queueing behind any in-flight work. Unlike the fire-and-forget spawn_session, subsessions are observable by their spawner.

The capability is gated behind a beta flag so it can ship without being exposed in releases: enable it with the PI_WEB_SUBSESSIONS env var, the subsessions config key, or the "Allow agents to start tracked subsessions" toggle in Settings → Session daemon. It also requires spawnSessions to be enabled. Requires a manual session daemon restart to take effect.