refactor: load subagents from user config (~/.pi/subagents/)
- Discover prompts from ~/.pi/subagents/*.md instead of bundled prompts/ - Only register the subagent tool when at least one subagent exists - Remove directory path from tool description (agents listed dynamically)
This commit is contained in:
@@ -9,6 +9,8 @@ This repo implements the `subagent` pi extension in `index.ts`.
|
||||
- Parent-facing tool: `subagent`.
|
||||
- Internal child-only tool: `subagent_finalize`.
|
||||
- Never register `subagent_finalize` in the parent context; only when `PI_SUBAGENT_CHILD=1`.
|
||||
- Subagents are loaded from `~/.pi/subagents/*.md` (user config only).
|
||||
- The `subagent` tool is only registered when at least one subagent exists.
|
||||
- Subagent sessions are sticky and persisted at:
|
||||
`~/.pi/subagent-sessions/<cwd-hash>/<agent>_<sessionId>.jsonl`.
|
||||
- Omitting `sessionId` creates a new UUID-backed session.
|
||||
|
||||
Reference in New Issue
Block a user