@matheusbbarni/pi-message-queue
A Pi extension for queueing user messages and sending them one after another.
Package details
Install @matheusbbarni/pi-message-queue from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@matheusbbarni/pi-message-queue- Package
@matheusbbarni/pi-message-queue- Version
0.1.8- Published
- May 12, 2026
- Downloads
- 90/mo · 19/wk
- Author
- matheusbbarni
- License
- MIT
- Types
- extension
- Size
- 25.5 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
@matheusbbarni/pi-message-queue
A Pi extension that keeps a session-local FIFO queue of user messages and sends them to the agent one at a time.
Pi already has native steering/follow-up keys in recent versions. This package adds an explicit, persistent queue with slash commands, a footer status, and an optional queue widget.
Install / run
From this repository:
pi -e ./index.ts
Install from npm:
pi install npm:@matheusbbarni/pi-message-queue
Or install it as a local Pi package:
pi install ./pi-message-queue
Commands
| Command | What it does |
|---|---|
/queue <message> |
Append a message to the queue. |
/queue add <message> |
Append a message to the queue. |
/q <message> |
Short alias for /queue add. |
/queue next <message> |
Put a message at the front of the queue. |
/queue list |
Show pending messages. |
/queue remove <n> |
Remove the 1-based queue position. |
/queue remove #<id> |
Remove by message id. |
/queue edit-last |
Pull the last queued message back into the editor. |
/queue pause |
Stop dispatching new queued messages. |
/queue resume |
Resume dispatching. |
/queue clear |
Clear all pending messages. |
/queue show / /queue hide |
Toggle the below-editor queue widget. |
/queue help |
Show a compact help summary. |
Shortcut:
Ctrl+Shift+Qqueues the current editor text and clears the editor.Shift+Leftpulls the last queued message back into the editor for editing.
Behavior
- Queued messages are shown in a compact below-editor widget similar to Pi's built-in follow-up queue display.
- Ordinary user messages and slash commands submitted while Pi is working are captured into this persistent queue instead of Pi's native steering/follow-up queue.
- Skill invocations such as
/skill:git-commit featand prompt templates are expanded when dispatched. - Typing
/newor/reloadwhile Pi is working also queues those commands instead of showing Pi's built-in wait warning. - Queued messages are sent only when Pi is idle and there are no native Pi pending messages.
- Queued
/newand/reloadentries run Pi's built-in commands instead of being sent to the agent as prompt text. - After a queued message completes, the next queued message is sent automatically.
- Queue state is stored as custom session entries, so it survives
/reload, session resume, and tree navigation on the active branch. - Custom state entries do not participate in LLM context.
Package shape
Pi discovers the extension through package.json:
{
"pi": {
"extensions": ["index.ts"]
}
}
Development
npm install
npm run typecheck