Skip to main content
Use local governed authorization when an embedding application needs different agents and callers to have different tool, source, account, or communication permissions. Start with the authorization concepts. For explicit Rust owner composition, completed-turn SQLite restoration, and the separate fixed-host, single-connection JSONL profile, use Native governed embedding.
These steps identify real owner interfaces and deployment responsibilities for an embedding application; they are not a copy-and-paste configuration recipe. The stock rkat CLI and rkat-rpc instead open a governed realm configured through Governance settings. Existing provider login remains credential setup, not activation of this governed profile.
Each protected operation needs current native permission. Its owner’s policy selects no additional review (R1), bounded model review (R2), or fresh human approval (R3). Review and consent cannot supply missing permission. Refused or action-required operations return local feedback while permitted work continues. The support table below summarizes what is supported and its current limits; the review requirements explain how to integrate each choice.

Check support before rollout

Do not label a deployment fully governed while it has an unguarded path that can perform one of its declared protected operations. An unsupported required capability must be unavailable, not routed through a permissive fallback.

1. Keep the existing identity owners

Authenticate at the real ingress: the user session, service connection, connector, or scheduled-work owner. Establish the requester, ingress actor, executing agent, and optional represented subject independently of the request body. Qualify principal IDs by their identity domain. Native integration uses NativeIngressContext for the authenticated submission and InputAuthorityAssociation for retained work facts. Constructing either is not authentication. NativeWorkAuthorizationHost connects ingress to the input owner. Keep the association on the native input with its replay identity, not in a UI or plugin’s session-ID lookup table. Verify that the actual caller may invoke the delegation. An agent holding a grant for a represented user does not mean every caller may use it. A restore, retry, or fresh login must not rewrite the original requester. In a stock governed realm, keep each input’s requester exact (0.9.4). StockGovernance::bind_prompt binds only a prompt of the local operator (Input::Prompt, from the CLI or a governed JSONL connection, under the labels prompt-<event>, prompt-events and rkat-prompt-<event>). Any other input, an external event included, is refused with StockGovernanceError::RequesterUnsupported before anything is written; 0.9.3 bound any input with the operator as its requester. An outcome your own process reports after an administrative command, for example a finalized connector installation, is not the operator’s request: bind it with StockGovernance::bind_host_outcome as a durable external event (InputOrigin::External, InputDurability::Durable; any other origin or durability is refused). Its requester is the composition’s stock ingress, a runtime host; it runs under the operator’s grant-lineage mandate at the operator’s session with no represented subject, under the labels host-outcome-<event>, host-outcome-events and rkat-host-outcome-<event>, and in a turn of its own. Both calls return the input to submit and a PendingOriginal to admit once the runtime accepted that exact input; after an uncertain delivery, resubmit that input instead of binding again. A host-authenticated composition refuses both, and since 0.9.4 also refuses its own stock ingress principal (StockPrincipals::ingress_actor) as a requester, with a Denied verdict before the host is asked.

2. Compose grants with resource policy

The current Rust composition uses LocalGrantAuthority and GrantBackedWorkPolicy. Its two application interfaces have different jobs: Both use the grant owner’s local publication ordering. They read current local facts without hidden network requests. A publication stamp invalidates decisions; it is not a second policy database. An Unavailable answer from either owner is final where it is asked: Core neither rebuilds nor retries it, and at a controller’s model request it ends the run with nothing sent. Core waits only for contention it can name (an owner change in progress on the publication, or a hold of its writer). Keep Unavailable for an owner that genuinely cannot answer now, and absorb your own transient lock contention: wait briefly for your lock (never one your caller holds) or read an immutable snapshot that your writers replace. Resource-domain restrictions can be owner-scoped (0.9.4): DomainRestriction::owned_by(owners) permits every domain whose typed authority is one of the owners, so a parent grant can fix the application while each child names its exact session domain with DomainRestriction::exact. See native authorization for conjunction, review text and the downgrade boundary. For an external API, retain the credential in a trusted connector and enforce the narrower operation grant before use. Resolve a calendar ID, tenant, database, or destination through trusted owner data. If an adapter knows only that an opaque server operation is requested, authorize that conservative whole capability or leave it unavailable. Do not pretend a model-supplied label proves a finer rule. For a knowledge service, keep query and fetch enforcement in that service as well as the Meerkat invocation check. Agree on qualified identities and action/resource vocabulary; test allowed reads, denied writes, wrong represented subjects, and cross-domain identity collisions. Do not copy the knowledge service’s policy database into Meerkat or treat a document citation as permission.

3. Bind the actual operation at its execution owner

The native owner supplies a WorkAuthorizationContext for all input contributors. The adapter retains a PreparedAuthorizationBinding with its immutable request or plan, carrying typed operation facts rather than policy JSON or a permit. For tools, the final check must protect the actual resolved tool call and plan. For a model request, resolve the real backend, endpoint, credential identity, wire model, and hosted capabilities. Preserve the prepared companion through provider delegation and explicit retries. Perform the last current check after relevant credential or consequence-preparation waits and before the send or body. Changed accounts, routes, targets, or arguments require a new binding. Equal-looking arguments do not transfer a decision. Controller inference and hosted actions require their own permissions under the same work context.

4. Preserve local feedback and honest failures

