@badliveware/pi-compaction-continue
Watchdog nudge extension for Pi after idle compactions or stalled Ralph turns.
Package details
Install @badliveware/pi-compaction-continue from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@badliveware/pi-compaction-continue- Package
@badliveware/pi-compaction-continue- Version
0.1.3- Published
- May 2, 2026
- Downloads
- 370/mo · 370/wk
- Author
- doz3r
- License
- MIT
- Types
- extension
- Size
- 26.9 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-compaction-continue
Auto-sends a watchdog nudge when Pi stops while there may still be obvious work to resume.
Use it for long sessions, especially active iterative loops, where a compaction or stalled Ralph turn can leave Pi idle even though the next useful action may be to continue.
Install
pi install npm:@badliveware/pi-compaction-continue
No external services, credentials, or extra CLIs are required.
How it works
The extension watches two low-risk recovery cases and sends an automated watchdog nudge only when Pi is idle. The nudge tells the agent that it is not a new user request, to check whether work actually remains, and to stop instead of continuing when the task is already complete.
Recovery cases:
- Idle compaction: after a compaction, Pi is idle, no messages are queued, and either the compaction followed a context overflow or the current session branch contains an unresolved/resumable Ralph prompt. A stale active
.ralph/*.state.jsonfile alone is not enough. - Stalled Ralph turn: after a Ralph loop prompt, the assistant ends while saying it will continue or proceed, but has not called
ralph_doneor completed the loop.
It snapshots/analyzes the branch before compaction and suppresses nudges when Ralph already advanced with ralph_done. It does nothing while tools are running or messages are already queued, because that means there is no idle gap to recover. Ralph stall recovery is capped to one automatic nudge per Ralph prompt to avoid noisy loops. The footer status shows watchdog:on or watchdog:off.
The prompt includes the Ralph completion marker instruction, so a finished Ralph loop can answer <promise>COMPLETE</promise> rather than inventing extra work.
Commands
| Command | What it does |
|---|---|
/compaction-continue |
Show status, active loop detection, and whether Ralph idle watch is armed. |
/compaction-continue on |
Enable auto-continue. |
/compaction-continue off |
Disable auto-continue. |
/ralph-compact-watchdog |
Compatibility alias for older local setups. |