AI Engineer World's Fair 2026

You Didn't Ship a Bug. You Just Wrote It for a Human.

Loading slides…

Read the talk

You Didn't Ship a Bug. You Just Wrote It for a Human.

A harmless timestamp update reveals a deeper architectural problem: agents need their own identities, authority tied to specific users and tasks, and deterministic controls on every action.

From a talk by Ravi Madabhushi

Before you start: Familiarity with API credentials, OAuth scopes and agent tool calls will help you follow the authorization examples.

The timestamp assumption that broke

Scalekit's latency was spiking every 15 minutes, Ravi Madabhushi reports. The pattern was regular enough to investigate, even though it was not causing a harmful incident.

A red line chart shows four recurring spikes above a dashed alert threshold, beneath the heading “Every fifteen minutes, the database strained.”Open full source frame
Every fifteen minutes, the database strained.

The cause was an ordinary piece of identity infrastructure: a per-user timestamp recording when someone was last seen or last active. Updating it helped distinguish active users from inactive ones. But the implementation assumed a human pace of activity. As agents began hitting the APIs over roughly the preceding year, that assumption stopped holding. Ravi reports that agent traffic drove last-seen timestamp updates 60 times faster than human traffic, putting unnecessary pressure on database writes.

The fix was small: batch updates at second-level granularity instead of writing on every action. The more consequential question came afterward. If a harmless activity timestamp encoded the wrong assumptions about agents, what assumptions were hiding in authentication and authorization? An API can behave exactly as designed and still be designed for the wrong kind of actor.

0:200:33
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:20 · section reference included

Why agents inherit excessive permissions

Ravi Madabhushi, a Scalekit co-founder, approaches this problem through identity infrastructure. He reports a decade working in identity and authorization, including building a Freshworks identity platform used by millions of daily users. Those systems primarily served humans—or machine clients whose behavior humans had written into programs.

The newer pattern is an agent gathering context from Salesforce, Databricks, HubSpot or Notion to carry out a job. Across the customer agents his team encounters, Ravi sees permissions and scopes that exceed those jobs. His diagnosis is not careless development: connecting an agent to useful data has become a default workflow, while the available permission primitives often cannot express the narrow authority the job actually requires.

1:562:10
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

1:56 · section reference included

The two inherited identity models

Existing applications commonly offer two places to put a caller's identity:

ModelCredential or access pathIdentity attached to actions
Human userWeb or mobile session; personal script with an API keyThe user
Service accountCredentials issued to a machine accountThe machine account

In the first model, a script effectively carries the user's identity into the application. In the second, the machine receives an identity and permissions of its own. Ravi names SPIFFE and OAuth as existing infrastructure in this space. They address different layers: SPIFFE supplies workload identity and authentication, while OAuth provides an authorization framework; workload identity alone does not enforce application permissions.

The shared assumption in Ravi's account is that whoever authenticates is also the actor. A password establishes continuity with a registered human identity, and subsequent actions attach to that identity. API keys, web session tokens and service-account credentials similarly connect requests to a known caller. He describes the inherited permission model as authority assigned at registration and reused on later actions. That is the architectural pattern under examination, rather than a requirement that all authorization systems keep permissions fixed forever.

3:193:37
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:19 · section reference included

Code inspection supplied part of the safety argument

Broad permissions were easier to justify when a human-written program constrained how those permissions would be used. An API key might collapse actor and principal into the same identity; delegated access could instead limit a program to permissions the user had consented to. In either case, developers could inspect the code to understand the intended actions.

Ravi calls this staying in one's lane: a deterministic program follows the behavior its developer encoded. Determinism is not itself a security guarantee—bugs and unintended behavior remain possible—but inspectable control flow supplies a reviewable account of how authority will be exercised.

Two numbered cards state “It acts as itself: principal = actor” and “It stays in its lane: deterministic,” with password, API Key, session, and Service account labels.Open full source frame
Two assumptions behind broad access: principal equals actor, and programs stay deterministic.

He uses Google's review process for applications requesting sensitive access as an example of that reviewable boundary. The precise distinction matters: Google's sensitive-scope verification is not identical to a third-party security assessment, which its guidance associates with certain restricted-scope uses. The relevant architectural point is that an application can be reviewed for how it handles the access it requests.

5:095:26
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

5:09 · section reference included

Separate the principal from the actor

An agent reading someone's Gmail or accessing their Salesforce records introduces two parties that need to remain distinguishable. The principal is the user on whose behalf the work happens; the actor is the agent performing it. Ravi reports that incomplete OAuth support in the systems his team encounters often obscures this relationship. If the agent simply uses the user's credentials, the application may not be able to distinguish delegated activity from the user's own actions.

The second break is behavioral. An agent's action sequence can change on the next run, so yesterday's successful execution does not establish what it will do tomorrow. The identity choice then becomes consequential: give the agent a distinct identity and let it act on behalf of a user, or let it act as that user. Ravi points to an OAuth client_id for identifying the client; technically, that identifier names a client registration, is not sufficient authentication by itself, and does not establish a separate identity for every execution.