Map typed errors before rendering text:
  • OperationAuthorizationError::Refused represents an ordinary operation refusal. Give the agent audience-safe feedback, preserve permitted siblings, and let it choose a different action within existing budgets.
  • A refusal of kind OperationRefusalKind::ReprepareRequired is a stale read: the owners’ publication changed while the operation was prepared or checked. It is not a denial. Since 0.9.4 a grant resolution that meets an owner change reports that stale read instead of an unavailable grant authority: a grant-backed preparation rebuilds once, controller admission reports RuntimeDriverError::ControllerReadinessUnavailable with ControllerReadinessFailure::PolicyChanged, a review read refuses as stale instead of reporting an unavailable review context, and a configured MCP attachment’s per-agent grant check answers McpAttachmentRefusal::NotCurrent. Native admission of a scoped original (its own grant-lineage mandate and each named contributor’s liveness) and a retained resume report a change they meet as ControllerReadinessFailure::PolicyChanged too, and so does require_source_original_live called outside an exclusion of owner changes. Each of these admission reads, controller admission’s included, is first made once more in place when the change it met has completed (LocalGrantAuthority::owner_change_in_progress names none), as a preparation rebuilds once. Admission never waits, because it runs inside the session’s ingress transaction, so a change still in progress, or back-to-back changes, still answer PolicyChanged. A host that submits again waits first, outside its own locks, with a bounded meerkat_core::authorization::OwnerChangeChurn::wait_after_stale_read, then resubmits once. A governed helper’s admission fence and a helper child issuance answer Unavailable rather than Denied when their check refuses to rebuild. A poisoned publication, failed durable grant custody and a clock failure still answer Unavailable. See Owner changes in progress.
  • The model-facing operation_refused payload carries data with exactly the closed kind and whether the tool ran (0.9.4): {"kind": "reprepare_required", "tool_invoked": false}, with kinds reprepare_required, denied and malformed_facts and tool_invoked false or "unknown" (always present, so its absence never reads as not invoked). Neither field is a permission; the message, Display, Debug and tracing stay uniform. OperationRefused::dispatch returns the RefusalDispatch behind tool_invoked: NotDispatched only when the fenced dispatch, a retained consent attempt or the execution policy gate met the refusal before invoking the tool code it guards, or a leaf’s effect entry (ToolDispatchContext::enter_reviewed_effect) met it before the body it guards while no effect of the call had entered; otherwise Unknown. A dispatcher layer that runs tool code of its own before delegating (a leaf that runs an effect before its effect entry included) forwards OperationRefused::new(refusal.kind()). OperationRefused equality now includes that fact: compare kind() and dispatch() rather than a value built with OperationRefused::new(kind). A mob member upcall keeps carrying the bare kind (a 0.9.3 peer decodes it as before; the receiving model reads "unknown"), and an upcall refusal whose data is absent or names no known kind decodes as operation_authorization_unavailable, since it is no verdict the peer gave.
  • OperationAuthorizationError::Unavailable means the authorization owner could not supply authority. Preserve operation_authorization_unavailable; this is not a policy denial or reviewer verdict. Repair the owner for that affected operation; do not retry unchecked or switch to an ungoverned route.
  • OperationAuthorizationError::ObservationUnavailable means required audit observation failed. Preserve that infrastructure classification through tool, provider, callback, live, and SDK adapters. Do not give the model a misleading policy refusal, mark it retryable, or switch providers to hide the failure.
  • SessionError::RuntimeUnavailable { reason } means a session operation could not acquire its runtime owner. Preserve the typed readiness reason and retained work; do not fall back to direct store mutation or report a policy denial.
  • ToolError::OutcomeUncertain (outcome_uncertain) means the call was sent but its effect is unknown. It proves neither success nor refusal before entry. Resolve it through the operation’s existing reconciliation or idempotency contract before considering a new, freshly authorized attempt.
  • When an effect already returned, preserve its actual result and any separate observation or settlement failure. A settlement_failures companion describes an additional failure; it does not replace the primary result or prove that the physical effect was absent.
Render Permission denied or Unable to record audit event from the typed result, not string matching. Keep private grant, account, and source details out of public status text. Before resubmitting an operation, use its typed outcome to choose the next step. These are integration responsibilities; for human routing, see Human consent. A current reviewer allow may continue the same in-flight retained operation through its remaining native entry checks. It must not automatically re-dispatch an operation that already settled. After action-required feedback, a later authenticated decision can wake the owner through configured delivery; the agent or host explicitly makes a fresh attempt. A still-current exact decision needs no repeat review, but the attempt still needs current authorization and entry checks. An approval notification alone proves neither a decision nor execution. Resolve any earlier uncertain outcome before another attempt, while preserving permitted sibling work and model continuation. Attach the required audit sink to the actual admitted input row. The production composition exposes audited_work_context for this purpose. A tracing callback or lossy event subscription is not a substitute. Stage observations for the next existing native commit, preserving concurrent suffixes and rollback behavior. Report process-lifetime storage as such; do not add an undisclosed fsync to each operation or promise crash-proof pre-effect evidence. Since 0.9.4 a Refused audit observation carries an AuditRefusalRead that says where the refusal was decided: its basis (owner_answer: the owners answered at one coherent publication, a prepared decision’s own validity window included; publication_changed: the publication changed under the attempt and the change completed; change_in_progress), the observation time, the sequence the attempt read, the live sequence when the publication changed, and the publication instance. A Prepared record’s AuditPolicyRead names its publication instance too; sequences of different instances do not compare. These are process-local diagnostics, not permissions or freshness proofs. AuditObservation is #[non_exhaustive]: match it with a wildcard arm. Rows carry both fields at stored input state version 7; a row stamped earlier that carries either is refused, and records written before 0.9.4 read with neither.

