Durable Intent and Recovery for Agent Runs

Lesson 3 of 4

Require a Second Approver

Estimated time: 10 minutes

Require a second approver for high-risk actions

A single approval is one person agreeing with themselves. For an action that is hard to reverse, require two distinct approvers so no one actor can act alone, and keep the requester out of that set.

Separate the requester from the approver

If the requester can approve its own request, the rule collapses to a single confirmation with extra steps and protects nothing.

Give approvals a short life

An approval that waits forever is a standing permission. Give it a short life and require a fresh one when the action is finally run.

def approved(req, approvals):
    distinct = {a.actor for a in approvals if a.actor != req.actor}
    return len(distinct) >= 2

Record both identities

Log both approvers with the action so an audit can tell a real second review from a rubber stamp, and alert when one actor supplies nearly all approvals.