Johansen AI LogoJohansen AI Solutions
All Articles
AI EngineeringHITLSafetyGovernanceAutonomous Agents

When to Escalate: Designing AI Agents That Know Their Limits

The 'Human-in-the-Loop' architecture for safe production deployments

How to build 'Self-Aware' AI agents that know when to stop and ask for help. The mechanics of the escalation loop.

John K. Johansen

One of the most dangerous things you can do in 2026 is deploy a "stubborn" AI agent—one that will continue to try and solve a problem even when it is clearly out of its depth. This is how you end up with deleted databases and brand-killing social media posts.

In our lab, we’ve learned that the most important part of autonomous agent design isn't the execution loop; it’s the Escalation Loop.

We build our agents to be "Self-Aware." They must know their limits and know exactly when to ask for a Human-in-the-Loop (HITL).

The Three Triggers for Escalation

In our agents.md behavioral guidance, we define three explicit triggers for agent escalation:

1. The Ambiguity Trigger

If an agent reads a PRD and finds two conflicting requirements—or if a business logic decision requires a "subjective" choice—it must pause. An agent should never "guess" the intent of the human architect.

2. The Risk Trigger

We use Tool Allowlisting to categorize actions. Any action that is "destructive" or "irreversible" (e.g., dropping a table, deploying to production, contacting a high-value customer) requires a human "thumbs-up" before execution.

3. The Loop Trigger

If an agent tries to fix a bug and fails three times in a row, it is likely "hallucinating" a solution or missing fundamental context. We set a hard limit on autonomous iterations. After the third failure, the agent must escalate its reasoning logs to a human for observability and review.

The Mechanics of the Loop

We implement the escalation loop using our Kaigents platform. When a trigger is hit:

  1. The agent serializes its current State and Reasoning Log.
  2. It creates an Escalation Ticket in our HTAP dashboard.
  3. It notifies the Venture Architect via Slack.
  4. It enters a "Waiting" state, preserving its durable execution context.

Once the human provides the missing context or approval, the agent resumes exactly where it left off.

The Venture Architect's Perspective

Escalation is not a sign of failure; it is a sign of Governance.

An agent that asks for help is an agent that can be trusted with production workloads. By designing our systems with "Self-Aware" limits, we protect our business while still achieving 10x engineering velocity.

The future of AI is not "Hands-Off." It’s "Human-Led, AI-Augmented."


John K. Johansen is a leading advocate for safe, governed AI systems and the developer of the Kaigents escalation engine.

// want to go deeper?

I write about AI agents, startup engineering strategy, and building systems that let small teams do big things — without handing your IP to cloud providers.

Read more articles