Owner changes in progress

An owner that holds a change across its storage commit used to outlast every built-in rebuild, so ordinary operations failed during routine owner changes. Since 0.9.4 an operation refused to rebuild while a change is in progress on its work’s own publication waits for that change to complete and rebuilds under the same operation: a model request (one deadline per model call: 2 s or the remaining run budget if less, at most 3 free rebuilds), a governed tool dispatch at its prepared entry, its body entry and the call-level policy gate (inside the tool’s timeout), the web_search helper’s model request (within the call’s remaining tool time) and a compaction summary. A free rebuild starts only once no change is in progress. Each of these sites, and a review’s currentness check after its verdict, also rebuilds when the change that made its read stale had already completed: with no change in progress it pauses 1 ms, as the wait after a stale read below does, and rebuilds as one of the same free rebuilds. Past the bounds the refusal takes its ordinary path (one rebuild, then local feedback), as does any other refusal kind. A run whose budget runs out while waiting ends with the time-budget terminal, not a refusal. Waiting never weakens a check: the rebuild still needs a coherent observation and every current check. A governed step of a tool dispatch, a further step of an entered operation or a dispatch’s own child issuance, takes its work owners’ exclusion without waiting. When another actor holds that exclusion (an issuance with its acknowledged append, another dispatch’s final entry, a host’s owner change or held exclusion), the native work owner answers the step with a refusal to rebuild (ReprepareRequired: nothing ran and nothing was appended) and names the hold through owner_change_in_progress until it ends, published or not. The waiting forms wait for that hold outside every lock, with the bounds above and never past the call’s remaining tool time, then take the step again; with no change in progress at that read (the holder may have finished in between) they pause 1 ms and take it again. Every retry is one of the three free rebuilds, within one deadline. They are GovernedDispatchOperation::run_if_current_within_after_owner_change and issue_child_if_current_within_after_owner_change, the same two on EnteredDispatchOperation, and GovernedHelperChildIssuance::issue_or_recover_after_owner_change. A dispatch’s issuance makes its single consuming entry once, its staging waiting within the dispatch attempt’s own bounds (site tool_entry; it shares the attempt’s deadline and free rebuilds with the attempt’s other stagings), then issues once under that entry as the synchronous form does, and only after a refusal to rebuild waits and issues again through the entry’s witness. An R2 review or an R3 consent is spent exactly once, and no approval read or other holder of the review owner can refuse the first issuance after the spend. That staging never reviews again: at R2 a change it meets supersedes the reviewed decision, so the call answers review_unsatisfied (context_changed) once the change completes, as a later synchronous call would; R1 and an R3 consent go on. Past the bounds the step’s typed refusal is returned (a helper issuance answers Unavailable; after a dispatch-path spend at R2 or R3, issuing again on that path answers Denied, so a caller that may retry enters once and issues through GovernedHelperChildIssuance::from_entered). Inside a streaming tool a wait longer than the inactivity window left ends as the tool’s inactivity timeout. The synchronous steps, the helper admission fence (which runs inside the WorkGraph store callback) and the host-facing entries that never wait answer at once, as before, and a poisoned publication is Unavailable and is never waited for. The fence’s contention (another writer’s hold of the publication, or an owner change in progress there) is retryable at the host level: GovernedHelperAdmissionFence::create_idempotent_after_owner_change makes the same idempotent create through a new fence for each attempt and waits with the bounds above outside the store call (site helper_admission): on the prepared path only after an attempt whose fence named such a change or hold as it refused, and on the dispatch and entered paths after every refusal to rebuild, as the waiting forms above do. A fence built with from_dispatch reports those waits on the call’s surface, without an operation id. Await it holding no lock or store transaction of your own. It answers every other refusal at once. This is shell synchronization: no machine input or owner fact changes. A custom WorkAuthorization reports a change in progress through owner_change_in_progress (provided; default None), a waiting hint that is never a permission. LocalAuthorizationPublication::change_in_progress names a published change of the local owners; the native work owner’s owner_change_in_progress also names a reservation of the publication’s writer held now, and the native run and audit wrappers forward it. meerkat_core::authorization::OwnerChangeChurn implements the bounded wait (OWNER_CHANGE_WAIT_BOUND 2 s, OWNER_CHANGE_FREE_REBUILDS 3); a tool that waits inside its body bounds it by ToolDispatchContext::remaining_tool_time. A host’s own pure observation of the work’s publication that is still stale after its one rebuild waits with OwnerChangeChurn::wait_after_stale_read, which pauses 1 ms first when no change is in progress as it starts (the change that made the read stale may have completed already). After a settled wait the host repeats only that observation, never an effect; see Survive owner changes in progress. Each wait is one debug event of target meerkat::authz::owner_change_wait with site, operation_id, waited_ms and settled, and each refused attempt keeps its own audit record. A delegate operation of a tool call takes that call’s waiting state from ToolDispatchContext::owner_change_churn, so its waits report as the call’s. To see what Core did with each refusal, install an OperationRefusalObserver with AgentBuilder::with_operation_refusal_observer or AgentFactory::with_operation_refusal_observer (0.9.4). It receives an OperationRefusalObservation per decided disposition: the session, the run and the refused operation; the surface (the model request, a tool call by its tool-use id, or a compaction summary); the outcome (the closed kind with its RefusalDispatch, read from the same value the model payload renders, or owners that could not decide); and the disposition (waited for an owner change, with how long and whether it settled; rebuilt; sent to the controller; returned as the tool result; skipped the compaction; failed the run). It is a diagnostic at decision time, not exactly-once across a crash: an operation reported as waiting or rebuilding may still fail afterwards. It is called synchronously on the deciding task and must not block, so hand observations to your own channel. Nothing of it enters the event stream, a wire type or any model context. Review outcomes and exact-control refusals (MCP attachments, tool applications, context controls) are not observed.

SDK error compatibility

The corrected SDK error contract in this release exposes outcome_uncertain in ToolDispatchTerminalErrorKind across generated schemas and TypeScript, Web, and Python types. It is a dispatch/settlement classification, separate from the unchanged coarse WireToolErrorClass. Do not infer its meaning from an HTTP status or the generic internal class. Update exhaustive Rust/TypeScript handling and closed response validators, including validators for settlement_failures, when adopting that contract. Keep runtime, schema, and SDK pins aligned. Updated readers retain the existing named encodings, but older closed readers can reject the new value; the literal other is not an unknown-value fallback. Do not convert an unrecognized value into success, denial, or permission to retry. A compatible version handshake alone does not establish that a client can decode every new enum value. The correction preserves released Rust enum ordinals and updates the closed TypeScript and Python validators.

Preserve restrictions across respawn

Since 0.9.4 a respawned local member keeps the restrictions it was spawned under. MobHandle::respawn, respawn_with_successor_spec and the mob_respawn tool give the successor the predecessor’s launch tool access policy and inherited tool visibility ceiling, as the predecessor’s session recorded them, intersected with the successor’s own. A successor spec or a SpawnMemberCustomizer can narrow them, never widen them; a host that means to widen them retires the member and spawns a new one. The successor keeps the auth binding the predecessor’s session recorded only when its own spec names none and its profile resolves to the provider that binding was recorded for. A successor re-profiled to another provider, or to one that cannot be told, selects its own binding as a fresh spawn does. Since 0.9.9 the respawn of an identity entry’s member, and every MobHandle::respawn_member, keeps the member’s own session: the successor is built from that session as a restart builds it, under the restrictions the session recorded (see Respawn, rotation and scoped release). For a member with a local session, the successor’s profile and provider are resolved before anything is retired. The respawn is refused before retirement, and the member is kept, when the predecessor’s restrictions cannot be established, the successor’s profile cannot be resolved, or the member changes while they are read. The refusal is MobError::RespawnPredecessorRestrictionsUnavailable; it has no dedicated wire error code in 0.9.4, and on the wire its message reads respawn of member <id> refused: <reason>. This includes a member whose session was lost, for example a Broken member after a cold restart whose session store no longer has it: respawn no longer repairs it. A host that meets this refusal keeps the other members working and returns local feedback to the agent that asked for the respawn. A surviving profile name or session reference cannot reconstruct lost restrictions. Current limits:
  • A recorded binding that has since been removed from the realm configuration, or re-pointed to another provider, is not checked before retirement: the successor’s build then fails after the predecessor is retired (MobRespawnError::SpawnAfterRetireWithCause). Name a binding in a spawn customizer, or retire and spawn.
  • A peer-only member whose generation was never bound to a local session carries no session restrictions; its successor keeps the launch policy and ceiling its own spec inherits. The respawn of a placed (remote) member is unchanged.
  • A custom session service that wraps a built-in one must delegate MobSessionService::predecessor_tool_restrictions. Its default reports Unsupported, which refuses the respawns of that service’s members.
Explicit retirement and a fresh spawn are separate governed operations under current authorization and inherited restrictions. They do not recover lost predecessor authority, and an acknowledgement cannot make that authority unrestricted.

5. Retain a usable controller for admitted work

Resolve and pin the actual controller client during admission. A model name and credential reference alone are not a runnable client. Retain its selection with the native work, separately from the grant for tools and sources. Before ordinary revocation, route replacement, or credential removal, the real owners must determine whether unfinished work depends on that controller. Keep or atomically replace the route, or refuse the administrative change. Do not maintain a separate usage counter or silently stop the run. Explicit administrative stop remains a separate action. This continuity integration is a rollout gate, not something a host may assume from successful client construction. Retry only a grant revocation known to have stopped on contention without mutation, after the contention clears. Unavailable alone does not identify that condition. Audit failures do not authorize retrying an effect.

Model review requirements

