Skip to content

mirsella/opencode-queue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-queue

npm version CI npm downloads

Queue OpenCode input until the current session is idle.

opencode-queue adds a real /queue slash command. It lets you type the next prompt, slash command, or shell command while an agent is still working, without interrupting the current run.

Install

Add the plugin to your OpenCode config:

{
  "plugin": ["opencode-queue"]
}

Restart OpenCode after installing. OpenCode installs npm plugins automatically at startup.

Quick Examples

/queue continue after this task
continue after this task /queue

/queue /review
/review /queue

/queue !ls

/queue list
/queue flush
/queue clear
/queue clear 1
/queue clear 2 3

Syntax

Input What it does
/queue message Queue a normal prompt.
message /queue Queue a normal prompt using trailing syntax.
/queue /review Queue a slash command.
/review /queue Queue a slash command using trailing syntax.
/queue !ls Queue an OpenCode shell block.
/queue Show the current queue.
/queue list Show the current queue.
/queue flush Send all queued entries immediately.
/queue clear Clear the current queue.
/queue clear 1 Clear item 1 from the current queue.
/queue clear 2 3 Clear items 2 and 3 from the current queue.

Behavior

When the session is busy:

  • Queued entries are hidden from the transcript and from the running agent.
  • The current agent run keeps using its original agent, model, and thinking variant.
  • Queued entries replay in order after the session becomes idle.
  • Only one queued entry is sent per idle transition, so queued work runs one item at a time.
  • /queue flush sends all queued entries immediately, even before the session is idle.

When the session is idle:

  • /queue message sends message immediately.
  • message /queue sends message immediately.
  • /queue /review runs /review immediately.
  • /review /queue runs /review immediately.
  • /queue !ls runs ls immediately as an OpenCode shell block.
  • /queue and /queue list show the current queue.
  • /queue flush sends all queued entries immediately.
  • /queue clear clears the current queue, and /queue clear 1 clears a specific queued item.

Queue Management

/queue
/queue list
/queue flush
/queue clear
/queue clear 1
/queue clear 2 3

The queue is in-memory and scoped to the current session.

Notes

  • This plugin registers /queue as a real OpenCode slash command.
  • It does not add a keyboard shortcut. OpenCode plugins cannot currently register custom TUI keybindings.
  • Queued placeholders are hidden instead of deleted, then filtered out before messages are sent to the model.
  • If plan mode asks to switch to the build agent while more queued work is waiting, the plugin answers No so the queue can continue.

About

Queue OpenCode input until the current session is idle

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors