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/spawn-session-tool.md
T
Federico Jaramillo Martinez 95c151233a feat: let agents start new sessions via spawn_session tool
Add a project-scoped spawn_session tool so agents can dispatch new,
independent sessions (ralph loops, long-plan chaining). Spawned sessions
are constrained to a workspace/worktree of the same registered project,
appear in the session list immediately via a new session.created event,
and the capability is on by default with a Settings -> Session daemon
toggle (spawnSessions / PI_WEB_SPAWN_SESSIONS).

Note: adds a session daemon code path, so pi-web-sessiond.service must be
restarted manually for the server side to take effect.
2026-06-16 14:53:37 +02:00

1.1 KiB

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

Let agents start new sessions with a spawn_session tool. An agent can dispatch a fresh, independent session with an initial prompt — useful for ralph-style loops (an agent kicks off the next iteration when done) and for chaining long plans across sessions. Spawned sessions are normal sessions a human can open and interact with, and they now appear in the session list the moment they are created (in the matching workspace) without a manual reload.

To keep every spawned session visible and controllable, an agent may only spawn into a workspace — any worktree, including one it just created — of the same registered project as the spawning session. The capability is on by default and can be toggled under Settings → Session daemon (or via the spawnSessions config key / PI_WEB_SPAWN_SESSIONS environment variable); changes take effect after the session daemon restarts.

Note: this adds a session daemon code path, so pi-web-sessiond.service must be restarted manually for the server side of this change to take effect.