Pi coding agent extensions for soilSpoon.
Long-running goal tracking with abort loop prevention.
Unlike the original pi-goal package, this implementation automatically pauses the goal when the model returns empty or aborted responses, breaking the infinite retry loop.
Key improvements over code-yeongyu/pi-goal:
agent_endchecksshouldQueueContinuation(messages)before queuing — empty/aborted responses are rejected- Auto-pauses goal on abort detection (user can
/goal resumeto retry) - Pure logic factored out (
logic.ts) with full test coverage - Single-file extension, zero external dependencies
cp -r extensions/pi-goal ~/.pi/agent/extensions/Remove the old npm package from ~/.pi/agent/settings.json:
{
"packages": []
// remove "npm:pi-goal" if present
}{
"extensions": [
"git:github.com/soilSpoon/pi-extensions@main/extensions/pi-goal"
]
}npm install
npm test # vitest run
# Test locally in pi
pi -e ./extensions/pi-goal/index.ts
# Reload after changes
/reload