Registry / productivity / opencode-queue

opencode-queue

JSON →
library0.9.1jsnpmunverified

Queue OpenCode prompts and slash commands until the agent is idle. This plugin adds a real /queue slash command and supports trailing syntax, allowing users to type the next prompt or command while the agent is busy, without interrupting the current run. Version 0.9.1, actively maintained. Key differentiators: operates as a true OpenCode slash command, supports queuing normal prompts, slash commands, and shell blocks, offers priority queuing with 'front', and provides queue management commands (list, stop, start, flush, clear). Only ESM, requires Node >=20.

npm install opencode-queue
INSTALL
IMPORT
SIG · OPENCODE-QUEUE
O
opencode-queue
productivityjavascriptv0.9.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

opencode-queue
import 'opencode-queue'
const opencodeQueue = require('opencode-queue')
ESM-only; must be added as a plugin in OpenCode config, not imported directly.
opencode-queue (plugin)
{ "plugin": ["opencode-queue"] }
{ "plugins": ["opencode-queue"] }
Use 'plugin' not 'plugins' in OpenCode config. The package is a plugin, not a library.

Shows how to add the plugin to OpenCode config and use /queue to queue prompts, slash commands, and shell blocks while agent is busy.

// Add to OpenCode config (e.g., ~/.config/opencode/config.jsonc): { "plugin": ["opencode-queue"] } // Restart OpenCode. Then in any conversation: /queue Write a summary of this code // While agent is busy, queue next command: /queue /review /queue !ls /queue front !pwd // Manage queue: /queue list /queue clear
Debug
Known issues
gotchaQueue is in-memory and scoped to the current session. It will be lost on session restart.
fix
Re-queue items after session restart.
affects: >=0.0.0
gotchaOnly one queued entry is sent per idle transition. Long-running tasks may cause delays.
fix
Use '/queue flush' to send all immediately if needed.
affects: >=0.0.0
breakingRequires Node.js >=20. Older Node versions will fail to install.
fix
Upgrade Node to version 20 or higher.
affects: >=0.0.0
gotchaThe config key must be 'plugin' (singular), not 'plugins'. Using 'plugins' will cause the plugin not to load.
fix
Use exactly {"plugin": ["opencode-queue"]} in config.
affects: >=0.0.0
gotchaQueued entries are hidden from the transcript while the session is busy. They will appear after being sent.
fix
Check the queue with '/queue list' or wait until idle.
affects: >=0.0.0
Errors
Common errors & fixes
Plugin not working, '/queue' not recognized as a slash command
Plugin not correctly configured or OpenCode not restarted after install.
fix
Ensure plugin is added to config as {"plugin": ["opencode-queue"]} and restart OpenCode.
node:internal/modules/cjs/loader: ... require() of ES Module ... not supported
Trying to require the package in a CommonJS context.
fix
Use import syntax or ensure your project is ESM. The package is ESM-only.
Command not found: /queue
Plugin not installed or OpenCode not restarted.
fix
Add the plugin to config and restart OpenCode.
Upgrade
Version history
0.9.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
41 hits · last 30 days
node
36
OpenAI (training)
1
Resources
opencode-queue — npm install opencode-queue · libregistry