Documentation

cockpit ask

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

Applies to
CLI
WindowsmacOSLinux
FreeAGI Lab member

Verified 2026-12-01 · v5.2.2

Markdown

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

list, get, answer, close, and pair support --host <host|alias>, --port, and --https, and preserve device: { host, ip, name } in remote responses, including authentication failures while looking up an Ask to answer. Ask creation, update, and relay commands remain local-only and return host_not_supported with --host, naming the unsupported operation as ask create, ask update, or ask relay.

Remote Ask list, get, and close authenticate like remote task commands: a verified Tailscale peer with the same owner, or a loopback connection, needs no token; any other connection needs a paired bearer token in AGI_COCKPIT_TASK_REMOTE_TOKEN or AGI_COCKPIT_SYNC_TOKEN. Remote answer always requires a valid pairing token, including on loopback and same-owner Tailscale peers; otherwise it returns ask_answer_authentication_required after transport authentication. The target's Tailscale-only restriction still applies. Answer validation still applies. Remote answers use the paired owner identity rather than the local task context. Answer attachment paths refer to files on the target host.

cockpit ask list --host build-host
cockpit ask get <askId> --host build-host
cockpit ask answer <askId> --choice "Continue" --host build-host
cockpit ask close <askId> --host build-host

Pair a CLI with cockpit ask pair --host <host|alias> --sign-in, from another device or from the target PC itself. Both launchers open the normal browser and wait up to ten minutes. The browser first shows the target PC's confirmation page with its name and address; continue only if you started the command yourself. Then sign in with the same AGI Lab account used on the target PC. The PC verifies the one-use authorization code using its own PKCE verifier and a short-lived HttpOnly, SameSite=Lax browser cookie. The CLI obtains the result with a separate random secret in a POST body; pairing tokens never appear in a URL. No existing bearer token or task identity is required to start.

export AGI_COCKPIT_TASK_REMOTE_TOKEN="$(cockpit ask pair --host build-host --sign-in | node -e 'const chunks=[];process.stdin.on("data",c=>chunks.push(c));process.stdin.on("end",()=>{const result=JSON.parse(chunks.join(""));if(!result.ok)process.exit(1);process.stdout.write(result.data.token)})')"
cockpit ask answer <askId> --choice "Continue" --host build-host

In PowerShell, parse the sign-in command's JSON with ConvertFrom-Json and set $env:AGI_COCKPIT_TASK_REMOTE_TOKEN to data.token. Treat that token as an owner credential and keep it private. Use HTTPS on remote networks. New sign-in starts share a per-address limit between PWA and CLI, and the target PC's own addresses (loopback, its LAN interfaces and its Tailscale IP) count as one address: three starts are allowed before a 30-second wait. A target that allows Tailscale only refuses starts from outside Tailscale with tailscale_required. Backend limits also return rate_limited and Retry-After. A credential-store failure returns pairing_store_unavailable without granting access.

Pairing from the target PC itself uses the same confirmation page and AGI Lab sign-in with the same account; its own addresses grant nothing by themselves. Its local Ask and control tokens cannot replace owner sign-in, but a process that can operate a browser signed in to that AGI Lab account can complete the sign-in and obtain an owner credential. A task should answer through its issuing Cockpit with its task secret; giving a task an owner pairing credential grants owner authority.

Existing code-issued PWA and CLI tokens remain valid. All paired credentials survive ordinary restarts and Remote Access off/on. Sign-in-issued credentials are revoked when the PC signs out or its sign-in expires or is revoked. The target stores only SHA-256 token hashes and connection metadata in pairing-credentials.json; PWA tokens stay in that browser's local storage, and CLI tokens stay where the owner keeps them. Review connections in desktop Remote Access settings or with cockpit remote-access paired list; revoke one with cockpit remote-access paired revoke <id>. Revocation immediately disconnects that browser.

Usage: cockpit ask --summary <text> [--choice <text> [--choice-description <text>] [--choice-media <name>|--choice-html <name>]]... [--multiple] [--priority low|medium|high|xhigh] [--expires-at <time>|--expires-in <period>] [--mission <id>] [--title <title>] [--directory <path>] [--media <path> [--media-ref <name>]]... [--html <html>|--html-file <path>|--html-stdin [--html-ref <name>]]...

--directory <path> overrides the Ask's folder and is used exactly as given: leading and trailing spaces, including full-width spaces, stay part of the folder name. A blank path falls back to the calling task's folder, which is also kept exactly.

Rewrite an Ask you asked before it is answered: cockpit ask update <askId> --summary <text> ... with the same question, choice, media, and HTML options as creating one, and change or clear its deadline (see "Updating an open Ask" below).

Operate open Asks: cockpit ask list [--task <taskId>] / cockpit ask get <askId> / cockpit ask answer <askId> ... / cockpit ask close <askId> | --all | --task <taskId> (see "Operating asks" below).

Inspect and exercise the Discord and Slack relays: cockpit ask relay status [discord|slack] [--verbose] / cockpit ask relay test [discord|slack] (see "Relaying asks to Discord and Slack" below).

Schedule a persistent question for the user. The command returns immediately with an Ask ID; Cockpit keeps the question until the user answers or closes it. Answering resumes the same task automatically. The desktop close button (including its tooltip) and the PWA action are labeled Close Ask (Ask を閉じる in Japanese); the PWA asks for confirmation first. Closing removes the Ask without sending a message or resuming the waiting task. Free-form input is enabled by default for every question.

An Ask also leaves a card in the asking task's chat on Desktop and PWA (in the Crew's conversation for a Crew and its child tasks). While the Ask waits, Desktop shows it there to answer and the PWA opens it from the card; afterwards the card keeps its title with the answer, or says it was closed or closed at its deadline. A task shown as a terminal gets no card.

Answering saves the response before delivery. If queue registration fails, the saved answer remains in the open Ask list until registration succeeds; re-presentation and restart retry registration of that original answer. If the task is running, the answer joins the same persistent message Queue as ordinary queued messages. Desktop and Remote Access show the same registration order, question/answer details, attachments, and delivery state. Closing a client or restarting Cockpit does not discard registered answers. Queue entries send one turn at a time; accepting a send is not turn completion. An idle task with an empty Queue receives the answer immediately through this same path.

