Blog

v0.3.2: Batch Approvals Without Losing Safety (Approve All, Safely)

Designing bulk approval controls that respect read-only tools, remain idempotent, and keep the operator in control.

9 min read
releaseuisafety

What Problem Do Batch Approvals Solve?

Once you add approval requirements, you inevitably hit a new problem: some tasks generate multiple write operations.

Example task: "Clean up the failed rollout and redeploy"

This might trigger:

  1. Patch a ConfigMap
  2. Restart a Deployment
  3. Apply a new manifest

Approving each individually is correct but tedious during an incident. Batch approvals address this—but the challenge is obvious:

How do you make "Approve All" safe?


What Are the Design Rules for Safe Batch Approvals?

Skyflo's batch approvals follow three strict rules:

RuleOnly approval-required tools
ImplementationRead-only tools are excluded from batches
RuleOrdered, visible execution
ImplementationYou see which tool is currently executing
RuleNo conflicting actions
ImplementationIndividual approve/deny disabled during batch

This makes "Approve All" less of a bulk button and more of a bulk workflow with clear boundaries.


Why Is Idempotency Critical for Batch Operations?

Bulk operations introduce edge cases that single approvals don't have:

Edge CaseApproval sent twice (network retry)
Risk Without IdempotencySame operation executes twice
Edge CasePartial execution (tool 2 fails)
Risk Without IdempotencyInconsistent state
Edge CaseUser cancels mid-batch
Risk Without IdempotencyHalf-applied changes

The Engine must ensure idempotent behavior:

  • Each approval request has a unique ID
  • Duplicate approval attempts are no-ops
  • Partial failures are clearly reported

Architecture principle: The UI can be fancy, but the Engine owns correctness. Idempotency is enforced at the Engine level, not the UI.


How Should Batch Approval Progress Be Displayed?

When batch approving, the interface should behave like a safe deployment tool:

Required UI elements:

ElementTotal pending count
Purpose"Approving 4 operations"
ElementCurrent step indicator
Purpose"Executing 2 of 4: restart deployment"
ElementPer-tool results
PurposeSuccess/failure status for each
ElementHalt on failure
PurposeClear indication if sequence stopped

This visibility prevents blind approvals. Users see exactly what's executing and can intervene if something looks wrong.


What Does a Safe Batch Approval Flow Look Like?

code
Agent: I need to perform 3 operations:
       1. ✎ Patch ConfigMap api-config (write)
       2. ✎ Restart Deployment api-server (write)
       3. ✎ Apply Service api-lb (write)
       
       [Approve All] [Review Individually]

User: [Clicks "Approve All"]

UI:   Executing 1/3: Patch ConfigMap api-config... ✓
      Executing 2/3: Restart Deployment api-server... ✓
      Executing 3/3: Apply Service api-lb... ✓
      
      All operations completed successfully.

If step 2 failed:

code
UI:   Executing 1/3: Patch ConfigMap api-config... ✓
      Executing 2/3: Restart Deployment api-server... ✗
        Error: ImagePullBackOff
      
      Batch halted. 1 succeeded, 1 failed, 1 not attempted.
      [Retry Failed] [Continue Remaining] [Abort]

Related articles:


FAQ: Safe Batch Approvals in AI Agents

What is batch approval in AI agents? Batch approval allows operators to approve multiple pending write operations at once instead of clicking approve for each individually.

Are read-only tools included in batch approvals? No. Batch approvals only include tools that require approval (write operations). Read-only tools execute immediately without batching.

What happens if one operation in a batch fails? The batch halts at the failure point. Completed operations remain applied, and the user can choose to retry, continue with remaining operations, or abort.

How do you prevent duplicate executions in batch approvals? Each approval has a unique ID. The Engine tracks executed approvals and treats duplicate requests as no-ops, ensuring idempotent behavior.

Schedule a Demo

See Skyflo in Action

Book a personalized demo with our team. We'll show you how Skyflo can transform your DevOps workflows.