HaltState AI: The Approval Lifecycle
Actions checked by HaltState have three possible outcomes:
| Outcome | What Happens | Your Code |
|---|---|---|
| Allowed | Policy permits immediately | Guard block executes |
| Approval Required | Human must approve | ApprovalPending raised |
| Denied | Policy blocks action | ActionDenied raised |
The Flow
┌─────────────────┐
│ client.guard() │
└────────┬────────┘
│
▼
┌─────────────────┐
│ Policy Engine │
│ evaluates rules │
└────────┬────────┘
│
┌────┴────┬────────────┐
▼ ▼ ▼
┌───────┐ ┌────────┐ ┌──────────────┐
│ ALLOW │ │ DENY │ │ APPROVAL_REQ │
└───┬───┘ └───┬────┘ └──────┬───────┘
│ │ │
▼ ▼ ▼
Execute ActionDenied ApprovalPending
block exception exception
│
▼
┌─────────────┐
│ Human │
│ Reviews │
└──────┬──────┘
│
┌─────────┴─────────┐
▼ ▼
┌──────────┐ ┌──────────┐
│ Approved │ │ Rejected │
└────┬─────┘ └────┬─────┘
│ │
▼ ▼
On retry: On retry:
Execute block ActionDenied
Approval States
| State | Description |
|---|---|
pending |
Awaiting human review |
approved |
Human approved - guard will execute on retry |
rejected |
Human rejected - guard will raise ActionDenied |
expired |
Approval window closed (configurable timeout) |
SMS Notifications
When approval is required, HaltState can send SMS alerts to designated approvers. Configure phone numbers in the dashboard under Settings → Notifications.