Skip to content
Documentation menu: Approvals and autonomy

Approvals and autonomy

Human approval is a durable workflow state in the capability kernel, not an afterthought in a prompt. Every gated action is resolved deterministically before anything can reach a social platform.

The three autonomy levels#

LevelBehaviourWhere allowed
in_the_loop (default)Every gated capability diverts to an ApprovalRequest. Nothing publishes until an authorised reviewer approves.All platforms and workspaces. Seeded by default on workspace creation and bootstrap.
on_the_loopScheduled publishes execute with a veto window (default 30 minutes, minimum 5 minutes) during which a reviewer or publisher can cancel. Calls scheduled inside the veto window still divert.Open protocols and closed platforms where guardrails permit it.
full_autoGated capabilities execute without waiting for approval, while daily caps, quiet hours, guardrail floors and authenticity sampling (minimum 20 percent sampled for review) still apply.Open protocols only (Bluesky, Mastodon, Farcaster and Nostr). Never allowed on closed platforms whose guardrail ceiling is lower.

Resolution follows one strict precedence order at stage 7 of the policy gate:principal > channel > org > manifest default, filtered byprincipal_types, then clamped downward by the shipped platform guardrail floor. Platform guardrails can tighten an effective level or forbid an action outright (403 guardrail_forbidden); no policy row can raise autonomy above the floor.

Only publish-affecting capabilities are autonomy-gated:posts.schedule,posts.publish_nowand material edits viaposts.update on an already-scheduled post. Drafting (posts.create), validating (posts.validate), reading and cancelling (posts.cancel) execute at every level.

HTTP 202 ApprovalDiversion#

When stage 7 resolves to divert, the kernel creates a durableApprovalRequest, snapshots the validated PublishIntent, moves the post to pending_approval, starts the Temporal approval timer workflow (defaults: remind at 4 hours, escalate at 24 hours, expire at 72 hours) and responds withHTTP 202. Diversion is a success, not an error: do not retry in a loop to bypass it.

Canonical HTTP 202 ApprovalDiversion body

{
  "status": "approval_required",
  "post": {
    "id": "0197e3b4-6f1a-7c2e-9d41-5b8e0a3c7f10",
    "state": "pending_approval",
    "version": 2
  },
  "approval_request": {
    "id": "0197e3b9-2c40-7a55-8f17-6e4d9b1a0c22",
    "state": "pending",
    "version": 1,
    "origin": "diverted",
    "expires_at": "2026-11-28T10:00:00.000Z",
    "console_url": "https://app.honeloop.example/o/0197e3a0-0000-7000-8000-0000000000a1/approvals/0197e3b9-2c40-7a55-8f17-6e4d9b1a0c22",
    "policy": {
      "capability": "posts.schedule",
      "resolved_autonomy": "in_the_loop",
      "source": "org",
      "warnings": []
    }
  },
  "resume": {
    "mode": "automatic",
    "correlation_id": "0197e3b4-6f1a-7c2e-9d41-5b8e0a3c7f99",
    "poll": {
      "capability": "posts.status",
      "post_id": "0197e3b4-6f1a-7c2e-9d41-5b8e0a3c7f10",
      "after_ms": 5000
    }
  },
  "warnings": []
}

When a reviewer approves the request, approvals.decide validates the boundpost_version, channel status, media readiness and intent fingerprint inside one database transaction, moves the post to scheduled and starts the publish workflow automatically. When a reviewer rejects, structured feedback is required and the post returns to draft so the author can revise and resubmit.

Separation of duties#

No agent key or MCP tool can approve work

Three independent layers enforce maker-checker governance:

  1. Excluded from MCP: approvals.decide does not exist onPOST /mcp.
  2. Excluded from key-minting APIs and OAuth 2.1: Neither the web Developers screen, any API key route, nor OAuth 2.1 client registration, metadata or token issuance can grant approvals:decide. Reviewer keys come only from the host-side operator bootstrap command or human user sessions with role owner,admin or reviewer.
  3. Actor-set disjointness: Even if a principal holdsapprovals:decide, the handler enforces that{ requested_by_principal, requested_on_behalf_of } and{ decider, decider_on_behalf_of } are completely disjoint. Self-approval or sibling-delegate approval fails with HTTP 403guardrail_forbidden.

Solo owners and delegated OAuth agents: Honeloop does not grant a self-approval exemption when a solo owner's delegated OAuth agent proposes a post under theiron_behalf_of grant. Solo owners who want to review and approve agent drafts themselves use a non-delegated service agent (OAuth client_credentials, Honeloop's built-in content agent or a scoped hlk_ key), invite a distinct reviewer or configure an explicit on_the_loop (or open-protocolfull_auto) policy for that channel.

Optimistic locking and version rebasing#

Every mutating capability on posts, approval requests, policies and brand profiles requires the integer version you last read:

  • posts.update, posts.schedule, posts.publish_now andposts.cancel take post.version.
  • approvals.decide takes approval_request.version (returned in the HTTP 202 diversion body and in posts.status), not post.version.
  • If a post is edited while an approval request is pending (for example during a reviewer's edit-then-approve flow), both post.version andapproval_request.version increment together so approval always binds to the exact content reviewed.

A stale write fails with HTTP 409conflict_stale_versioncarrying the complete current resource in details.current. Never blind-retry a 409; merge your change onto details.current and retry withcurrent_version.

409 conflict_stale_version response

{
  "code": "conflict_stale_version",
  "message": "Version 1 is stale; current is 2. Rebase on details.current and retry.",
  "details": {
    "your_version": 1,
    "current_version": 2,
    "current": {
      "id": "0197e3b4-6f1a-7c2e-9d41-5b8e0a3c7f10",
      "state": "draft",
      "version": 2
    }
  }
}

Rebase loop with @honeloop/sdk

import { createHoneloop, withRebase } from "@honeloop/sdk";

const hl = createHoneloop({
  baseUrl: "https://api.honeloop.example",
  apiKey: apiKeyFromConfig,
});

const updated = await withRebase(
  () => hl.posts.get({ post_id: postId }),
  (current) =>
    hl.posts.update({
      post_id: postId,
      version: current.version,
      parts: mergeChanges(current.renditions, myEdit),
    }),
  { maxRebases: 3 },
);