An Ask answer in the Queue is already answered, so it no longer appears in the open Ask list. Its structured cockpit.ask.resolved event, responder provenance, per-question answers, whole answer, and attachments remain intact. Ask Queue entries can be inspected and a known failed delivery can be retried. An answer that has not started sending (queued, or failed before submission) can be taken back. On Desktop and Remote Access, Edit removes it from the Queue and reopens the Ask with the previous choices, free text, and attachments filled in, and opens the Ask panel; Delete asks for confirmation, removes it, and reopens the Ask with nothing filled in. Either way the task never receives the withdrawn cockpit.ask.resolved event. The reopened Ask is an ordinary open Ask: answering it again queues the new answer, or sends it at once if the task is idle, and closing its window without answering leaves it open. Its responder and its entry in cockpit ask status follow the answer that is finally sent. cockpit task queue <id> remove <item-id> takes an answer back the same way as Delete; edit on an Ask answer is refused with code: "ask_answer_not_editable" and the command to use instead. An Ask that was relayed to Discord or Slack, or sent to a Crew's owners by DM, is posted again as a new message once the earlier message has finished updating; the earlier message keeps showing the withdrawn answer, and its buttons and forms no longer answer the Ask. An answer started before the Ask was answered and reopened, such as one still uploading its attachments, is refused instead of answering the reopened Ask. Only one Edit or Delete of an answer runs at a time; another one started meanwhile is refused, and so is one whose answer was replaced by a newer answer after it started. Answers that took effect when given (device-connection approvals) cannot be taken back, and an answer that is sending, sent, or unconfirmed cannot be changed. On Desktop and Remote Access, an unsent queued Ask answer, including one whose delivery failed before submission, has the same explicit Send now action as ordinary messages. It interrupts through the current agent’s interrupt contract and sends only the selected answer, preserving its structured event, attachments, and provenance. Remaining items keep their relative order and wait until the replacement turn finishes or Stop confirms its cancellation. The action is available on surfaces with interrupt support. Pending approvals, tool questions, or unavailable sessions show a reason without sending and leave the answer queued for automatic delivery. Automatic delivery and concurrent clients share a durable server-side claim; sending, delivered, and unconfirmed answers cannot be interrupted again. A confirmed failure before submission keeps the answer and cause for retry; an interrupted connection or restart during delivery is unconfirmed until checked. Ordinary queued messages retain their edit, remove, and explicit Send now actions. Unconfirmed delivery stays visible and blocks automatic resend to prevent duplicates. After checking the conversation, use Mark as handled without resending for a failed or unconfirmed item to unblock the next item without sending that answer again. Accepted items remain delivered across restart; retiring their runtime releases the queue without resending them. Native permission and tool-question responses, and Asks with delivery: none, keep their own response contracts. Completing or deleting a task cancels its remaining Queue without marking those answers delivered.

After a successful cockpit ask, end the current agent turn. Do not poll, call wait, or continue work that depends on the answer.

A task can keep up to 10 open Asks at once, so separate matters can stay in separate Asks instead of closing one and asking again. Each one is answered or closed on its own: answering one delivers its own cockpit.ask.resolved event through the task's Queue, one turn at a time in the order the answers arrive, and closing one leaves the others open. An eleventh Ask fails (exit 1) with code: "ask_limit_reached", limit, and pendingAskIds listing the open Asks; wait for an answer or close one that no longer matters with cockpit ask close <askId>. Completing or deleting the task cancels all of its open Asks.

cockpit ask --summary "Choose the deployment target" --choice "staging" --choice "production"
cockpit ask --summary "Select checks to run" --choice "lint" --choice "tests" --choice "build" --multiple
cockpit ask --summary "Choose checks" --choice "lint" --choice-description "Fast syntax and style checks" --choice "build" --choice-description "Production build verification" --multiple
cockpit ask --summary "Enter the branch name"
cockpit ask --summary "Release checklist" --question "Deployment target" --question-choice "staging" --question-choice "production" --question "Run migrations?" --question-choice "yes" --question-choice "no"
cockpit ask --summary "Release checklist" --question "Deployment target" --question-choice "staging" --question-choice "production" --question "Checks to run" --question-choice "lint" --question-choice "tests" --question-choice "build" --question-multiple
cockpit ask --summary "Does this design look correct?" --choice "yes" --choice "no" --media screenshot.png
cockpit ask --summary "Which design should ship?" --html-file comparison.html --choice "A" --choice "B"
cat comparison.html | cockpit ask --summary-file question.md --html-stdin --choice "A" --choice "B"
cockpit ask --summary-file question.md --media a.png --media-ref a --media b.png --media-ref b --choice "A" --choice-media a --choice "B" --choice-media b   # image cards
cat summary.md | cockpit ask --stdin --choice "yes" --choice "no"   # Long summary, no shell quoting
cockpit ask --summary-file summary.md --questions-file questions.json
cat questions.json | cockpit ask --summary-file summary.md --questions-stdin

Long summaries and shell quoting:

A summary that spans several lines or contains backticks, quotes, $, or a code fence must not be embedded in --summary "...". The shell runs backticked spans as command substitution and rewrites $... before cockpit receives the argument, so the question arrives damaged, and an unbalanced quote aborts the command so no Ask is created at all. Pass it with --stdin or --summary-file <path> instead; both deliver the text as it is, except that NUL characters are dropped and one byte order mark (U+FEFF) at the start of a file or of standard input is not part of the text (see cockpit help transport). --questions-stdin, --questions-file, --html-stdin, and --html-file read their input the same way. --summary cannot take a value that starts with -- (--summary requires a value); pass such a summary with --stdin or --summary-file.

There is only one standard input, so --stdin fills the summary, --questions-stdin fills the --questions JSON array, and --html-stdin fills the HTML explanation — use at most one of them per command. To keep both long parts free of the shell, combine --summary-file with --questions-stdin (or use --questions-file). Inside the JSON array, quoting is JSON's problem rather than the shell's, so question summaries, choices, and choice descriptions can contain anything.

