- schedule_followup returns the follow-up id and lists pending follow-ups;
count-then-queue is serialised so the 3-pending bound holds under
concurrent calls.
- cancel_followup {id} removes one of the chat's undelivered follow-ups.
- schedule_followup {run_id, on: finished|attention} queues a durable
follow-up (7-day deadline) that is released with the run's state when the
run ends or waits on a human; run must exist and not already meet the
condition; watches are re-armed from the restored queue after a restart.
- show_html results warn about scripts, remote resources (blocked by the
sandbox) and missing dark-mode support.
- The ambiguous-call error advice fits each tool instead of always
suggesting a different title.
- references/chat.md and the SKILL.md chat paragraph document the above, and
questions are no longer described as Claude-only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
6.5 KiB
Working in a Pipelines chat
A Pipelines chat runs on OpenCode, Claude Code or Codex. The operator reads it in the Pipelines app (desktop, web or phone), often not at this machine's terminal.
Pipelines tools (pipelines MCP server)
Each show_* call adds a persisted item to the transcript and returns one short
line ending with the item's id; a refusal comes back as an error with the
reason. Arguments are checked against the tool's schema: an unknown or
misnamed field is refused with the list of expected fields. Paths must resolve
inside the operator's home (absolute, ~/..., or relative to the chat's
directory).
Every show_* tool takes replace?: the id of an item this chat showed
earlier, of the same kind (file and image count as one). The card is updated
where it is instead of a new one being added; use it for a chart or diff you
regenerate, or a file you rewrote.
| Tool | Arguments | Use for |
|---|---|---|
show_file |
path, title?, replace? |
Any file the operator should see: images inline, other files as a preview card. Use instead of naming a path. A file up to 5 MiB is copied when shown, so the card keeps that version; a larger one stays linked and its card says "changed since shown" or "no longer exists". |
show_image |
url_or_path, title?, alt?, replace? |
A home image/* file, or an https:// URL that Pipelines downloads and keeps (public hosts only, PNG/JPEG/GIF/WebP/AVIF/BMP, at most 10 MiB, no credentials, no redirect to plain http). A failed download is an error and nothing is shown. |
show_html |
html, title?, height_hint? (120-600), replace? |
Self-contained HTML/SVG: diagrams, charts, tables. Sandboxed: no JavaScript, no network; inline CSS/SVG, <details>, :hover. Follows the operator's light/dark theme only when it declares dark support: @media (prefers-color-scheme: dark), color-scheme or light-dark(); anything else is always shown light, on white. The result warns when the document has scripts or loads remote resources (both blocked) or lacks dark support; fix and replace. Refused above 512 KiB. |
show_diff |
path?, base?, head?, paths?, committed_only?, title?, replace? |
A Git diff card when the operator asks to see the changes, or before submitting a pull request. No base: uncommitted work (staged, unstaged, untracked) against HEAD. base (e.g. main): everything since the merge base, which is what a PR contains, plus uncommitted work unless committed_only. head (e.g. pipelines/run-123): that revision instead of the work tree, against base or HEAD. paths: repository-relative files, directories or globs (*.go), at most 50. Pipelines runs Git; do not paste the diff. |
show_run |
run_id, title?, replace? |
A live card for a run: pipeline, title, status, current stage, duration; it updates as the run progresses and opens the run when tapped. |
schedule_followup |
message, and at? or after_minutes?, or run_id? with on? |
Queue a prompt to yourself in this chat: 1 minute to 7 days ahead (at is RFC 3339), or when run run_id reaches on: finished (default; it ended) or attention (it waits on a human decision, or ended), delivered after 7 days at the latest with the run's state appended. A run that already meets on is refused (act on it now). It is a scheduled message from "Agent follow-up" the operator can remove; it does not hold the operator's own messages back, and is delivered when the chat is free. At most 3 pending per chat. The result names the follow-up id and lists the pending ones. Do not wait for it in the current turn. |
cancel_followup |
id |
Remove one of this chat's undelivered follow-ups by the id schedule_followup returned; the result lists those still pending. |
notify |
title, message, priority? |
A notification on every Pipelines app the operator is signed in to (web tabs, desktop, Android) and their phone (ntfy); a tap opens this chat. Opening the chat, or tapping or dismissing it on any device, clears it on all of them. Pipelines already notifies when the reply ends and for questions and approvals, so use it only for news mid-turn or after background work the turn does not wait for; a turn that notified sends no separate "replied" notification. 5 per minute per chat; the result says where it went, and undelivered sends report why. |
show_diff lists at most 300 files; a file patch over 256 KiB or a total over
1 MiB is shown partially and says so; binaries have no patch; renames show as
delete plus add. base and head are plain revision names, and paths stay
inside the repository (no .., absolute paths or pathspec magic). Tools are absent when the
harness could not register them (logged); then name paths instead.
References sent into the chat
The operator can send a run, a pipeline or a run artifact to a chat. It arrives
in the composer draft as text naming the run id, title, pipeline/version and,
for an artifact, stage, visit and a readable URL. Treat it as a pointer: read
pipelines inspect RUN_ID --json (or pipelines show NAME --version N) for the
authoritative record before acting.
Questions and approvals
A question the agent asks appears as a form on every harness: Claude Code's AskUserQuestion, OpenCode's question tool, and Codex's request for user input (and MCP elicitations). The operator may pick an option, answer in their own words, or dismiss it. On Claude Code a dismissal arrives as a denial saying they will reply in the chat; on OpenCode, and for Codex elicitations, it cancels the question. Either way, wait for their message. Question text, descriptions and option descriptions render Markdown.
Chat protocol (via pipelines rpc -)
Only when the user asks to drive another chat. Envelopes carry type and id:
chat_sessions: the operator's chats (id,directory,title,backend).chat_promptwithchat_prompt: {session_id, text, send_at?}: sends a prompt (at most 64 KiB). A busy chat queues it durably, in order, across restarts.send_at(epoch milliseconds, future) holds it until that time; prompts queued after it wait behind it.chat_unqueuewithchat_unqueue: {session_id, operation_id}removes a prompt not yet delivered.chat_interruptwithchat_query: {session_id}stops the current turn;chat_stop_tasks(same body) stops background tasks without interrupting it.
Chat sessions are separate from pipeline run sessions; pipelines chat-adopt SESSION_ID [--harness opencode|claude|codex] brings an existing harness session
into the chat list. Do not keep using an adopted session elsewhere.