@ogulcancelik/pi-goal

Codex-style long-running goal mode for pi with automatic linked-session handoff.

Packages

Package details

extension

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

$ pi install npm:@ogulcancelik/pi-goal
Package
@ogulcancelik/pi-goal
Version
0.1.2
Published
May 7, 2026
Downloads
214/mo · 10/wk
Author
ogulcancelik
License
MIT
Types
extension
Size
31.1 KB
Dependencies
0 dependencies · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

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

README

pi-goal

Codex-style long-running goal mode for pi. Start one explicit objective, let the main agent keep working across turns, and automatically hand off to a linked new session when context reaches the budget limit.

Install

pi install npm:@ogulcancelik/pi-goal

Or add manually to ~/.pi/agent/settings.json:

{
  "packages": ["npm:@ogulcancelik/pi-goal"]
}

Usage

/goal implement the migration and verify tests

/goal <objective> starts an active goal and queues hidden continuation messages after each completed agent cycle until the model calls update_goal({ status: "complete" }).

Controls:

/goal          show current goal summary
/goal pause    pause automatic continuation
/goal resume   resume and recapture handoff control
/goal handoff  ask the agent to prepare a handoff now
/goal clear    clear the current goal

Behavior

pi-goal keeps state append-only in the current session with pi-goal:state custom entries. It does not write .pi/goals, spawn worker agents, mutate the system prompt, patch provider payloads, or rewrite prior history.

At 95% context usage, pi-goal marks the goal budget-limited and asks the model to call goal_handoff({ prompt }). The extension then starts a linked new session with parentSession metadata and sends the self-contained handoff prompt as the first user message.

Tools

Tool Purpose
get_goal Inspect current goal state, context usage, and lineage
create_goal Compatibility path for model-created goals; /goal <objective> is preferred
update_goal Complete the goal; only accepts status: "complete"
goal_handoff Capture a self-contained prompt and continue in a linked new session

License

MIT