Options:

  • Pass choices with repeated --choice (or --question-choice) flags so each choice is a separate argument.
  • Add --choice-description immediately after a --choice, or --question-choice-description immediately after a --question-choice, to show explanatory text under that choice.
  • Bundle related decisions into one dialog with repeated --question "..." --question-choice "..." groups instead of asking one by one. Use --question-multiple after a --question for a per-question multi-select.
  • --multiple makes the top-level single question multi-select.
  • --questions '[...]' also accepts a JSON array where each item can include choices, choiceDescriptions: Record<string,string>, and multiple: true. --questions-file <path> and --questions-stdin read the same array without going through the shell.
  • Each entry in choices is either a label string or {"label": "...", "description": "..."} (description optional), the same shape as Claude Code AskUserQuestion options; the two can be mixed. A description is shown under its choice like a choiceDescriptions entry. Blank label strings are skipped. A choice object can also carry "media": "<name>" or "html": "<name>" (one of the two) to show a named item beside the choice, like --choice-media and --choice-html.
  • Any other choices content stops the command with exit 1 and creates no Ask; the error names the question and choice by their 1-based positions in the array: question_choices_invalid when choices is neither an array nor null (null or a missing choices means no choices), question_choice_invalid for a number, null, a nested array, an object without a non-empty string label, a non-string description, both media and html, or an empty or non-string media/html, question_choice_description_conflict when a choice's description differs from its choiceDescriptions entry or from another choice with the same label, and question_choice_asset_conflict when two choices with the same label name different items. The same description given in both places is accepted.
  • --summary, --summary-file, and --stdin are mutually exclusive, as are --questions, --questions-file, and --questions-stdin; passing two sources for the same value fails instead of silently picking one. --stdin with nothing piped in fails immediately rather than waiting for input.
  • --media <path> attaches files and can be repeated. Supported: png, jpg, jpeg, gif, webp, mp3, wav, ogg, aac, m4a, flac, mp4, webm, mov. Add --media-ref <name> right after a --media to give it a name so the text or a choice can place it (see "Placing media and HTML" below).
  • Up to 8 media files can be attached, named and unnamed together. Each file can be up to 512 MB, with a 1 GB total per Ask. Files are uploaded as streams and loaded only when the Ask is viewed.
  • If node fails while the CLI prepares the media, the command answers encoding_failed (exit 1) and no Ask is created.
  • Media files are sent over the same transport as the rest of the command, including file IPC when loopback HTTP is unavailable, so the bytes arrive unchanged either way.
  • If media cannot be attached, no Ask is created (exit 1), and the error names the stage and the reason. Files are identified by their position among the --media options, never by path. The code tells the stage:
    • Reading a local file, before anything is sent: ask_media_not_found, ask_media_unsupported, ask_media_empty, or ask_media_unreadable.
    • Losing the connection to Cockpit: ask_media_draft_unreachable while creating the draft, or ask_media_upload_unreachable while sending a file.
    • Checking the descriptors or creating the draft: ask_media_descriptor_invalid, ask_media_count_invalid, ask_media_type_unsupported, ask_media_size_invalid, ask_media_total_too_large, or ask_media_draft_failed.
    • Writing a sent file: ask_media_length_required, ask_media_size_mismatch (the bytes that arrived differ from the file size), ask_media_upload_unknown (the draft expired or the file was already written), or ask_media_write_failed.
  • --stdin, --summary-file, and --summary carry the summary text only. Choices never travel through them: give choices with --choice, or put a question array in --questions-stdin / --questions-file.
  • Recovery fallback, not an input format: if a JSON blob does arrive as the summary, two shapes are recovered into a structured Ask instead of being shown raw — the Cockpit Ask shape {"summary": "...", "choices": ["a", {"label": "b", "description": "..."}], "multiple": false, "title": "..."} (multiple and title optional) and Claude Code AskUserQuestion JSON ({"questions":[{question, header, multiSelect, options[{label, description}]}]} or the bare questions array), either optionally wrapped in a fenced code block. Do not rely on this; pass choices with --choice or --questions-stdin. Any other JSON, including one of these shapes with a wrong field type, is shown verbatim.
  • Legacy --choices "a,b,c" and --question-choices "a,b,c" are comma-separated only; do not use | as a separator.

Markdown text:

The summary, each question's summary, and choice descriptions are shown as Markdown on the desktop Ask window, the side panel Ask tab, and Remote Access, the same way chat messages are: headings, emphasis, lists, quotes, links, inline code, code blocks, and tables. Choice labels show inline Markdown such as emphasis and inline code; block syntax and links in a label stay as text, so clicking anywhere on a choice selects it. No flag is needed, and --summary, --summary-file, --stdin, and --questions JSON all display the same way. Plain text, including single line breaks, displays as written.

  • The stored text, the choice values, and the cockpit.ask.resolved event keep the original text; the answer to a choice is always its label exactly as passed.
  • HTML in the text is shown as text and never runs. Use the HTML explanation below for rich layouts.
  • An image written as ![alt](ask-media:<name>) or ![alt](ask-html:<name>) places a named media file or HTML at that spot; see "Placing media and HTML" below. Other images in the text keep their current behavior.
  • http and https links open in the system browser. Opening a link never selects a choice or sends an answer.
  • Discord and Slack relays, Hooks, and cockpit ask list carry the text unchanged.

HTML explanation:

Add an HTML explanation when the decision is easier with a comparison table, design options, or a before/after preview in view. Pass it with exactly one of --html <html>, --html-file <path> (--file <path> is the same option, as in cockpit display), or --html-stdin. It is optional; an Ask without it works exactly as before. Each of these three options can also be followed by --html-ref <name>; a named HTML is not the explanation but an item the text or a choice places (see "Placing media and HTML" below), so named ones can be repeated next to the one unnamed explanation. Only one option can read standard input.

  • The desktop Ask window, the side panel Ask tab, and Remote Access show the explanation between the summary and the choices, in a bounded area that scrolls on its own so the choices, free-form input, and Submit stay reachable. The answer still comes only from those existing controls, and the cockpit.ask.resolved event never contains the HTML.
  • The explanation is display-only, rendered the same way as an HTML cockpit display: scripts and forms do not run, data-cockpit-action does nothing, its CSS stays inside its frame, and http and https links open in the system browser. It cannot answer, submit, or operate Cockpit.
  • Keep --summary as the short question. Discord and Slack relays, Hooks, and cockpit ask list carry the summary, questions, and choices, plus htmlExplanation: { size } in list and Hooks, never the HTML itself; the relays add a line saying the explanation is viewable in Cockpit. Put anything the answer must not miss in the summary or choice descriptions too.
  • Cockpit copies the HTML when the Ask is created, so later edits to the source file do not change it. It is kept with the open Ask across restarts and deleted once the Ask is answered or closed. Clients load it on demand, so large explanations do not slow Remote Access sync.
  • The limit is 512 KiB of UTF-8 for all the HTML of one Ask together, named and unnamed, and at most 8 HTML items. Larger, empty, whitespace-only, missing, or unreadable input fails before anything is created, with code ask_html_too_large, ask_html_count_invalid, ask_html_blank, file_not_found, file_empty, or stdin_no_input. Attach large screenshots with --media instead of inlining them.
  • If an open Ask's explanation cannot be loaded, the Ask says so and offers Retry; the question and answer controls stay usable.

Placing media and HTML:

By default --media files appear in a row above the choices and the HTML explanation above them. To put an item at a particular spot, or beside a choice, give it a name and refer to the name.

cockpit ask --summary-file summary.md \
  --media before.png --media-ref before \
  --media a.png --media-ref a \
  --media b.mp4 --media-ref b \
  --html-file compare.html --html-ref compare \
  --choice "A" --choice-media a --choice-description "Wider margins" \
  --choice "B" --choice-media b \
  --choice "Keep it" --choice-description "See ![the comparison](ask-html:compare)"

