@cjvnjde/pi-fresh-loop
Run one prompt repeatedly in fresh Pi sessions until its stop condition is met.
Package details
Install @cjvnjde/pi-fresh-loop from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@cjvnjde/pi-fresh-loop- Package
@cjvnjde/pi-fresh-loop- Version
0.1.3- Published
- Jul 20, 2026
- Downloads
- 250/mo · 250/wk
- Author
- cjvnjde
- License
- MIT
- Types
- extension
- Size
- 15.2 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-fresh-loop
Minimal fresh-context loop extension for Pi.
Install
pi install npm:@cjvnjde/pi-fresh-loop
Package: pi.dev/packages/@cjvnjde/pi-fresh-loop · npm
Usage
Run one prompt repeatedly:
/loop Read TODO.md. Complete one unfinished task and mark it done. When no unfinished tasks remain, stop the loop.
Each iteration:
- Creates a new empty Pi session.
- Re-selects the model active when
/loopstarted. - Sends exact original prompt.
- Waits for agent to finish.
- Starts next iteration immediately.
Previous conversation and tool output never enter next iteration. Project files remain shared, letting iterations coordinate through task files, checklists, Git state, or other durable state.
Include stopping condition in prompt. Agent can stop loop when condition becomes true.
Stop manually
/loop stop
Stop request takes effect after current iteration finishes. No next iteration starts.
Notes
- One loop can run at a time.
- Model is pinned at loop start, so model changes from other Pi instances do not affect later iterations.
- Starting loop while agent is busy is rejected.
- Esc/abort, provider errors, reload, resume, or manual session switching stop loop.
- Iteration sessions remain available in Pi session history.