Skip to content

feat: make pstack and pi-subagents coexist - #2

Open
satyam-mishra-pce wants to merge 4 commits into
kkgogogo17:mainfrom
satyam-mishra-pce:integrate-pi-subagents
Open

feat: make pstack and pi-subagents coexist#2
satyam-mishra-pce wants to merge 4 commits into
kkgogogo17:mainfrom
satyam-mishra-pce:integrate-pi-subagents

Conversation

@satyam-mishra-pce

Copy link
Copy Markdown

Problem

Pi cannot start when pi-pstack and pi-subagents are both enabled because both extensions register a tool named subagent. Pstack's bundled agents are also invisible to pi-subagents workflows even though both packages can be useful together.

This supersedes the tool-rename fix in #1 and carries that fix together with the package integration work.

Fix

  • Rename pstack's native delegation tool to pstack_subagent, preserving its pstack-specific role, tasks, and chain behavior.
  • Export poteto-agent and comment-sicko through both Pi and pi-subagents package metadata.
  • Document when to use pstack_subagent versus subagent.
  • Add package-level tests for agent discovery metadata and the namespaced tool contract.
  • Add the missing ESM package declaration and a test script.

The two packages remain independently installable. This does not make pi-pstack depend on pi-subagents, so standalone pstack users keep the existing native implementation. When both are enabled, users get pstack's role-aware delegation and pi-subagents' background, mission, worktree, and resumable workflows in the same Pi session.

Validation

  • npm test
  • git diff --check
  • Loaded both extension files with Pi in both load orders using a temporary PI_CODING_AGENT_DIR. Startup reached model authentication without reporting a tool conflict.

indrajit-roy-sc and others added 4 commits August 24, 2026 19:01
… conflicts

Pi hard-fails startup when two loaded extensions register a tool with the
same name (the conflict is recorded as an error diagnostic, and main exits
on any error diagnostic). The generic name "subagent" collides with other
packages in the ecosystem, e.g. npm:pi-subagents, making pi-pstack
unusable alongside them.

Rename the registered tool to the namespaced pstack_subagent, matching the
existing pstack_* naming convention (pstack_todo, pstack_sessions,
pstack_config), and update all references in the poteto-mode system
prompt, README, and skills.
@indrajit-roy-sc

indrajit-roy-sc commented Sep 3, 2026

Copy link
Copy Markdown

I don't think this guy cares about the repo anymore...don't want to maintain my own fork :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants