All pages

Docs · Right-sidebar surfaces

Queue

Availability: macOS.

The Queue tab (right sidebar) is a FIFO of shell commands that drain one at a time into the focused split. Use it for:

  • Chaining commands you want to run sequentially without staring at the terminal
  • Letting the agent drop work for you to review and fire off
  • Pasting a recipe (build, test, deploy) and letting it run hands-off
  • Carrying images or files into the next command via attachments

A queue entry runs when the one before it finishes. To run something at a time instead — every weekday at 09:00, or once at 14:00 — see Scheduled runs; a terminal schedule appends to this same queue, so it drains through the same path with the same rules.

A separate agent prompt queue holds follow-up prompts you type while an agent turn is streaming — it drains when the turn finishes, not on terminal idle. See Agent → Prompt queue.

How it works

Each entry is bound to the split that was focused when you queued it. Type, paste, or drop into the input; hit Enter to enqueue.

The queue drains on each commandFinished signal — OSC 133 D, emitted by shell integration when the prompt returns. The next entry fires automatically; Run next now kicks the head manually, Clear drops everything shown. Rows can be edited in place and drag-reordered.

The scope picker in the header widens the list from the current Tab to the Project or All Windows; each row carries a pane chip you can use to reassign the command to a different split.

Composer toggles

All three persist across launches:

  • Press Return (on by default) — off types the text into the pane without submitting, useful for pre-filling a TUI prompt.
  • Stop on error (off by default) — if the previous command exits non-zero, the entry and everything behind it are dropped, with a banner showing the exit code and how many commands were skipped.
  • Auto-run (off by default) — an enqueued entry fires immediately if the focused pane is idle at a shell prompt; subsequent entries continue to drain via the OSC 133 D marker.

While anything is queued, TRMNLY keeps the Mac awake (Awake setting, on by default) so long chains can drain unattended.

Attachments

Each entry can carry file attachments:

  • Paste an image from the clipboard with ⌘V into the input — it saves under the project's .trmnly/attachments/ folder (bitmap pastes are normalized to PNG) and shows as a chip below the text
  • Drop files onto the panel, or pick them with the paperclip button — these reference the source path rather than copying

The mode picker controls how attachments render into the sent text: @path (default) appends @/abs/path tokens, which Claude Code and similar agent TUIs parse as file attachments; drop appends shell-escaped paths, exactly like dragging files from Finder onto the pane. An entry with attachments and no text is valid.

Saved prompts and the queue

Every row in the Prompts tab has both a queue button (drops the body into this queue, honoring auto-run) and a play button (pastes and presses Return immediately, regardless of pane state). Prompts with custom variables open a run sheet where you pick the destination. See Prompts.

Detached hooks (Claude Code Stop hook)

Claude Code's Stop hook runs in a setsid'd subprocess with no controlling TTY, so /dev/tty writes fail. TRMNLY exports $GHOSTTY_PANE_TTY into each pane's environment so the hook can write OSC 133 sequences directly to the pane's PTY — including the commandFinished marker that drains the queue. Fallback: walk ps -o ppid= to find the first ancestor with a real ttys* / pts* device. The Queue tab's help section has a copyable hook snippet for ~/.claude/settings.json.

TRMNLY installs a second hook in the same file for a different job: SessionStart, which records which conversation a pane is holding so a restored window can resume it. See Claude Code sessions. The two are independent — installing either leaves the other alone.

Agent tools

Tool Approval Use
queue_command yes Append a command to a pane's queue (optionally run now)
queue_list no List a pane's queued commands, head first; format: "json" adds ids
queue_run_next yes Pop and send the head without waiting for command-finished
queue_clear yes Drop every queued command on a pane
queue_remove yes Drop one queued command by the id queue_list returns
queue_move yes Move one queued command to another 1-based position, by id
prompt_queue_add no Append a follow-up prompt to the agent prompt queue
prompt_queue_list no Snapshot queued prompts (id, author, truncated text)
prompt_queue_remove no Remove one queued prompt by id prefix, or all: true to clear
schedule_create yes Run a prompt or a command later — on a cron, an interval, or once
schedule_list no Every schedule, with its next run and last outcome
schedule_update yes Change one in place, or pause it
schedule_delete yes Remove a schedule
schedule_run_now yes Fire one immediately, ignoring its policy gates

The agent's prompt queue is reviewed and edited in the agent sidebar, not the Queue tab.