Have the existing native policy owner select the requirement for each operation. Check policy coverage at activation and when adding dynamic operations; unknown coverage never implies R1. Enforce the requirement at the shared native boundary, including direct SDK entry. Reject an invalid configuration update without terminating already admitted work. Retain the candidate and its authenticated original-work association through the existing owners. Carry requester, executor, represented subject, ingress, selected account, and applicable mandates or policy edits from those owners, not model text. A copied reference or matching JSON cannot recreate a lost binding. Independent calls do not implicitly become an approved batch. Have each owner distinguish required material, genuine inapplicability, and unavailable context. Missing or unsupported facts are not inapplicability; required facts that cannot be supplied or disclosed produce typed unavailable review before reviewer transport. The action account comes from the action’s actual owner (review_action_account), not the reviewer’s credential route; an owner that does not implement it fails closed as unavailable. Keep this optional review-context work off the R1 path. The reviewer itself needs authorization for its actual model, processor, credential route, investigation tools, and information sources under that work context. Give the review a finite owner-selected deadline and retire expired attempts before fallback; a late result cannot authorize entry. Neither model allow nor human approval grants missing permissions or weakens confinement. Keep deny, escalate, and reviewer unavailable distinct. Missing necessary reviewer access or a failed review supplies no verdict. Route escalation or unavailable review to eligible human review only when that alternative is configured; autonomous profiles can return audience-safe local feedback instead. Pending human action also settles the affected operation locally while permitted siblings and queued work continue. Required audit-observation failure remains an infrastructure error, not a denial or ordinary reviewer-unavailable result. Human approval cannot repair that failure. Since 0.9.4 one owner change alone does not fail a model-reviewed (R2) call. When it lands during the review, at its verdict’s commit, or at the dispatch’s entry staging before the tool’s dispatcher runs, and the operation is still permitted at R2 with the same review material, the fenced dispatch re-prepares it and reviews it once more from the start, as a second attempt for the same tool_call_id; the earlier verdict is never used. Deciding to review again reads the successor’s material once through review_operation_context, so an owner sees one more read per superseded call. At most one re-review runs per call, only after an allow or a reviewer failure, and only with enough tool time left for a whole review deadline. A review observer can see a ContextChanged retirement followed by that second attempt (a second ReviewAttemptStarted audit record after the successor’s Prepared record): do not treat the retirement as the call’s final outcome. A second change, a denial or escalation, an expired review, a changed tier (human consent included), changed or unreadable material, and a change once the tool’s dispatcher is running settle as before. An owner change still in progress when the verdict is checked is waited out within the attempt’s review deadline (2 s at most). In the stock governed realm the review mandate follows the work’s actual requester (0.9.4). A reviewer reads it as the current mandate and a person sees it as the stock.review_mandate consent label. For an outcome bound with bind_host_outcome it states that the stock ingress requested the work, that no person did and that it is not the operator’s consent, that it runs under the operator’s grant-lineage mandate, and it attributes the event’s content to the ingress instead of asserting it. The texts for an operator’s prompt and a host-authenticated caller are unchanged. The requester a stock consent surface presents is the person the approval is presented to; the work’s own requester is in the mandate. The existing ApprovalService exposes request, get, list, and decide for approval audit records. These methods do not authenticate supplied actor identities or execute effects. Native R3 consent (since 0.9.0) is a separate authenticated decision and retained-action path: BoundOperationReview::with_human_consent(route, validity) installs the host’s HumanConsentRoute, ApprovalService::decide_consent records an AuthenticatedConsentDecision, and dispatch_retained_consent_attempt makes the fresh explicit attempt. For that integration, the host authenticates the decision event, checks current approver eligibility, and binds the presented facts to the exact retained candidate. An audit actor string is not an approval credential. Present the action, target, recipient, account, arguments, requester, agent, and expiry to an eligible audience. Return Approval required while other permitted work continues. Use the existing delivery and session owners to admit later authenticated decisions and wake the owning session. Delivery does not execute the retained action, replay it, or change its requester. On a later explicit attempt, resolve the retained candidate and complete host validation, preparation, and cancellation checks before consumption. Recheck current authorization and conditionally consume consent at the physical-entry boundary. Changed or lost bindings need fresh consent. An owner change that leaves the candidate unchanged does not, and neither does the end of a decision’s own validity window (an owner may grant a decision only a minute, and a human often takes longer): the consent’s own owners decide the same operation again, outside every owner lock, and their answer is taken as is. A fresh decision carries the owners’ own window; nothing of the old one is carried forward, so past a fixed owner deadline the fresh preparation refuses. The consent, pending or approved, stands while that decision keeps the binding, the review tier and the material the approval presented. Approval reads (get, list), an approval and its publication, and an attempt’s admission apply this one rule. Reads decide afresh only a decision that an owner publication change made stale, so polling never calls the owners for one whose own check refuses it, and nothing calls them while that check answers that they are unavailable. An attempt is handed only a current decision and spends the consent once with it. A changed tier or material withdraws the consent as ContextChanged; owners that now refuse the operation or its review material withdraw it as AuthorityChanged; at an attempt’s admission either one also refuses the attempt, with zero entry. A consent that moves into a resumed run keeps the action account its approval presented: the resumed run’s owners’ review material is taken over at the move for that account only (its mandate may name the run’s own requester), another account withdraws it as ContextChanged, their denial of the operation or of its material withdraws it as AuthorityChanged, and owners that cannot answer now (unavailable, or an owner change in progress) leave it parked: the resumed run’s boundaries move it afresh, without waiting, and its close withdraws what never moved. A rebind for an agent this process rebuilt that meets an owner change in progress is not ready, and the run’s next boundary rebinds it afresh. An owner change still in progress, owners that are unavailable, or a publication that keeps changing through three re-adjudications in a row decide nothing: reads return the consent unchanged, an approval records nothing and answers a retryable StoreUnavailable, and an attempt refuses as owner_unavailable and keeps the consent. A decline stands on no retained decision: it is recorded whatever that decision’s currentness, though like an approval it answers StoreUnavailable while the eligibility owner cannot say now. The approver’s eligibility evidence is kept with the approved consent and checked again at the spend. Evidence that an owner change made stale (related or not) is resolved again for the same approver and the approval as they decided it, and the question is then only whether that approver was revoked, or whether policy came to forbid them, since deciding: a natural expiry of the login they decided in is no revocation, and the consent keeps its own expiry. Only a refusal withdraws the consent (AuthorityChanged, zero entry): a revoked approver, or a self-approval the host’s policy no longer permits, never enters. A route whose eligibility owner can be mid-change implements HumanConsentRoute::eligibility_answer (over a local publication, PublishedConsentEligibility::observe_answer): an owner that cannot say now (ConsentEligibilityAnswer::Unsettled) decides nothing, so a decision answers StoreUnavailable and a spend keeps the consent. A route that resolves eligibility with PublishedConsentEligibility::observe and keeps the default eligibility_answer answers such a change as a refusal, which withdraws an approved consent at its spend. Nothing enters on a decision that is not current: an attempt whose decision or eligibility evidence went stale after its own staging refuses as owner_unavailable and keeps the consent for a retry, and a run’s own attempt then counts as not made, unless it spent the consent (an entered effect’s own result is its outcome). A change during the spend’s own store write still consumes the consent, with zero effect. Approval reads and decisions therefore run the host’s prepare and review_operation_context (and, at a decision, a publication or a spend, the route’s eligibility) on the caller’s thread, outside the approval owner’s locks: a host must not hold a lock its owners take while it reads or decides approvals, and each re-preparation is audited as a preparation. A retained call that a dispatcher this process rebuilt resolves again keeps its consent only as the same durable execution: the same call, tool declaration, execution mode, operation targets and R3 decision. A failure known to precede the consumption commit leaves otherwise-valid consent spendable; an ambiguous commit result must be resolved through the same owner before reuse. After a committed use, cancellation or failure does not refund it. Reconciliation or applicable operation idempotency is required before repeating an uncertain effect; fresh consent alone does not establish non-delivery. An audit record cannot recreate executable consent. Test presentation, delivery, and sink integration before advertising this workflow. Spendable consent lives in memory: a restored consent record is history only. An old Pending or Approved row does not restore the original retained action, even when it has no consumed_at. A real human denial remains Denied; closing the original run or withdrawing its authority is a separate withdrawal. A new service refuses an old reference; it does not resume the interrupted run or deliver its decision. Several services may open the same approval store. A service that opens it reads consent rows as history: an empty set of retained candidates proves only that this service holds none, not that the issuing owner lost custody. Such a reader withdraws nothing. A decision through it is refused before any commit, and an attempt through it reports the owner as unavailable rather than consent as missing. Decide and attempt through the live issuing owner. An attempt through a service that did not issue the consent, including one that names consent approved before a process restart, reports the owner as unavailable (OwnerUnavailable) only when the approval is Pending or Approved, its consent is neither spent nor withdrawn, and the service holds no candidate for it. A spent, withdrawn or denied row keeps its usual outcome. That says only that this service holds no custody for the approval. It does not report that another owner is live or that the issuing process stopped, and it does not mean a remote decision path exists. It is not transient in that service, so a host should request fresh consent rather than retry. Through the issuing owner, OwnerUnavailable also answers an attempt or a spend that owner could not settle now (it was held, the held decision could not be decided afresh, the attempt’s decision or the approver’s eligibility evidence went stale after the attempt’s staging, or the eligibility owner could not say): the consent is kept, and a retry decides afresh. A consent approval issued in a run that the runtime staged on a store with cross-process hosting claims records a passive owner scope: the store’s hosting domain and the run’s session. It is identity data for later recovery, never authority or custody: the owner’s own transitions keep it, but the stored row is not tamper-proof, and later recovery checks the actual hosting claim rather than trusting it. Approvals issued without it, such as those of a sessionless host, behave as described above. Decisions reach the owner through ApprovalService::decide_consent on the same service the host passed to its operation review composition. The stock REST server, and rkat-rpc serving an ordinary realm, install no operation review and no human route, so they create no native consent approvals and offer no consent decision method. rkat-rpc serves a governed realm only as governed JSONL over stdio. When the realm configures review rules, rkat-rpc composes the realm owner’s operation review for that pipe, with the pipe’s operator as its R3 human route. The pipe then delivers consent notices and decides through approval/consent_decide; see R3 human consent on a stock governed pipe. An embedding host that installs a human route calls decide_consent directly. An embedding host whose own transport authenticates the actual human decision event can route it through the RPC router instead. Its trusted adapter builds an AuthenticatedConsentEvent: the AuthenticatedApprover, carrying the event’s HostAuthenticationScope (the exact login or session), together with the approval and the decision. The adapter passes it with an approval/consent_decide request to MethodRouter::dispatch_with_consent_event.
  • Plain dispatch has no route to that method.
  • The request may only name the approval and the decision, and both must equal the event’s. An approver, actor, assurance, login or reason in the body is an invalid parameter.
  • The host route’s eligibility receives the approver with its authentication scope. The host must refuse an event from a revoked login even while another login of the same person is live. Revoking a login must advance the publication that the returned evidence checks, so a decision already in flight from that login is refused at commit. After the decision, the route is asked again, for the approval as decided, whenever that evidence went stale: answer then whether the login was revoked (logged out, replaced or retired) or the approver is forbidden since, not whether the login is still within its own expiry.
  • The constructors of the approver and the event authenticate nobody. They record what the host adapter established, and the adapter supplies the current login scope and eligibility, including logout and revocation.
  • The approval records who decided in consent.approver: the approver’s qualified principal (kind, trust domain and id), its assurance, and authentication_scope_digest, the digest of the event’s authentication scope (HostAuthenticationScope::digest: sha256: and the lowercase hex SHA-256 of its text), never the scope itself. HostAuthenticationScope::digest is an unsalted SHA-256: name a high-entropy scope that is not itself a credential. decision.actor is the principal’s id alone, so read consent.approver.principal to tell apart two trust domains that issue the same id.
  • The router’s runtime must use the approval service the host gave its review composition, because only the issuing owner holds the candidate.
