pi-copilot-queue
v0.2.0
Published
Pi extension that queues ask_user responses for Copilot-style workflows
Downloads
348
Maintainers
Readme
Copilot Queue (Pi Extension)
Queue user feedback ahead of time and let the model consume it via an ask_user tool.
This extension is inspired by TaskSync-style workflows: you preload responses, then the github-copilot provider can pull them during long runs.
What it does
- Registers tool:
ask_user - Registers command:
/copilot-queue - Keeps a FIFO queue of responses
- Supports autopilot prompt cycling (1→2→3→1…)
- Activates queue/autopilot only on provider
github-copilot - Injects Copilot-only
ask_userloop policy into the system prompt on each new run - While
github-copilotis actively running, normal interactive input is captured into queue by default (instead of triggering a new turn) - Interactive capture can be toggled with
/copilot-queue capture on|off(onby default) - Tracks session elapsed time and tool-call count in status line
- Emits session hygiene warnings at configurable thresholds (default: 120 minutes, 50 tool calls)
- Persists state in session entries
- Shows queue/autopilot/session state in Pi status line
When ask_user is called:
- If queue has items → returns next queued response
- Else if autopilot is enabled and has prompts → returns next autopilot prompt (cycling)
- Else in interactive UI (
github-copilotprovider) → waits for/copilot-queue add <message>or/copilot-queue done(optionally with timeout) - Else → returns fallback response (
continueby default)
When current model provider is not github-copilot, queue/autopilot is bypassed and ask_user uses manual/fallback behavior only.
Install
Option 1: Direct with Pi (npm or git)
Install from npm:
pi install npm:pi-copilot-queueInstall from git:
pi install git:github.com/ayagmar/pi-copilot-queuePinned to a specific release tag:
pi install git:github.com/ayagmar/[email protected]Project-local install (writes to .pi/settings.json):
pi install -l git:github.com/ayagmar/pi-copilot-queueInstall from local path:
pi install /absolute/path/to/pi-copilot-queueThen reload in Pi:
/reloadOption 2: With pi-extmgr (/extensions)
Install extmgr once:
pi install npm:pi-extmgrThen in Pi (GitHub source):
/extensions install git:github.com/ayagmar/pi-copilot-queue
/reloadOr install the extension file directly from GitHub (index.ts/entrypoint path):
/extensions install https://github.com/ayagmar/pi-copilot-queue/blob/master/src/index.ts
/reloadYou can also install a local extension file directly:
/extensions install /absolute/path/to/pi-copilot-queue/src/index.ts
/reloadUsage
Queue messages
/copilot-queue add continue with the refactor
/copilot-queue add now add tests for edge cases
/copilot-queue list
/copilot-queue clear
/copilot-queue doneDone / stop waiting
/copilot-queue doneThis clears the queue, disables autopilot, and releases a waiting ask_user call with done.
Interactive capture while busy (github-copilot only)
/copilot-queue capture on
/copilot-queue capture offon(default): while a run is active, interactive input is queued forask_user.off: keep normal steering behavior (input is not auto-queued).
Wait timeout (for empty queue in UI mode)
/copilot-queue wait-timeout 0
/copilot-queue wait-timeout 600disables timeout (default): wait indefinitely.>0makes waitingask_userreturn fallback after<seconds>.
Session counters and hygiene warnings
/copilot-queue session status
/copilot-queue session reset
/copilot-queue session threshold 120 50- Status line always includes elapsed time + tool-call count.
- Warnings are advisory only (no forced stop).
- Default thresholds are
120minutes and50tool calls.
Fallback message
/copilot-queue fallback continueAutopilot (cycling prompts)
/copilot-queue autopilot add continue with implementation
/copilot-queue autopilot add now write tests
/copilot-queue autopilot on
/copilot-queue autopilot list
/copilot-queue autopilot off
/copilot-queue autopilot clearRecommended instruction snippet for your model
When provider is github-copilot, use the ask_user tool whenever feedback is required. Keep calling ask_user for iterative feedback unless the user explicitly says to stop.Development
pnpm install
pnpm run checkQuick run:
pi -e ./src/index.ts