Documentation

cockpit pinned-answers

Generated reference for cockpit pinned-answers, including its syntax, options, results, and constraints from the canonical cockpit CLI source.

Applies to
CLI
WindowsmacOSLinux

Verified 2026-08-27 · v4.61.0

Markdown

Some screens and steps may differ in the latest version.

This reference is generated from the same canonical source distributed as cockpit CLI help. See Cockpit CLI for concepts and safe operating guidance.

Pin an agent answer inside a task so it can be found again from a long conversation. Pins work for every agent that runs in the chat view: Cockpit agent tasks and visual-mode tasks (Codex, Claude, Antigravity, Cursor, Qoder, Grok, Muse Code). They are kept per task, survive reopening the task and restarting the app, and are shown on Desktop (the pin control on each answer and the pinned-answers list above the conversation) and in the PWA (marked answers and the pinned-answers bar). Every command returns JSON and is local-only.

cockpit pinned-answers list <task-id> [--all]
cockpit pinned-answers pin <task-id> <message-id>
cockpit pinned-answers unpin <task-id> <message-id>

<task-id> is the task shown by cockpit task list; <message-id> is the id of an assistant turn. cockpit task get <task-id> returns each conversation turn with its id, and list --all returns every assistant answer of the task with its messageId, a short text preview, and whether it is pinned. Only assistant answers can be pinned; user messages and tool calls are not pinnable. A Cockpit agent answer keeps the id of its session message. A visual-mode answer is one agent turn and has the id visual:<task-id>:assistant:<turn-id>, where <turn-id> is the turn id carried by the stored events of that turn; everything the agent wrote in the turn, including output that continued after an approval, is one answer. The id is derived from the task's stored event history, so it is the same id on Desktop, in the PWA, and here, and it stays the same after reopening the task, restarting the app, replaying events, or loading older history. A task without a chat conversation (terminal mode) has no pinnable answers, so pin answers message_not_found for it.

list returns the pinned answers in pin order. Each entry carries available: true with createdAt and a text preview when the answer is still part of the conversation, or available: false when the message no longer exists (for example after the history was reset, cleared, or compacted). Such a pin is never re-created and is not offered as a jump target; unpin removes it. For a visual-mode task, list, pin and unpin look up only the requested ids and read the stored history back exactly far enough to reach them, so an answer that the Desktop has not loaded yet is still available; the Desktop lists such a pin as an earlier answer and loads the older history when you jump to it. The lookup stops after 48,000 archived events; a pin that lies beyond that ceiling is reported as available: false, notLoaded: true rather than lost, pin accepts such an id, and cockpit task get leaves it out of its transcript. An answer is reported lost only after the whole stored history was read without finding its turn. list --all enumerates the same 48,000-event range and resolves any pin beyond it separately.

cockpit pinned-answers list task_abc123
{"ok":true,"data":{"taskId":"task_abc123","pinned":[{"messageId":"msg_42","available":true,"createdAt":1789000000000,"text":"The root cause is ..."}]}}

pin requires the message to exist as an assistant answer of the task and answers message_not_found otherwise. unpin succeeds even when the message is gone, so it is the way to clean up a stale pin. Both commands return the updated list data, and the change is pushed to open Desktop windows and connected PWA clients immediately. Pins are removed together with their task.

cockpit pinned-answers list task_abc123 --all
cockpit pinned-answers pin task_abc123 msg_42
cockpit pinned-answers unpin task_abc123 msg_42