Console

Inbox

One item model for daemon tool calls and HITL gate approvals, answered through a durable outbox.

Every pending approval, from any daemon or HITL gate, is one inbox item. The decision (status) and the delivery of an answer (delivery) are separate fields, so a failed send never looks like a decision.

FieldMeaning
keyOpaque, URL-safe id of the item
source{ kind: daemon | hitl, id, name }
action{ tool_name, args, call_id? }. Untrusted; Console renders it as text
digestWhat an answer binds to: the daemon's action_digest or the HITL action digest
reason{ text, from: policy | agent }. Policy text and agent text are shown differently
redacted, can_editSome args are masked; edits are offered only when nothing was masked
hidden, hidden_byhidden: { count, paths } lists the masked values (paths relative to action.args, like headers[0].value); hidden_by says who masked them: gate (HITL's redaction), console (Console's credential masking of daemon approvals) or both. Only a value that is wholly a credential is masked (a bearer token, a known key format, a secret-shaped value under a secret key, HITL's rule); commands and free text around it are always shown. Approving with hidden values needs acknowledge_hidden: true
statuspending, approved, denied, expired, cancelled
delivery{ state: sending | failed, error? } while an answer is in flight or failed
answerable, blockedWhy it cannot be answered now: loading, digest_mismatch, no_reply_channel, action_changed, answered_by_you

Answering

  1. The client sends the item's digest. Console refuses an answer for a digest that is not the item's current one, which catches a stale tab.
  2. Console appends an approval_response receipt, then writes the answer to the outbox. The outbox keeps the exact bytes and one message id and is persisted before the first send.
  3. Retries reuse the same bytes and message id until the approval expires. The daemon returns the first result for a repeated answer; a HITL gate dedupes by webhook-id.
  4. Results update the item: decided, accepted (a quorum still needs more answers), conflict (someone decided first, shown with who), rejected (with the gate's code in plain words), or never delivered. Nothing is ever assumed approved; the source's own timeout denies.
examples/ts/answer-daemon-approval/main.ts
const vc = await connect({ url: listening.url, token });
for await (const item of vc.inbox.watch()) {
  // Answer only the call this bot exists for; any other item (another session, daemon or gate) waits for a person.
  if (item.session?.session_id !== session.id || item.action.tool_name !== "Bash") continue;
  console.log(`${item.source.name} asks: ${item.action.tool_name}`, JSON.stringify(item.action.args));
  const result = await item.approve({ reason: "Release checklist done" });
  console.log("Answer:", result.outcome, result.item.status, "by", result.item.decision?.by);
  break;
}

Large and many approvals

  • A daemon sends args over 16 KiB as {} with args_truncated. Console fetches the full action with approval.get, checks it against the digest, and only then makes the item answerable.
  • A daemon's session summary lists at most 8 pending approvals. When it says more are open, Console collects the rest from the session's events.
  • HITL counts one person once per approval. After you answer one approver's delivery, your other deliveries of the same approval show answered_by_you; another person must answer them.

On this page