Revoking allowances that were published earlier, for example on logout, stays with the host’s existing publication and withdrawal path. The stock servers build no such event. An embedding host delivers consent notices into the owning session by composing ConsentNoticeProjector into its delivery owner (SessionServiceDeliveryHost::with_consent_notices). Each Approved, Denied or Withdrawn notice is admitted as a resume of the run that issued the consent, and the approval records its receipt: Admitted for the input that carries it, or Failed for a notice that can never be admitted. Approved consent parked at that run’s close moves into the resumed run its notice starts, and that run can spend it once; a Failed notice withdraws it. A consent notice waits in the session’s queue for its next turn, so a graceful requeue stop of the session (UnregisterQueuedInputs::Requeue) no longer ends it; whether the run it resumes after the next start can take the consent over follows the resume rules below. The governed composition admits a resume only through its retained-resume owner: the stock governed composition installs one, and a custom composition supplies its own (ScopedGrantComposition::with_retained_resume). Without one, no notice is admitted: each stays owed, or fails once a later binding of its session has moved its run’s destination. On a stock governed realm, an approval resumes the parked run only while the session keeps the registration that ran it and no later governed prompt has moved that session’s destination. After such a prompt, whichever controller it used, the notice fails visibly. After the session is closed and reopened in the same process, the notice stays owed until the session’s destination is next bound, and then fails visibly. The stock servers compose no notice delivery of their own. A notice, or any other admitted resume of retained work, that a graceful requeue stop kept, or that a restart found in the store, comes back without its controller client: a client never survives the store. The runtime asks the host for it again through NativeWorkAuthorizationHost::authenticate_retained_resume (on a scoped composition, through RetainedControllerOwner::reacquire_controller):
  • The call gets the stored input, with no ingress context and no retained-resume grant, and the runtime does not check the original contributors against its ledger again first: validate what the answer needs through your own owners. A resume whose destination its session has since superseded is refused before the host is asked.
  • It is asked once when the registration recovers the input, then from the runtime loop: once at the loop’s next pass while the input is not held, and once per pause of 3 seconds while the runtime machine holds it (an input held at recovery is next asked after the pause). The loop asks while it holds the session’s turn boundary, queue authority and driver lock, and recovery while it holds the driver: answer from the host’s own records, without calling back into the runtime or waiting on a credential publication. Only a runtime loop asks again, and a registration runs one only once an executor attaches: until then, a held input is not asked again, its bound does not end it, and the refusals below last.
  • Supply the client to run the resume. Answer Readiness(UnsupportedScope) (a controller owner: Ok(None)), or an actual verdict, when you will never supply it: the input ends at once as a refused resume (Abandoned { ResumeRefused }) with its runtime-termination receipt, a run left open that it is bound to is settled the same way, and a consent the notice carries is withdrawn.
  • Any other Readiness answer says you cannot say now. The machine holds the input: it keeps its attempts, later queued work runs first, and a run left open that it is bound to does not resume, which holds every other run of the session too. Once 30 seconds have passed since its first such answer, the next such answer ends it as a refused resume.
  • While such an input waits without its client, the runtime refuses controller grant changes, credential publications (logins and token commits) and auth lease releases and replacements on every session it serves.
  • On a host that requires scoped destinations, a kept resume also waits until the registration owner binds its destination again, and so does a run left open that it is bound to: that run then resumes under the destination its inputs were staged for. A bind does not wake the runtime: after binding on a registration whose executor is already attached, wake it (MeerkatMachine::wake_runtime_if_active_inputs), as for any recovered governed work that waits for its destination.