where summary.md contains, for example, Pick a header.\n\n![The current header](ask-media:before)\n\nBoth options are below.

  • Name an item with --media-ref <name> right after its --media, or --html-ref <name> right after its --html, --html-file, or --html-stdin. A name is 1 to 32 lowercase letters, digits, hyphens, or underscores, starting with a letter or digit, and is unique across media and HTML in the Ask. An item without a name keeps the current position.
  • In the summary, a question's summary (--question or questions[].summary), or a choice description, write ![alt text](ask-media:<name>) for media or ![alt text](ask-html:<name>) for HTML. The item appears at that spot, set apart from the text before and after it; the alt text is read aloud and used where the item cannot be shown. The references are found the way the text is displayed as Markdown, so the same notation inside inline code, a code block, raw HTML, or escaped as \![...](...) stays text, and only lowercase ask-media: and ask-html: are references.
  • To show an item beside a choice, add --choice-media <name> or --choice-html <name> after the --choice, --question-choice-media <name> or --question-choice-html <name> after a --question-choice, or "media"/"html" in a questions choice object. A choice takes one such item. A choice label itself cannot contain a reference (ask_asset_reference_in_label), because the label is the answer value; the answer stays the label exactly as passed.
  • Each named item can be placed in one place only. A named item that is not placed anywhere is shown where unnamed ones are: media in the row above the choices, HTML after the explanation.
  • An image beside a choice makes an image card: tapping the card, the image included, selects the choice exactly like tapping its label, and a separate enlarge button opens the image without selecting. Video, audio, and HTML beside a choice, and a description that places items, are shown under the choice, never inside it, so playing, seeking, scrolling, or following a link never selects or sends. Single and multiple choice, free-form input, and Submit work as before. In Remote Access the cards are one per row; media in the text fills the width at its original aspect ratio, and HTML keeps the same bounded, scrollable height as the explanation.
  • Cockpit checks names and references before creating the Ask and creates nothing (no Ask, no stored media or HTML, no draft) when one fails, with exit 1, code, the name in ref, and where it was found in location ({"area": "summary"}, {"area": "question", "question": 2}, or {"area": "choice", "question": 1, "choice": 3, "part": "attachment"|"description"|"label"}): ask_asset_ref_invalid for a name that breaks the rule above, ask_asset_ref_duplicate for a name given twice, ask_asset_reference_unknown for a reference to an unregistered name, ask_asset_reference_kind_mismatch when ask-html: or --choice-html names media (or the reverse), ask_asset_reference_duplicate when an item is placed twice, and ask_asset_reference_in_label. Media names are checked before any file is sent. Option order mistakes are caught before anything is sent: --media-ref requires a preceding --media, --html-ref requires a preceding --html, --html-file, or --html-stdin, and one --media-ref per --media, one --html-ref per HTML, one item per choice.
  • The immediate response lists each named item and where it went: "assets": [{"ref": "before", "kind": "media", "location": {"area": "summary"}}, {"ref": "a", "kind": "media", "location": {"area": "choice", "question": 1, "choice": 1, "part": "attachment"}}], with location: null for one that is not placed. It is omitted when the Ask has no named items.
  • cockpit ask list and Hooks carry media[].ref, htmlAssets: [{ref, size}], and choiceAssets (per question, keyed by choice label, {kind, ref}), never the HTML itself. Named HTML is stored, kept, and deleted exactly like the explanation.
  • Discord, Slack, Chatwork, and Google Chat never show the raw reference. Media is numbered in reading order, and each reference becomes [Image 3], [Video 4: alt text], and so on; choices with an item beside them are numbered, so the list reads 1. A — [Image 3] and the buttons read 1. A. Attached files carry the same caption with the choice, such as Image 3 · Choice 1: A (the attachment description on Discord, the file title on Slack, the file message on Chatwork); the existing per-service attachment limits still apply, and a file that cannot be attached is still named in the text. Google Chat does not show images or other media directly: it attaches no files, its text still tells which choice each item belongs to, and an Ask with media adds a line saying to check them in Cockpit before answering, pointing to the Remote Access link in the message when Remote Access is set up. HTML is never sent; it appears as [HTML “alt text” — open it in Cockpit], and named HTML that is not placed anywhere appears as [HTML — open it in Cockpit] at the end of the summary.

Known limitation in distributed v5.2.2: Remote Access drops media placement references during synchronization. The PWA can show placed images, video, and audio in the top media strip instead of their requested text or choice positions, and choice images can be missing. HTML clipping is also reported. Review these Asks in the Desktop Ask window or Ask side panel before answering. The fix merged after v5.2.2 is not included in that release. See https://github.com/tempi-tech/AGICockpit/issues/3287.

Mission:

--mission <id> shows the Ask under that Mission's items that need the owner, where the owner can answer it (cockpit help crew). Only a Crew's session or its child tasks can use it, and only for an active Mission of that Crew. It is refused with mission_requires_crew, mission_not_found, or mission_not_active, and no Ask is created.

Priority:

--priority tells the user which open Ask to answer first. It describes how urgently this answer is needed, not how important the task is. Omitting it means medium.

Value Shown as Use when
low Low It can wait: a suggestion, an optional check, or a question you can work around
medium Normal An ordinary decision. This is the default
high High A late answer misses a deadline or holds up several tasks or people
xhigh Urgent A late answer lets an outage, data loss, or financial loss grow
  • Being blocked yourself is not a reason for high or xhigh; almost every Ask blocks its own task.
  • With high or xhigh, start --summary with the reason in one short sentence: the deadline or the impact, for example "The release window closes at 15:00".
  • Priority never changes how the Ask works. A low Ask still waits for an answer, is never skipped or auto-answered, and resumes the task the same way. Priority itself never moves keyboard focus or raises a window above the level every Ask window already uses. It changes window visibility in one case only: when the user has hidden the Ask window, a newly arriving high or xhigh Ask shows it again and ends the hidden state.
  • On the desktop and in Remote Access, each Ask shows a priority badge. The combined desktop Ask window, the side panel Ask tab, and the PWA Inbox list questions newest first, regardless of priority, with each open Ask of the same task as its own entry. The desktop uses one Ask window with Previous/Next controls, a position, and the pending count. New questions join this window without interrupting the answer being edited. Switching preserves drafts and selected choices. Hiding the window keeps all questions pending, and the window stays hidden while new questions arrive until the user opens an Ask from the side panel Ask tab or Cockpit restarts; only a new high or xhigh Ask reveals it sooner. Answering or closing removes only that Ask, and the last one closes the window. Secure input requests and display-only notices keep their separate windows. cockpit ask list returns priority on each Ask.
  • Ask messages in Discord, Slack, Chatwork, and Google Chat show the priority every time, Normal included, as a colored mark that matches the badge followed by the label in the Cockpit language: 🔴 Urgent / 緊急, 🟡 High / 高, 🔵 Normal / 通常, ⚪ Low / 低. Discord and Google Chat put 🟡 **Priority: High** (🟡 **優先度: 高**) in bold on its own line, and Slack does the same with its single-asterisk bold. Chatwork has no bold, so the mark and label follow the Ask title in the box heading, [info][title]Deploy 🟡 Priority: High[/title], instead of a separate line. The label always names the priority, so it does not rely on the color.
  • Any other value fails with code: "option_value_invalid" and no Ask is created.
cockpit ask --summary "Production checkout returns 500 for every user since 14:02. Roll back release 4.12?" --choice "Roll back" --choice "Keep investigating" --priority xhigh
cockpit ask --summary "The release window closes at 15:00. Ship with the known layout glitch on Safari?" --choice "Ship" --choice "Postpone" --priority high
cockpit ask --summary "Rename the helper to formatDuration while I am here?" --choice "Rename" --choice "Leave it" --priority low

Deadline:

--expires-at <time> or --expires-in <period> gives an Ask a deadline. Without either, the Ask waits until it is answered or closed, as before. Use a deadline when an answer after a certain time no longer helps, and say in --summary what you will do if it passes.

  • --expires-at takes an ISO 8601 date and time with a time zone, such as 2026-12-02T18:00+09:00 or 2026-12-02T09:00Z; a time without a time zone is refused. --expires-in takes a whole number above zero followed by m (minutes), h (hours), or d (days), such as 90m, 2h, or 3d. Cockpit turns the period into a date and time when it receives the Ask and keeps that.
  • The deadline must be later than now and no more than 30 days ahead. Giving both options fails with option_conflict before anything is sent; a malformed value fails with ask_expiry_invalid, a past one with ask_expiry_past, and one more than 30 days ahead with ask_expiry_too_far. All exit 1 and create no Ask. The response and cockpit ask list carry the deadline as expiresAt in UTC.
  • When the deadline passes without an answer, Cockpit closes the Ask and starts one turn in the task that asked (a Crew's session included) with a cockpit.ask.expired event. It is not an answer: it carries no choice, approval, or consent, so decide what to do without one. cockpit ask get reports status: "expired" with expiresAt. An Ask with delivery: none only records the expiry.
  • An answer that arrives at or after the deadline is refused with ask_expired (exit 1), even if Cockpit had not closed the Ask yet, and the Ask closes as expired. An answer accepted before the deadline is the answer, and the Ask never expires after it; once the deadline has passed, that answer can no longer be taken back from the Queue to change it. cockpit ask close still closes an Ask without telling the task, and after the deadline it fails with ask_expired because the Ask has already expired.
  • A deadline that passed while Cockpit was quit is handled at the next start, and one that passed while the computer slept is handled when it wakes. Cockpit does not run in the background to keep time while it is quit, so the task hears of such an expiry once Cockpit runs again. The event goes through the task's Queue once, like an answer.
  • The desktop Ask window, the side panel Ask tab, and Remote Access show "Deadline: (date and time)" with the time zone of the device under the title. Ask messages in Discord, Slack, Chatwork, and Google Chat, and a Crew's owner DMs, show ⏰ Deadline: … with the time zone in the Ask's language. When the Ask expires, they change to say it closed at its deadline without an answer, and their buttons stop answering. There is no countdown and no reminder before the deadline.
  • Hooks receive the expiry as ask.dismissed with outcome: "expired".
cockpit ask --summary "Merge the release branch before the 18:00 freeze? I will postpone the release if there is no answer by then" --choice "Merge" --choice "Postpone" --expires-at 2026-12-02T18:00+09:00
cockpit ask --summary "Use the cached data for today's report? I will rebuild it from scratch if there is no answer in 2 hours" --choice "Use cache" --choice "Rebuild" --expires-in 2h
{"event":"cockpit.ask.expired","version":1,"ask_id":"ask_abc123","outcome":"expired","expires_at":"2026-12-02T09:00:00.000Z"}

Writing self-contained asks:

The user answers from the dialog alone — often from a phone notification, without the chat view open. Assume nothing you wrote in the chat has been read.

  • Put everything needed to decide into --summary: what you were doing, what you found, and what happens after each answer.
  • Never refer to the chat ("as shown above", "the error I mentioned", "option B from my last message"). Name things concretely: file paths, branch names, URLs, error text, numbers.
  • Name projects and tasks by their names, not only by their IDs. A bare project or task ID tells the user nothing; look up the name with cockpit project get <id> or cockpit task get <id> and write it, adding the ID after the name only when it helps.
  • Give each non-obvious choice a --choice-description that states its consequence or trade-off, so the choice labels can stay short.
  • When the decision hinges on something visual, attach it with --media instead of describing it.

Bad: --summary "Which approach should I take?" --choice "A" --choice "B"

Good: --summary "The signup form (src/pages/Signup.tsx) fails validation on empty email. Fix by validating in the frontend or the API?" --choice "Frontend" --choice-description "Faster feedback in the form; API stays unchanged" --choice "API" --choice-description "One source of truth; every client gets the fix"

Immediate command response:

{"ok": true, "data": {"askId": "ask_abc123", "status": "scheduled", "questions": [{"id": "target", "choices": 2}, {"id": "checks", "choices": 3}]}}

questions lists every question the Ask was created with: its id (the one cockpit ask answer --question takes) and how many choices it has, so you can confirm right away that no choice was lost. A single-question Ask built from --choice reports the id default.

When the user answers, Cockpit starts a new turn in the originating task with a compact, language-independent cockpit.ask.resolved JSON event. The original question is not repeated because it remains in the task context. The event includes answered_by from the verified caller: "user" for the Ask window, the side panel Ask tab, an authenticated PWA session, or an authenticated Remote Access CLI request; a task ID proven by its task secret for another Cockpit task answering locally via CLI; or the verified relay identity described below. The next turn counts as owner-started only when Cockpit recorded a verified owner answer. A task answer stays automatic even if its task was deleted or its name cannot be resolved. Saved answers or queued turns without verified owner authority also stay automatic after restart.

Free-form input produces:

{"event":"cockpit.ask.resolved","version":1,"ask_id":"ask_abc123","outcome":"answered","answers":[{"type":"input","value":"Use blue"}]}

The user can attach supported images, text and source files, JSON, CSV, PDFs, audio, video, and office documents to any answer. Archives and executable formats are rejected. Attachments arrive as absolute paths in attachments with display name, MIME, size, and kind in attachment_metadata. File contents are never expanded into the event:

{"event":"cockpit.ask.resolved","version":1,"ask_id":"ask_abc123","outcome":"answered","answers":[{"type":"input","value":"Review this report","attachments":["/tmp/agi-cockpit-uploads/5c1f.../upload_a1b2c3d4.pdf"],"attachment_metadata":[{"id":"upload_a1b2c3d4","path":"/tmp/agi-cockpit-uploads/5c1f.../upload_a1b2c3d4.pdf","name":"report.pdf","mime":"application/pdf","size":245760,"kind":"pdf"}]}]}

question_id is present only on per-question answers of a multi-question Ask, where it preserves the correspondence between questions and answers; a single-question answer and a whole-Ask reply (below) omit it. Answers use choice, choices, input, or whole_answer:

{"event":"cockpit.ask.resolved","version":1,"ask_id":"ask_abc123","outcome":"answered","answers":[{"question_id":"target","type":"choice","value":"staging"},{"question_id":"checks","type":"choices","values":["lint","tests"],"input":"typecheck"}]}

A selection and free text on the same question arrive in one entry and stay separate fields: value (or values) is the selection and the optional input is the free text the user added to that question as a supplement, condition, or reason. input on a choice entry is present only when the user wrote something, so a choice-only answer keeps the shape above. An input entry is free text with no selection.

{"event":"cockpit.ask.resolved","version":1,"ask_id":"ask_abc123","outcome":"answered","answers":[{"type":"choice","value":"Plan A","input":"Check with me once before publishing"}]}

For an Ask with two or more questions, the user can also reply to the whole Ask — for example when the premise behind the questions is wrong, one explanation covers all of them, or an instruction applies on top of the individual answers. That reply arrives as a single whole_answer entry with no question_id. Treat it as the answer to the Ask as a whole, not to any one question. It may carry attachments and attachment_metadata like input:

{"event":"cockpit.ask.resolved","version":1,"ask_id":"ask_abc123","outcome":"answered","answers":[{"type":"whole_answer","value":"Neither applies: the release is postponed until the migration review finishes"}]}

The whole-Ask reply can accompany per-question answers in the same event. The per-question entries come first with their question_id, and the whole_answer entry is last with none, so the three parts never share a field: the selection is value/values, the per-question free text is that entry's input, and the Ask-wide reply is the whole_answer entry's value. When a whole-Ask reply is present, the user may have left some questions blank; those questions have no entry, and nothing is filled in for them. The same reply can come from Discord, Slack, and Crew Ask DMs (see "Relaying asks to Discord and Slack" below), in this same shape.

{"event":"cockpit.ask.resolved","version":1,"ask_id":"ask_abc123","outcome":"answered","answers":[{"question_id":"approach","type":"choice","value":"Plan A","input":"Keep the old endpoint for one release"},{"question_id":"environment","type":"input","value":"Development first"},{"type":"whole_answer","value":"Have this ready before next week's review"}]}

Closing the dialog without answering removes the Ask without sending a message to the agent or resuming the task. The task can still be resumed later with a regular user message.

cockpit ask requires a Cockpit task context so the later response always has one unambiguous destination. It is available for resumable agent tasks, not Terminal tasks, because Cockpit cannot safely restore a Terminal shell and deliver the continuation to the process that created the Ask.

Updating an open Ask:

cockpit ask update <askId> rewrites an Ask that has not been answered yet, so a mistake or a change of plan does not need a new Ask. It takes the same options as creating one: --summary, --summary-file, or --stdin; the choices and questions with their descriptions and --multiple; --media with --media-ref; and the HTML options. --expires-at or --expires-in sets a new deadline, --clear-expiry removes it, and leaving all three out keeps the current deadline; only one of them may be given (option_conflict), and the new deadline is checked like one for a new Ask. --priority, --mission, --title, and --directory are not accepted (Unknown option); those stay as they were. The update replaces the whole content, so what the command leaves out is removed: pass every choice, question, media file, and HTML item the Ask should still have. The same checks apply as for a new Ask, and the Ask stays unchanged when one fails.

cockpit ask update ask_abc123 --summary "Deploy to production?" --choice "Ship" --choice "Wait" --choice-description "Hold until Monday"
cat questions.json | cockpit ask update ask_abc123 --summary-file summary.md --questions-stdin
  • Only the task that created the Ask can update it, or, for an Ask of a Crew or its child tasks, a task of the same Crew. The command proves the task with its task secret, like answer. Another task gets ask_update_forbidden, and a call without a valid task secret gets ask_update_authentication_required. Asks that Cockpit asks on its own (device-connection approvals, Fleet gates, Crew owner questions, the Remote Access reconnect question) cannot be updated. Updating does not let the asking task answer its own Ask.
  • An Ask that was already answered, including an answer still waiting in the Queue, returns ask_already_answered; a closed one returns ask_already_closed; one whose deadline has passed returns ask_expired, so it can no longer be extended or have its deadline cleared; an unknown one returns ask_not_found. All exit 1. Ask again with cockpit ask if you still need an answer.
  • The response is {"ok": true, "data": {"askId", "status": "updated", "updatedAt", "expiresAt", "questions", "assets"}}, with questions and assets as for a new Ask and expiresAt the deadline now in effect, or null.
  • The Ask keeps its id, priority, title, folder, and creation time. It does not count as a new Ask: no Ask chime, no ask.* Hook event, and a hidden Ask window stays hidden. cockpit ask list shows updatedAt and contentRevision, the number of updates.
  • The desktop Ask window, the side panel Ask tab, and Remote Access rewrite the same Ask in place and show "Updated (time)" in small type. Text and attachments being added to an answer stay. A selected choice that the update removed is unselected, and selections whose choice is still there stay, even if it moved. A draft for a question id that is gone is not sent, and a question that no longer takes free text drops its text.
  • An answer from the Ask window, the side panel, or Remote Access counts only for the content the person saw. One made on earlier content is refused, with "This Ask was just updated" on screen so the person checks the new content and answers again. Any answer still being processed when an update arrives is refused the same way, and an update that arrives after an answer is refused with ask_already_answered.
  • Discord and Slack, in the Ask relay channels and in a Crew's owner DMs, edit the posted messages in place when the number of questions and the media stay the same; selections already made there are kept by choice name, and buttons and forms from before the update stop answering. Otherwise, when a message cannot be edited, and always on Chatwork and Google Chat, whose replies cannot tell an answer to the earlier content apart, the earlier message is changed to say the Ask was updated (or deleted when the Crew deletes finished DMs), and the updated Ask is posted as a new message.
  • The Ask card in the asking task's chat shows the new first line of the summary.

Operating asks:

list, answer, and close operate Asks that other tasks created. They exist so an agent can act as the user's proxy — for example a voice agent relaying the user's spoken decision, or a coordinating task resolving a subtask's question it clearly has the context and authority to decide. Never answer an Ask just to clear it; when in doubt, leave it for the user.

cockpit ask list                                  # all open Asks with questions, choices, and media metadata
cockpit ask list --task task_3                    # only Asks from one task (exact match, case included)
cockpit ask get ask_abc123                        # what became of one Ask, open or finished
cockpit ask answer ask_abc123 --choice "staging"  # answer a single-question Ask
cockpit ask answer ask_abc123 --choice-index 1    # same, by 1-based choice number
cockpit ask answer ask_abc123 --input "Use blue"  # free-form answer
cockpit ask answer ask_abc123 --question target --choice "staging" --question checks --choice "lint" --choice "tests" --input "typecheck"
cockpit ask answer ask_abc123 --choice "Plan A" --input "Check with me before publishing"  # selection plus free text on the same question
cockpit ask answer ask_abc123 --whole-answer "Neither applies: the release is postponed"  # one reply to a whole multi-question Ask
cockpit ask answer ask_abc123 --question approach --choice "Plan A" --question environment --input "Development first" --whole-answer "Ready before next week's review"  # per-question answers plus a whole-Ask reply
cockpit ask answer ask_abc123 --input "See the screenshot" --attachment ./shot.png  # attach local files to the answer
cockpit ask close ask_abc123                      # close one Ask without answering
cockpit ask close --all                           # close every open Ask
cockpit ask close --task task_3                   # close all Asks from one task
  • answer resumes the originating task with answered_by in the event. A task cannot answer its own Ask (the server rejects it with code: "ask_self_answer_forbidden"), and a Crew's request to change its settings, Cockpit's question whether to let in a person who waits for a Crew, and Cockpit's question whether the person who sent a Crew a DM during the setup's owner step is the owner are answered only by the owner: in Cockpit, or from one of the owner's own tasks (including the former master) identified by their secret, and the second also in a Crew owner's DM; the Crew itself, its child tasks, other Crews, and a local shell outside a task get ask_owner_answer_required. Closing its own Ask is allowed.
  • Multi-question Asks must be answered in one command: prefix each answer group with --question <questionId> (ids come from list). Multi-select questions accept repeated --choice.
  • --choice (or --choice-index) and --input may be given together for one question when it accepts free-form input: the selection arrives as value/values and the text as input on the same entry. Either one alone works as before.
  • --whole-answer <text> replies to a whole multi-question Ask; it arrives as one whole_answer entry with no question_id. Alone, it answers the Ask without answering each question. Combined with --question groups, both are delivered in one event, and the groups may then cover only some of the questions; without --whole-answer, every question still needs a group. With --whole-answer, --choice, --choice-index, and --input must follow a --question. The text must not be empty, and it is rejected for a single-question Ask (use --input). An --attachment placed before the first --question belongs to the whole-Ask reply, with the same limits as any other answer.
  • --attachment <path> attaches a local file to the answer and repeats; inside a multi-question command, place it after the --question group it belongs to. Files are imported into the asking task's uploads and reach the task exactly like a UI attachment, in attachments with attachment_metadata. The same limits apply: at most 8 files per response across every question, all file types are accepted and stored unchanged, including archives and files with unknown extensions. An answer may consist of attachments alone when the question accepts free-form input; omit --choice and --input in that group.
  • --choice must match the choice text exactly; use --choice-index (1-based, per list order) to avoid transcription mismatches. Mismatch errors return the valid choices.
  • Asks with media or htmlAssets are asking for a visual judgment. Do not answer one unless the content has actually been checked — by the user looking at the Ask window, or by you if you can view the files. If it has not been checked, tell the user it is waiting on screen instead.
  • close never resumes the task; the asking task stays waiting until the user resumes it. Use it to clear stale Asks, not to skip questions that still need answers.
  • get <askId> tells an asking task what became of an Ask it created, including after it left list: {"ok":true,"data":{"ask":{"id","taskId","title","createdAt","status","resolvedAt","answeredBy","answer","expiresAt","delivery"}}}. status is pending (still waiting), answered, closed (closed without an answer, or removed with its task), or expired (closed at its deadline without an answer). expiresAt is the deadline, or null for an Ask without one. For an answered Ask, answer is a short text summary and delivery is queued (waiting in the task's queue), failed (delivery is being retried), or delivered; an expired Ask reports the delivery of its cockpit.ask.expired event the same way. delivery is null for pending and closed Asks. Finished Asks are kept for 30 days (at most the latest 500); after that, or for an unknown id, get exits 1 with code: "ask_not_found".
  • Every subcommand prints Cockpit's dates as Cockpit wrote them (ISO 8601 strings) and carries instance on a local Cockpit, in both launchers.
  • If the user answers on screen first, answer returns {"ok":false} with "Ask not found" and code: "ask_not_found" — that is a race, not a failure; check cockpit ask list for what is still open. close of an Ask that is no longer open answers the same code.

Where Asks appear on the desktop:

Each new Ask opens a small Ask window unless notifications.askWindow is false (Settings > Notifications, or cockpit settings set notifications.askWindow false). The side panel Ask tab (cockpit side-panel ask) always lists every open Ask and answers or closes it the same way the window does. Turning the window off never drops an Ask, its relay, or its answer handling. A new Ask also plays a short Ask chime, distinct from the general notification sound, unless notifications.askSound is false; it plays once per new Ask, even with windows off, and never again for the same Ask. Preview it with cockpit settings preview-sound ask.

The side panel Ask tab lists open Asks newest first as a compact list by default. Each row shows the sender (the Crew for a Crew's tasks, otherwise the task), the title, the time, the priority badge, and an updated mark. Selecting a row only opens it in place and never answers or closes the Ask. The desktop remembers whether it shows the compact list or every Ask in full. Search matches the title, text, questions, choices, choice descriptions, and sender name, ignoring case and treating the typed text as one phrase; it never searches HTML, attachments, drafts, or secure input requests. The sender and priority filters offer only values among the open Asks, and search and filters never hide secure input requests or display-only notices. They last until Cockpit restarts. "Show in conversation" opens the conversation that holds the Ask's card (the Crew's conversation for a Crew's child task) and scrolls to the card with that Ask id, loading only the older history it needs; when there is no such card, for example for a task in the terminal view, it says so instead of guessing. The Remote Access Inbox does not have the compact list, search, filters, or "Show in conversation"; it shows one open Ask at a time, newest first, with Previous/Next and a position. These are screen features only: cockpit ask list is unchanged and still returns every open Ask, narrowed only by --task.

Answer authentication and compatibility

The local Ask bearer token authorizes access to the Ask service; it is shared with tasks and does not identify the owner. A local answer must also send X-Secret-Task-Token with the task's AGI_COCKPIT_SECRET_TASK_TOKEN. Cockpit verifies it against the issuing process's task-secret registry and derives the task ID from that secret. An optional X-Cockpit-Task-Id must match that verified task ID. A missing, invalid, revoked, or mismatched credential returns HTTP 401 with code: "ask_answer_authentication_required"; it never schedules a turn or records an answer. Owner-only Asks still return HTTP 403 with code: "ask_owner_answer_required" to an unverified caller. A verified task cannot answer its own Ask (ask_self_answer_forbidden).

Both Bash and PowerShell launchers send the task secret only to its issuing Cockpit instance. Current task CLIs and Fleet controllers running as Cockpit tasks can answer other nodes' general Asks with that secret; those answers remain task-started. An older CLI or script sending only a task header must use the current launcher in a running Cockpit task, or an authenticated owner path. A task-external local CLI, voice agent, or script cannot answer with the local Ask bearer token alone. list, get, and close keep their existing behavior. Hook processes receive event metadata, not a task-secret credential, and cannot answer with that metadata or the local Ask bearer alone. For Slack answer buttons, use the built-in authenticated Ask relay described below and in cockpit help hooks.

Cockpit identifies the owner through its desktop renderer IPC, a paired PWA WebSocket session, or Remote Access authentication. Remote Access CLI HTTP answers must pass the existing authorized pairing-token check, along with the configured network and origin checks. These requests answer as user; task headers do not change that identity. Both launchers omit local task IDs and task secrets from remote answers. The local Ask bearer token is not a Remote Access pairing credential. A network address, including loopback and same-owner Tailscale peers, does not identify the person answering. Every PWA WebSocket connection requests pairing before sending initial state: an already-paired PWA presents its stored token automatically, and an unpaired PWA must sign in with the same AGI Lab account as the PC before it can answer. Paired owner sessions can answer both general and owner-only Asks and start owner turns. The local task ID is not forwarded remotely, so a task must use its issuing Cockpit to preserve task identity; sharing a Remote Access pairing token with a task grants owner authority.

The owner's own tasks (including the former master) can still answer the three owner-only Crew Ask kinds after their task secret is verified and Cockpit confirms the task is outside every Crew. The Remote Access reconnect Ask (cockpit help remote-access) is also owner-only, but no task can answer it, not even the owner's own tasks (including the former master); only the owner answers it in the desktop, a paired PWA, or with Remote Access authentication. list shows the Asks about people who wait for a Crew with the start of their message only to the owner's verified tasks (including the former master); anyone else, including a task inside a Crew, a list without a task secret, and Remote Access, gets them without the message. Their answers retain the task ID. Discord and Slack notification relays retain their verified relay identity and cannot answer owner-only Asks; their continuation turns are automatic. Crew owner DMs retain the verified connection-owner chat ID and count as owner answers after the DM identity, current ownership, message, and interaction checks described in cockpit help crew. Crew setting confirmations and owner-candidate questions remain in Cockpit; pending-person approvals can also be answered in the owner's verified DM.

Relaying asks to Discord and Slack

Settings > Ask notifications forwards every Ask to a Discord channel, a Slack channel, or both, where buttons, select menus, and modals answer it through exactly the same path as cockpit ask answer, with answered_by set to discord or slack. Answering anywhere — the Ask window, the side panel Ask tab, Remote Access, the CLI, or the other relay — updates every relayed message to "Answered" or "Closed", and an Ask that reaches its deadline to "Closed at its deadline". Files the allowed user posts in the channel are staged and attached to the next answer. For an Ask with two or more questions, a "📝 Reply to the whole ask" button left of "📤 Submit" opens a form with one multi-line field (up to 4,000 characters on Discord and 3,000 on Slack); submitting it sends the answers chosen so far and the reply as the last whole_answer entry in one event, leaves the unanswered questions without an entry, and puts the staged files on the whole_answer entry. Crew Ask DMs offer the same button to the DM's owner. "📤 Submit" alone still needs every question answered. Both relays are off by default and connect outbound only, through the Discord Gateway and Slack Socket Mode. The Asks only the owner may answer (above) never go to the relays. A Crew also sends the Asks of itself and its child tasks to its owners by DM from its own bot (cockpit help crew, --ask-dm); an answer from such a DM has answered_by set to the owner's chat id, such as discord:123456789.

cockpit ask relay status           # both relays: connected / reconnecting / stopped, target channel, last error, recent round trips
cockpit ask relay status slack     # one relay only
cockpit ask relay status --verbose # same, plus the tail of ~/.agi-tools/data/cockpit/logs/ask-relay.jsonl
cockpit ask relay test             # test every relay in parallel and report each one
cockpit ask relay test discord     # post a real test Ask and report the round-trip time once it is answered

status without a target reports both relays under discord and slack; with a target it reports that one. Each status carries state, error, botName, guildName (the Slack workspace name for Slack), channelName, the stored config, and the last 10 roundTrips; each round trip records who resolved the Ask, so an Ask answered on the desktop shows up there too. A round trip that never posted records status: "failed" with reason. --verbose adds logs, the recent structured Ask relay log lines (state transitions, post attempts with HTTP status, queue/drop events, test outcomes, Discord Gateway lifecycle events, and interaction handling) from ~/.agi-tools/data/cockpit/logs/ask-relay.jsonl. That file rotates at 5 MB and keeps two archives, like the other jsonl logs. A gateway line records hello, ready, resumed with the number of replayed events, reconnect_requested (op 7), invalid_session (op 9, with resumable), heartbeat_ack_missed, or closed, plus closedBy, closeCode, and sinceLastAckMs. An interaction line records received, acknowledged, ack_skipped (a button acknowledgement skipped because the interaction was over 30 seconds old), ack_failed (with httpStatus and Discord's apiErrorCode, such as 10062), in_flight, applied, or apply_failed, with the interaction's ageMs, this computer's clock minus the time in the interaction's id, which includes any clock difference. acknowledged and ack_failed also carry ackStartMs and ackSettleMs, on a monotonic clock: from receiving the interaction to sending the acknowledgement, and from sending it until it settled. Either is left out when the clock could not be read at one of its ends. They do not say why an acknowledgement was slow. Log lines carry IDs only, never tokens or message text. A button pressed while the Discord connection was briefly down is still applied when Discord delivers it, even after Discord's 3-second reply window has passed; Discord then shows that the interaction failed, and the Ask message itself shows the result. test posts a test Ask, starts the relay temporarily if it is configured but disabled, and blocks until the Ask is resolved or 5 minutes pass. test without a target exercises both relays at once and returns { discord, slack }, where each entry is either a result or { error, code } for a relay that refused the test. With a target it returns that relay's result directly. A test Ask is delivered only to the relay being tested. A result is { askId, answered, outcome, durationMs } where outcome is answered only for a real round trip through the tested relay; answering the same Ask on the desktop or in Remote reports answered_elsewhere, and dismissed, timeout, not_delivered, and superseded cover the other endings. The UI describes dismissed as closed. Existing HTTP /asks/<id>/dismiss, IPC/WebSocket ask:dismiss and ask:dismissed, hook event ask.dismissed, and stored/JSON dismissed outcome, reason, and status values remain unchanged for compatibility; the CLI verb is already close. A relay with no channel, no token, or no allowed answerer refuses the test instead of waiting. Changing the relay configuration while a test is waiting ends that test as superseded and does not later restart an already-enabled relay.

Configure the relays from Settings > Ask notifications. cockpit settings exposes the same values under notifications.askRelay.discord.* and notifications.askRelay.slack.*, and the tokens live only in the secure store. The relay answers only interactions from allowedUserId; clearing that key stops the relay rather than opening it to every member of the server. The app needs View Channels, Send Messages, Attach Files, Add Reactions, and Manage Channels. If files posted in the channel are not picked up as answer attachments, enable the Message Content Intent for the app in the Developer Portal — Discord omits attachments from gateway message events for some applications without it.

The Slack relay uses Socket Mode: create the app from the manifest offered in Settings, install it, and paste the access token (xoxb-) and the app-level token (xapp-, scope connections:write). Cockpit opens a Socket Mode connection long enough to check that both are from one app (app_token_mismatch otherwise) and that no Crew uses it (app_in_use), and saves nothing until they pass. It posts Block Kit buttons, a multi_static_select for multi-select questions, and modals for free input, joins the chosen channel automatically, and stages files shared in the channel by the allowed user through files.info. Only the Slack user in allowedUserId can answer; everyone else gets an ephemeral refusal. The manifest turns on "Always Show My Bot as Online", so Slack shows the bot as online like other bots, even while Cockpit is not running. For an app made before this, open the app's settings on Slack (https://api.slack.com/apps), go to App Home, and turn on "Always Show My Bot as Online".

Example uses:

  • Choose among multiple implementation approaches
  • Gather information that requires user judgment, such as a deployment target or branch name
  • Final confirmation before a destructive operation
  • Review screenshots, generated images, audio, or video

Passwords and other secrets must use the separate cockpit secret request flow (cockpit help secret), which delivers once to a fixed browser password field and returns only status. Never put a secret in an Ask answer. A secure input request is shown in the same places as an Ask (its own window, the side panel Ask tab, and the PWA Inbox), but it is not an Ask: cockpit ask list never lists it, cockpit ask answer cannot answer it, Discord and Slack never receive it, and it never fires ask.* Hooks or cockpit.ask.resolved.