Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-goal

Small Codex-inspired /goal extension for Pi.

This implementation combines:

  • Codex/PurpleMyst-style guarded continuation prompts with XML-escaped untrusted objectives.
  • zereraz-style runtime features: hidden continuations, get_goal, update_goal, elapsed time, optional token budgets, and budget-limit wrap-up prompts.

Commands

  • /goal <objective> starts a new active goal.
  • /goal <objective> --budget 50k starts a goal with an approximate token budget.
  • /goal or /goal status shows the current goal.
  • /goal pause, /goal resume, /goal clear.

Notes

Pi extensions do not expose Codex's internal token accounting or developer-message queue. This extension therefore:

  • Injects a guarded goal summary into before_agent_start.
  • Sends continuation prompts as hidden Pi messages with triggerTurn: true.
  • Tracks elapsed wall-clock time exactly for active turns.
  • Estimates token usage conservatively as a configurable fixed amount per completed active turn.

The objective is always framed as untrusted user data and XML-escaped before being placed in prompt templates.

About

Codex-like goal continuation for pi with guarded prompt injection.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages