fix(pstack): make the /poteto-mode chat the runner, poteto-agent a delegate

Merged
PO
5d ago
+6-4

Summary

Supersedes #358. Fixes #357.

poteto-agent described itself as the "Routing target for /poteto-mode". A parent chat that follows that text spawns one poteto-agent to run the whole playbook. That subagent is nested, and a nested subagent has no Task tool. So it cannot spawn the how, why, Comment Sicko, or code delegates that the playbook needs, and its todo list does not reach the chat. Issue #357 shows the result: 5 failed todo_write calls and 0 Task calls.

After this change, the chat that receives /poteto-mode runs the playbook. poteto-agent is the wrapper for delegates that the chat spawns during the run.

This is #358 by @dev2o, rebased onto current main, with credit in a Co-authored-by trailer.

Changes

  • agents/poteto-agent.md: the description calls the agent a delegate, not the /poteto-mode runner. The body says the receiving chat owns the playbook, the todo list, and every Task spawn. Main's "Spawn a fresh poteto-agent for each new task" sentence stays.
  • skills/poteto-mode/SKILL.md: the Subagents section says the receiving chat runs the playbook, and never to spawn a poteto-agent to run it.
  • README.md: the poteto-agent section uses the same runner and delegate split.

Differences from #358

  • Rebased onto current main. The conflict fix keeps main's "Spawn a fresh poteto-agent" text and does not bring back the old "Resume an existing poteto-agent" text.
  • No playbooks/feature.md change. Main's step 4 no longer says "you can spawn a subagent even though you are one".
  • No version bump.
  • No "only the main agent can spawn subagents" reason sentence in SKILL.md or README.md. The rule does not depend on the surface.

Test plan

  • Spawned a subagent with the Task tool and asked it to list its own tools. It had no Task tool in its direct list or in its dynamic tool catalog. The parent did have Task.
  • node scripts/validate-plugins.mjs passes.
  • The poteto-agent.md frontmatter parses as YAML with the same keys (name, description, is_background).
  • The diff is plain ASCII.
Open in Web Open in Cursor