An explicit, non-interrupting message queue plugin for OpenCode.
Unlike other queue implementations that forcefully intercept every message or require toggle states, this plugin uses dedicated commands (/queue and /qlist) that are completely invisible to the AI. This means you can line up your next thoughts while the AI is busy without breaking its current task, hallucinating context, or interfering with background daemon plugins (like PTY tools).
- Explicit queueing: Only triggers when you explicitly use
/queue. - Ghost messages: Queued messages are replaced with
ignored: trueplaceholders so the AI never sees them. - Image/Attachment Support: Safely queues images and file attachments along with your text.
- Idle Drain: Automatically pushes your queued messages to the chat the moment the AI finishes its current run.
- Toast Notifications: Clean top-right popups show your queue status.
-
Clone the repository:
git clone https://github.com/cybe42/opencode-plugin-queue.git cd opencode-plugin-queue bun install bun run build -
Add the absolute path to your
~/.config/opencode/opencode.json:{ "plugin": [ "/absolute/path/to/opencode-plugin-queue" ] } -
Configure the Slash Commands: Create or copy the slash command definitions into your OpenCode commands folder:
mkdir -p ~/.config/opencode/command cat << 'TXT' > ~/.config/opencode/command/queue.md --- description: Queue a message to be sent when the AI finishes its current task. --- Use /queue followed by your message. E.g. "/queue read the tests file next". The AI will receive this message automatically once it finishes its current run. TXT cat << 'TXT' > ~/.config/opencode/command/qlist.md --- description: Show the current pending messages in the queue via a popup notification. --- Lists the current contents of the message queue. This is completely silent and the AI will not see this command or be interrupted. TXT
-
Restart your OpenCode session.
/queue <message>: Add a message to the queue (e.g.,/queue please also check the database connection when you're done)./qlist: Displays a popup with a list of everything currently waiting in your queue.