Reference Approvals & Ask HITL

Approvals & Ask HITL

Language: English · 简体中文

Every human-in-the-loop (HITL) interaction in CrewDesk is persisted in SQLite (pending_action) before it is rendered on screen — surviving browser refreshes, tab closes, and backend restarts.

Ask Q&A Cards (ask_question)

When the PA or an escalated Worker needs a product decision (such as schedule frequency, retention period, or architecture trade-off), it pauses on an interactive AskQuestionCard:

  • Supports single-select, multi-select, and freeform text inputs.
  • In-progress answers auto-save as durable drafts while you type.
  • Once submitted, the card settles into a permanent Answered Q&A Card displaying the original question(s) and the human-readable option labels you selected (not opaque option IDs) right between the before/after replies — surviving page reloads cleanly.

Fail-Closed Tool Approvals

Tool calls trigger an Approval Card whenever:

  • The teammate's permissionMode is set to "ask" for that tool,
  • The run declared irreversible risk, or
  • The call visibly exceeds the run's frozen policy scope.

Each Approval Card displays the exact tool name, arguments, and policy reason:

ActionOutcome
ApproveResumes the parked run and allows that single call.
DenyRejects the call and feeds the denial back to the model.
Timeout (no answer)Fail-closed (deny) — an unanswered gate never auto-approves.

Per-Agent Path & Command Fences

Configure hard execution boundaries per teammate in /team/<agentId>/edit:

  • permissionMode: ask (confirm each guarded tool), auto (allow within policy), or deny.
  • allow_write_paths / deny_write_paths: restrict file writes strictly to approved directories and block workspace escapes.
  • deny_commands: reject matching shell command patterns before execution.
  • Git push boundary: project_push only allows agent/<runId> branches (pushing main/master is always rejected).