DEV Community

Building AI Agents That Ask Before They Act

zeeshan khan on October 26, 2026

I am tired of seeing "autonomous" AI agents that are anything but. If you have spent much time building with LLMs lately, you have seen the same p...
Collapse
 
suirindo profile image
asagiman •

The backend pending-approval state is the part I'd test first. A small negative case: approve recipient A and payload X, then change only the recipient or payload before resuming. The backend should reject the old approval before the tool call starts, even if the model still says it has permission.

I'd also separate plan approval from approval of the resolved operation, especially when an alias or lookup determines the final recipient. A repeated resume should have a defined outcome rather than create a second effect.

For contextual confirmation, who classifies an action as requiring approval: a host policy or the model proposing the action? A synthetic example of that decision boundary would clarify which guarantees your integration enforces and which remain instructions.

Collapse
 
zeeshan9958 profile image
zeeshan khan •

Great technical breakdown. You're touching on exactly why we build AI that "asks before it acts." Testing the race condition between state change and execution is critical for security. I’ll have the team look into enforcing that decision boundary. Appreciate the deep dive!

Collapse
 
suirindo profile image
asagiman •

Thanks, Zeeshan! Glad this is useful, and I appreciate you bringing it to the team.

One invariant I'd recommend testing: approval must be bound to the exact operation being executed, not just the agent's intention.

If the recipient, payload, or resolved target changes after approval, the backend should invalidate that approval before any side effect occurs. Retrying the same approved operation should also be handled without duplicate execution.

A small negative test could make this concrete: approve A/X, switch the recipient to B, then resume. Expected result: execution blocked, with host-side evidence that no tool invocation occurred.

We're exploring these kinds of verifiable execution boundaries in Agent Role Contracts (ARC), so I'd be interested in comparing approaches as your implementation develops.

Looking forward to seeing what your team finds!

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Great points. Separating plan approval from execution is key to our "ask before act" philosophy. We're working on exactly that kind of decision boundary—ensuring the model proposes, but the host policy enforces. Real-world edge cases like these are exactly what we are testing.

Thread Thread
 
suirindo profile image
asagiman •

Thanks, Zeeshan. That's exactly the boundary I think matters most: the model proposes, but the host independently enforces.

One edge case worth testing is approval drift.

Suppose a human approves a plan, but the target, arguments, environment, or underlying code changes before execution. The host should verify that the actual action still falls within the approved scope, rather than trusting the earlier approval.

I'd suggest testing three cases:

  1. An unchanged, authorized action proceeds without another approval.
  2. A material change invalidates the previous approval.
  3. Missing or ambiguous authorization evidence blocks execution with an explicit reason.

This is also an important direction we're exploring with Agent Role Contracts (ARC): making authorization boundaries verifiable while minimizing unnecessary human interruptions.

I'd be interested to hear how your host policy handles approval drift at execution time.

Thread Thread
 
zeeshan9958 profile image
zeeshan khan •

Exactly! That's the core philosophy we're building at GodEngine and AskShiva. Keeping that boundary—asking before acting—is what makes AI actually useful and not just noisy. Glad we're on the same page.