alexcinovoj.devby TechTide AI
Back to AI notes
Pattern · AI agent testing

Pausing for human approval

I pause a run before actions that need approval and resume it only after a named person reviews the proposed payload. The pending state must survive a process restart. Approval is only useful when the reviewer sees and checks the action that will execute.

Short answer

How do I pause an agent for human approval?

I pause a run before actions that need approval and resume it only after a named person reviews the proposed payload. The pending state must survive a process restart.

Implementation

  • Model the run as a graph with suspend and resume points at every irreversible action.
  • Persist the suspended state so an approval hours later resumes the same run.
  • Show the approver the exact payload that will execute, not a summary of it.
  • Record approver identity, decision, and timestamp in the audit log.
  • Expire pending approvals rather than leaving runs suspended indefinitely.

What can go wrong

  • Sending a notification after the action does not provide prior approval.
  • A summarized payload can hide a parameter the reviewer needs to inspect.
  • A requesting service account can undermine independent review if it also approves the action.

Checks to try

  • Kill the process while a run is suspended and confirm it resumes correctly.
  • Confirm the approved payload byte-matches the executed payload.

Questions this pattern answers

How do I pause an agent for human approval?

I pause a run before actions that need approval and resume it only after a named person reviews the proposed payload. The pending state must survive a process restart.

What steps does this method use?

Model the run as a graph with suspend and resume points at every irreversible action. Persist the suspended state so an approval hours later resumes the same run. Show the approver the exact payload that will execute, not a summary of it. Record approver identity, decision, and timestamp in the audit log. Expire pending approvals rather than leaving runs suspended indefinitely.

How can I check the result?

Kill the process while a run is suspended and confirm it resumes correctly. Confirm the approved payload byte-matches the executed payload.

What can go wrong with this approach?

Sending a notification after the action does not provide prior approval. A summarized payload can hide a parameter the reviewer needs to inspect. A requesting service account can undermine independent review if it also approves the action.

Related projects

Related patterns

I explain this method here. Current service scope, prices, and terms are on TechTide AI.

Systems Decision Audit at TechTide AI