npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@latent-variable/pi-auto-continue

v0.1.0

Published

Pi extension that auto-sends a 'continue' message whenever the agent stops, so local agents can run autonomous overnight research loops (autoresearch-style) without babysitting.

Readme

pi-auto-continue

A pi extension that automatically sends a "continue" message every time the agent finishes a turn, so you don't have to babysit long-running work.

Why

The motivating use case is autonomous overnight research loops, in the spirit of Andrej Karpathy's autoresearch: you give an agent a program.md-style brief, walk away, and let it iterate — edit code, run experiments, evaluate, keep or discard, repeat — until morning.

The problem with doing that on a local coding agent is that the agent politely stops after every turn and waits for you to type "continue." If you're asleep, it sits there doing nothing. Ralph-style shell loops around the CLI work but are fiddly to set up and don't share state with the running session.

pi-auto-continue solves that at the extension layer: pi itself pushes a user message back into the loop as soon as the agent stops, bounded by a safety counter. Set your continue message, flip it on, and leave. The next morning you have a log of iterations instead of an idle prompt.

What it does

Whenever the agent loop ends, this extension calls pi.sendUserMessage(...) to push a user message back into the loop, just as if you had typed it. A hard cap of 100 iterations prevents runaway loops. Typing anything yourself resets the counter. Hitting Escape to abort a turn disables auto-continue — if you want out, you want out.

Install

pi install npm:@latent-variable/pi-auto-continue

Or directly from GitHub:

pi install git:github.com/latent-variable/pi-auto-continue

Or from a local clone:

pi install /path/to/pi-auto-continue

Then /reload inside pi if it's already running.

Usage

Four commands, all discoverable via /auto tab-completion:

| Command | What it does | |---|---| | /auto-continue-on | Enable (uses the current continue text, default "continue") | | /auto-continue-off | Disable | | /auto-continue-set <text> | Set the continue message AND enable | | /auto-continue-max <n> | Set the iteration cap (default: 100) |

When enabled, the footer shows auto-continue N/<max>.

Example

/auto-continue-set keep iterating on train.py until val_bpb improves

Flips auto-continue on with that as the message. Walk away. Come back and /auto-continue-off (or hit Escape mid-turn) to stop.

How it works

  • Subscribes to agent_end. Every time the agent loop ends, it calls pi.sendUserMessage(text), which re-enters the agent loop as if you had typed it.
  • Subscribes to input and resets the counter whenever event.source === "interactive" — so your own typing doesn't count against the iteration cap.
  • Checks ctx.signal?.aborted in agent_end. If the turn was aborted (Escape), it disables itself instead of firing another continue.

Notes / gotchas

  • agent_end fires on normal completion and on errors, so auto-continue will keep trying even after a failed turn. Usually what you want in a research loop, but a persistently broken turn will burn your 100-iteration cap fast.
  • The counter and enabled flag live in memory per pi process. Restarting pi, /new, or /fork clears them — re-enable with /auto-continue-set <your text> after.
  • The iteration cap defaults to 100 and can be changed at runtime with /auto-continue-max <n>. It resets to 100 on restart.