@brettinternet/pi-loop

Run a prompt repeatedly in fresh Pi sessions

Packages

Package details

extension

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

$ pi install npm:@brettinternet/pi-loop
Package
@brettinternet/pi-loop
Version
0.1.3
Published
Sep 18, 2026
Downloads
449/mo · 302/wk
Author
brettinternet
License
MIT
Types
extension
Size
61.2 KB
Dependencies
0 dependencies · 1 peer
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-loop

Run a prompt repeatedly, with a fresh session for every iteration.

pi install npm:@brettinternet/pi-loop
/loop <count> [--delay <duration>] <prompt>
/loop for <duration> --delay <duration> <prompt>
/loop <count>
/loop +<count>
/loop -<count>
/loop time <duration>
/loop delay <duration>
/loop prompt <text>
/loop append <text>
/loop status
/loop
/loop pause
/loop end
/loop resume
/loop next

Durations use ms, s, m, h, or d. Delays range from 1 second to 24 hours. Timed loops run for at most 30 days. During a loop, /loop time <duration> switches to a deadline from now or resets the current deadline; timed mode requires a non-zero delay. /loop <count> switches back to a count of future iterations.

Errors retry after 30 seconds, 1 minute, and 2 minutes, then pause. Aborting pauses the loop. /loop pause pauses after the active iteration settles; if the loop is between iterations, it pauses immediately. Resuming then starts the next iteration. An agent loop_pause request pauses mid-iteration for human blockers, and resuming continues that iteration. Recovery preserves the loop so you can resume or advance it.

Chain commands in the prompt:

/loop 10 /wait 10m /skill:myskill skill argument here

Built-in interactive commands cannot be chained.