The stock governed composition’s controller pins do not outlive their registration, so a kept notice there cannot run after a registration change: it ends refused at once, and its consent is withdrawn. A governed prompt that a requeue stop kept, or that a restart found, cannot run again: only a fresh authentication of its caller could supply its client. Each attachment ends such an input as a refused resume, with its runtime-termination receipt, before it serves; submit the prompt again. Reusable consent applies only to a requirement that owner policy explicitly makes reusable, with a defined scope, use limits where bounded, expiry or an explicit until-revoked lifetime, and revocation. It cannot waive R3 or an unresolved R2 escalation. Temporarily changing a review tier is a separate, scoped policy edit through the existing policy owner, with its own administrator authorization and expiry. Present the action approval and policy change separately; eligibility to approve does not confer policy-edit authority.

Mandatory hook migration

Since 0.9.0, unsupported mandatory hook configurations are rejected before activation (Config::validate) and before run admission (AgentError::HookConfigInvalid), and the model_operations field scopes a mandatory model-request hook. Before activation, reject any mandatory model-request hook configuration that would also gate the feedback request needed to report its own refusal. Apply this check to the effective configuration, including per-run overrides and replacement engines. Report unsupported configuration; a rejected update must preserve the previous valid configuration and already admitted work. The default remains model_operations = "all". An affected configuration stays invalid until the policy owner explicitly selects model_operations = "ordinary_only" or changes that configuration. This choice limits that prerequisite to ordinary model requests and permits a separately authorized controller request to explain the refusal. Never silently skip a mandatory hook or convert Guardrail to Observe. Feedback does not waive the original prerequisite. Give each request its own purpose. A feedback request can explain what was withheld while permitted work continues; later ordinary requests through the same controller must still pass their mandatory hooks. A feedback failure must not start another feedback loop. Mandatory RunStarted and TurnBoundary hooks are rejected before activation and admission (HookTopologyError::UnsupportedLifecycleGate): per-item boundary withholding is not yet supported. Remove such a gate, move its policy to a supported point, or change it to observe and accept that observe enforces nothing; silently skipping these gates is not a migration. Describe outcomes at the actual boundary. PreLlmRequest can withhold the model request. PostLlmResponse runs after the provider call and possible streamed output or provider-native effects. A refusal there can withhold subsequent local tool dispatch and authoritative assistant commit; it cannot undo those earlier effects. Do not expose rejected raw output in ordinary feedback.

