Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

queue

What a session holds for later: the messages sent while a turn runs, which go one at a time as turns end, and the context for the next prompt.

The queue commands print the same object: what is held after the command, and what it dropped.

FieldTypeMeaning
sessionstringThe session.
heldlist of objectsThe held messages, in the order they go: interrupts first.
held[].messagestringThe message’s id.
held[].textstringIts text.
held[].interruptbooleanWhether it is an interrupt, which goes ahead of the rest.
held[].attachmentsnumberHow many attachments it has.
contextlist of stringsThe held context entries’ texts, in order.
droppedlist of objectsThe messages the command dropped, each {message, text, reason}, reason queue.
dropped[].messagestringThe message’s id.
dropped[].textstringIts text.
dropped[].reasonstringqueue.

Dropping a held message or context is an event too: message_dropped and context_dropped.

brnr queue list

Shows the held messages and context.

brnr queue list <session> [--json]
{
  "session": "sess-1",
  "held": [
    {
      "message": "m2",
      "text": "later",
      "interrupt": false,
      "attachments": 0
    }
  ],
  "context": [],
  "dropped": []
}

Text output: m2 (after turn): later for each, then the context; nothing held when there is none.

Exit codes: 0; 1 if it fails. Errors: those of a running session.

brnr queue show

Shows one held message in full: its id, whether it interrupts, its text, and its attachments as ACP content blocks.

brnr queue show <session> <message> [--json]

Output (--json):

FieldTypeMeaning
sessionstringThe session.
messagestringThe message’s id.
textstringIts text.
interruptbooleanWhether it is an interrupt.
attachmentsnumberHow many attachments it has.
blockslist of objects, ACP’sIts attachments, as the ACP content blocks that go with the prompt: a file’s resource_link (uri, name), an image’s image (mimeType, data, base64).
{
  "session": "sess-1",
  "message": "m2",
  "text": "later",
  "interrupt": false,
  "attachments": 1,
  "blocks": [
    {
      "type": "resource_link",
      "uri": "file:///home/me/project/src/api.rs",
      "name": "api.rs"
    }
  ]
}

Text output: the message, then file: <uri> or image: <type>, <size> bytes for each attachment.

Exit codes: 0; 1 if it fails: a message not held fails. Errors: those of a running session, message_not_found.

brnr queue drop

Drops one held message, by its id.

brnr queue drop <session> <message> [--json]

Output (--json): the queue object above, with the message in dropped (reason queue).

{
  "session": "sess-1",
  "held": [],
  "context": [],
  "dropped": [
    {
      "message": "m2",
      "text": "later",
      "reason": "queue"
    }
  ]
}

Text output: dropped m2: later, then what is held.

Exit codes: 0; 1 if it fails. Errors: those of a running session, message_not_found.

brnr queue clear

Drops the held messages, the held context, or with neither flag both.

brnr queue clear <session> [--messages] [--context] [--json]
FlagMeaning
--messagesDrop the held messages.
--contextDrop the held context. On an editor’s session, its profile must enable the experimental context.
--jsonPrint the result as JSON.

Output (--json): the queue object above, with the messages dropped in dropped. Context dropped isn’t in it: its context_dropped events say so.

{
  "session": "sess-1",
  "held": [],
  "context": [],
  "dropped": [
    {
      "message": "m2",
      "text": "later",
      "reason": "queue"
    }
  ]
}

Text output: dropped m2: later for each, then what is held.

Exit codes: 0; 1 if it fails. Errors: those of a running session, experimental_disabled.