Acting on behalf of someone preserves a relationship that impersonation hides. The same agent may work for several users, but its permissions must depend on which user authorized the current work. OAuth provides the foundation through user consent to specific scopes: authority to perform certain operations, rather than unrestricted authority inherited from the user.

6:326:51
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

6:32 · section reference included

The tool surface must reflect authorization

That user-specific authority often disappears when an agent receives its tool context. Ravi reports that most MCP servers his team has worked with do not limit that context according to the user who authorized the agent. They expose all tools the user can access—or even every tool the application supports—and leave the agent to choose. This describes the deployments his team encountered, not a requirement of MCP.

The resulting failure can happen before an unauthorized operation executes: the agent sees the wrong tool, selects it and attempts the wrong action. A runtime authorization check may block the call, but the agent still received the same tool surface regardless of whom it represented. Tool visibility and execution permission are separate boundaries. Narrow discovery to the authorized task, while retaining enforcement at invocation; hiding a tool is not a substitute for checking access when it is called.

8:268:43
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

8:26 · section reference included

Make authority narrow, temporary and enforceable

The first requirement is to keep the agent's own identity bound to the principal it represents. The second is to express authority more precisely than a broad operation-level scope. Permission to send email on a user's behalf leaves several important questions unanswered:

  • Time: During which hours may the agent act?
  • Read access: From which senders may it read messages?
  • Write access: To which recipients may it send messages?

These constraints describe the job more accurately than a single yes-or-no permission to use email.

Authority should also last only for the period of work and cover only the tools required by that work. A policy check can remain deterministic even when the agent's choice of action is probabilistic. For example, an application could evaluate a proposed email against a trusted grant before permitting delivery:

typescript

type EmailGrant = {
  actorId: string;
  principalId: string;
  tool: "send_email";
  validFrom: number;
  expiresAt: number;
  recipients: readonly string[];
};

type ProposedEmail = {
  actorId: string;
  principalId: string;
  tool: "send_email";
  to: string;
};

function permitsEmail(
  grant: EmailGrant,
  proposed: ProposedEmail,
  now: number,
): boolean {
  return (
    proposed.actorId === grant.actorId &&
    proposed.principalId === grant.principalId &&
    proposed.tool === grant.tool &&
    now >= grant.validFrom &&
    now < grant.expiresAt &&
    grant.recipients.includes(proposed.to)
  );
}

Here the grant comes from the authorization system, and the actor and principal must come from validated request context, not identities asserted by the model. The function decides whether a proposed operation is permitted; it does not send the email.

This moves the safety boundary away from confidence in the agent's future behavior and into enforced policy. Ravi's prescription is attribute-level, context-level and principal-level scoping, with least privilege by default. When a task genuinely needs more authority, the agent should request just-in-time authorization for elevated scopes rather than start with every permission it might eventually use.

Agent and user boxes are joined by “on behalf of” and “BOUND. SCOPED. AUDITABLE.” Four labels specify enforcement every call, user scope, task scope, and least privilege by default.Open full source frame
Bind the agent to the user it acts on behalf of, with scoped access and least privilege.
9:109:21
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

9:10 · section reference included

The actors are already agents

These controls address an existing operational problem. Ravi cites destructive agent behavior, including production database deletion, as a reason to build deterministic guardrails now. He does not identify a particular incident or its failure mechanism.

He also describes Ref.tools, a Scalekit customer whose product supplies context to coding agents, as having no humans as actors in this workflow. According to Ravi, the customer built OAuth scoping into that agent-facing product. The example shifts the design starting point: an API may primarily serve agents, so its identity and permission model cannot depend on treating agent access as an occasional extension of a human session.

11:0511:13
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:05 · section reference included

Know who acted, for whom and under what authority

Fine-grained control needs an equally precise record of its use. For every action, the system should be able to answer:

  • Actor: Which agent took the action?
  • Principal: On whose behalf did it act?
  • Authorizer: Who approved the authority?
  • Grant: What permissions were approved, and when?
  • Duration: How long was that authorization valid?

These are the facts needed to connect an operation to the permission that allowed it.

Visibility alone is insufficient if the system cannot deterministically prevent actions outside that authority. As Ravi puts it, “praying is not a strategy.” The architecture must both explain what an agent can do and control what it is allowed to do.

A slide asks whether you know and can control what your agent can do, with smaller text calling for deterministic control and stating “PRAYING is NOT a STRATEGY.”Open full source frame
Do you know what your agent can do right now, and can you control it?

OAuth is a useful starting point for that architecture. The remaining work is to enforce finer access controls around the particular user, task and operating context, while preserving the agent's own identity. An agent should act as itself, on behalf of a specific user, within authority the application can verify—not authority inferred from the hope that it will choose the right action.

11:3711:50
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

11:37 · section reference included

Resources

From the talk

Transcript download
Full transcript

Loading transcript…