Process confinement

Choose explicitly between host-trusted execution and a required mechanical profile. Required confinement includes the actual filesystem, network/IPC, environment, and inherited descriptor limits. A missing backend or unsupported requirement refuses that launch; it never retries without confinement. Native hosts can select the shell requirement with AgentFactory::with_shell_confinement(ShellConfinement::Required { requirement }) when enabling shell tools. Each automatic agent build inherits that host requirement into its own dispatcher. The compatibility default is ShellConfinement::TrustedHost. A session request or recovered job does not select a weaker requirement. This configuration applies to shell tools. The stock hosts (rkat, rkat-rpc, rkat-rest and rkat-mcp) select the shell, command-hook and MCP stdio requirements from the [confinement] config section or their --confinement flags and install them through these factory settings; see OS process confinement. AgentFactory::with_command_hook_confinement binds required confinement through the native command-hook owner; with_host_confinement installs a stock host’s resolved shell, command-hook and MCP stdio requirements together. These are the launches required confinement covers; another subprocess owner needs its own boundary. At host setup, validate the backend’s real capabilities and compile supported policy for the configuration generation. Bind exact command inputs at launch through the existing process owner. Protect the runtime’s credentials, stores, control endpoints, and shared bootstrap installation from every confined writer. A profile protecting only its own helper can leave another profile’s helper replaceable. Do not claim this is solved by a path check alone. Use actual OS probes with successful allowed operations and blocked forbidden operations. Cover foreground commands, background jobs, recovered monitors, MCP and other subprocesses, and differently authorized agents. Existing containers count only for the isolation they really provide. A shared pod, proxy environment variable, or shell working directory is not automatically the required boundary. Untrusted in-process native plugins remain outside that protection.

Migrate an existing application

  1. Inventory actual operations and trust boundaries: model accounts, tools, sources, peers, stored-resource access, schedules, and outbound routes.
  2. Reuse existing identity and resource owners. Add explicit grants and represented subjects where needed; do not infer them from agent ownership or OAuth access.
  3. Wire one complete admitted-work path through the real dispatcher and audit owner. Prove a denied body is never entered and an allowed sibling completes.
  4. Cover every alternate path you expose, including hosted tools, retries, compaction, live/audio, browser/WASM, callbacks, and scheduled or delegated work.
  5. Validate controller continuity, failure propagation, durable recovery where claimed, and the separately selected consent/confinement workflows. Measure the complete added cost before broad rollout.
Existing histories need no semantic relabeling or fabricated provenance. Keep their actual resource ACLs and retention rules. A trusted embedded deployment remains an explicit choice; migrating some paths does not make unguarded paths governed. For an optional gate agent, give the publishing capability only to the intended gate route. Include indirect publication queues, peers, network-capable tools, and hosted capabilities in that route inventory. Keep the original requester on queued work, and keep human consent independent from the gate’s model judgment.