pi-goal

Persistent autonomous goals for pi — /goal loops until complete, paused, or budget-limited

Package details

extension

Install pi-goal from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-goal
Package
pi-goal
Version
0.1.2
Published
May 4, 2026
Downloads
not available
Author
miclivs
License
MIT
Types
extension
Size
20.7 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    ".pi/extensions/pi-goal"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-goal

Persistent autonomous goals for pi.

pi-goal adds a /goal command and goal tools so Pi can keep working toward a long-running objective until the goal is complete, paused, cleared, or token-budget-limited.

Install

pi install npm:pi-goal

Or from git:

pi install git:github.com/Michaelliv/pi-goal

Usage

/goal improve benchmark coverage until the suite has strong evidence
/goal --tokens 50k finish the migration and verify tests
/goal status
/goal pause
/goal resume
/goal clear
/goal statusbar off

When a goal is active, the extension shows compact visible lifecycle markers like Goal active and Goal continuing; expand them with ctrl+o to inspect the objective and usage. The actual continuation instructions are injected into the next turn's system prompt, so the full prompt does not clutter the transcript.

The same Pi agent keeps running normal turns in the same session context until it calls update_goal({ status: "complete" }), the user pauses/clears it, or the token budget is reached. Reloading Pi pauses an active goal instead of silently resuming it; use /goal resume to continue.

What it adds

  • /goal [--tokens 50k] <objective>: set or replace a goal
  • /goal status: show the current goal
  • /goal pause: stop autonomous continuation without deleting the goal
  • /goal resume: reactivate a paused goal
  • /goal clear: remove the goal
  • /goal statusbar on|off: show or hide the footer status line
  • get_goal tool: read current goal state
  • update_goal tool: model can only mark the goal complete
  • footer status: Pursuing goal, Goal paused, Goal achieved, or Goal unmet

Flow

/goal <objective>
  -> persist goal in the current Pi session
  -> show compact Goal marker and footer status
  -> inject hidden continuation instructions into the next system prompt
  -> trigger an agent turn
  -> account time/tokens on turn_end
  -> queue another continuation on agent_end while active
  -> stop when update_goal marks complete, user pauses/clears, or budget is hit

Completion behavior

The model is instructed to audit completion against real evidence before calling update_goal. The update_goal tool deliberately accepts only status: "complete"; pausing, resuming, clearing, and budget limiting are controlled by the user or extension runtime.

State

Goal state is stored as Pi custom session entries with customType: "pi-goal". It follows the active session branch, survives reloads, and does not require an external database.

License

MIT