$ cat ~/map/pi-shell-jobs.md
pi-shell-jobs
Managed background shell jobs for pi: long commands and interactive terminals keep running across /reload.
extensions✓ Oct 31
Facts
- repository
- github.com/wuchangming/pi-shell-jobs ↗
- GitHub Stars
- ★ 0
- Forks
- 0
- license
- MIT
- npm / mo
- —
- last push
- Oct 31, 2026
install
pi install npm:pi-shell-jobs, then start a new pi session or run /reload; append --local for a project-only install, pin with npm:pi-shell-jobs@0.1.1, or follow development via git:github.com/wuchangming/pi-shell-jobs. Use pi --keep-builtin-bash to retain the built-in tools the extension replaces by default.## TL;DR
A pi extension that runs long commands and interactive terminals as managed background jobs: the conversation continues while exec_command, write_stdin, list_sessions, set_on_exit, and kill_session start, drive, and stop processes that survive /reload within the same pi session.
## Key points
- $Five tools: exec_command starts a job and returns an exit result or a live session_id; write_stdin reads output, sends input, closes pipe stdin, or resizes a terminal; list_sessions, set_on_exit, and kill_session inspect, notify, and stop.
- $on_exit wake resumes pi once on completion; if pi already observed the exit, no second notification is sent, and without opting into wake, completion stays quiet.
- $Cross-platform without tmux, WSL, or an external daemon: Windows, macOS Intel and Apple Silicon, and Linux on Node 22.19+ and pi 1.4+ (before 2.0).
- $Bounds are explicit: a 30-minute default hard deadline, a 24-hour maximum explicit lifetime, 16 MiB of log per job and 256 MiB per session runtime, and a full registry refuses new jobs instead of evicting live ones.
- $The extension replaces the active bash and powershell tools by default; pi --keep-builtin-bash retains them, and other extensions registering exec_command or write_stdin should be disabled before enabling this one.
- $Reload continuity holds within one running pi process — jobs are not restored after a crash or machine restart — and Esc cancels waiting without killing the job.
- $Termination is best effort for process trees; cleanup: unconfirmed is the result field that says so, and the README states plainly that this is not a sandbox.
- $An independent package adapted from pi-unified-exec with attribution in THIRD_PARTY_NOTICES; the pi package catalog lists it at pi.dev/packages/pi-shell-jobs.
## FAQ
Q Do jobs survive a crash or machine restart?
No. Reload continuity holds within one running pi process only; after a crash or restart the jobs are gone.
Q Does Esc kill a running job?
No. Esc cancels waiting; the job keeps running. Explicit stop and normal pi shutdown request cleanup.
Q What happens when the job registry is full?
It refuses new jobs rather than evicting live ones.
Q Is this a sandbox?
No. Termination is best effort for process trees, and a result can carry cleanup: unconfirmed to say the exit was never confirmed.
Q What are the platform requirements?
Windows, macOS Intel or Apple Silicon, and Linux, on Node 22.19+ with pi 1.4 or later (before 2.0); no tmux, WSL, or external daemon.
## References
## Related entries
$ big-pi
Model-driven compression that summarizes completed phases into tiered blocks while Pi's JSONL transcript stays authoritative and untouched.
$ inception
A curator LLM replaces pi's compaction, rewriting old history every few turns to keep the context dense.
$ motus
Redacts exact secret values from pi tool output, blocks the commands and files that print them, and fails closed.
## Guides
Last updated: Oct 31, 2026