---
title: How do you track delegation chains when one AI agent calls another?
url: https://opencontroller.lyzr.com/blog/track-delegation-chains-across-multiple-agents
published: 2026-11-16
updated: 2026-11-16
author: Lyzr
---

# How do you track delegation chains when one AI agent calls another?

**Carry the chain in two places: the access token and the trace. Each hop exchanges its token for a new one that names the original user as subject, the current agent as actor, and a narrower scope; the trace ID travels with every call. Then any action at hop three can be traced back to the user and to every agent in between.**

Single-hop delegation is covered in our post on [OAuth token exchange for AI agents](/blog/oauth-token-exchange-for-ai-agents). This post is about what changes when agents call agents. It is part of the [agent identity and delegation](/blog/ai-agent-identity-on-behalf-of-delegation) series.

## Why do multi-agent chains break normal audit?

In a typical multi-agent flow, a user asks an orchestrator agent for something. The orchestrator calls a research agent, which calls a data agent, which calls a database tool. Without deliberate design, three things go wrong:

- **The user disappears.** The data agent authenticates with its own service credentials, so the database log shows the data agent, not the person.
- **Scope grows instead of shrinking.** Each agent uses its own broad permissions rather than the subset the user granted.
- **Hops cannot be joined.** Each agent writes logs with its own request IDs, so an investigator cannot rebuild the path.

## What does RFC 8693 say about chains?

OAuth 2.0 Token Exchange (RFC 8693) defines an `act` (actor) claim. The token's `sub` stays the user. The `act` claim names the party currently acting for that user. A chain is expressed by nesting: the outermost `act` is the current actor, and nested `act` claims are prior actors.

The RFC is explicit about one limit. For access control, the token consumer should only consider the top-level claims and the current actor. Prior actors in nested claims are informational. That means nesting gives you an audit trail, not an authorisation model for every hop. Policy for "may the data agent act when the orchestrator started the chain?" has to live somewhere else.

A token at the third hop might carry:

```json
{
  "sub": "user:4821",
  "scope": "orders.read",
  "act": {
    "sub": "spiffe://corp.example/agents/data-agent",
    "act": {
      "sub": "spiffe://corp.example/agents/research-agent",
      "act": { "sub": "spiffe://corp.example/agents/orchestrator" }
    }
  }
}
```

IETF individual drafts, including work in the SPICE and WIMSE areas, propose richer actor-chain formats for agents. They are drafts, not standards, so design so you can adopt them later.

## How should scope narrow at each hop?

The rule is simple: a downstream agent may never hold more than its caller. Make it concrete per hop.

| Hop | Caller | Token subject | Allowed scope | Check performed |
|---|---|---|---|---|
| 1 | User → orchestrator | user:4821 | orders.read, orders.refund | User consent and role |
| 2 | Orchestrator → research agent | user:4821 | orders.read | Requested scope ⊆ caller scope |
| 3 | Research agent → data agent | user:4821 | orders.read (limit 50 rows) | Scope subset, tool allowlist |
| 4 | Data agent → database tool | user:4821 | orders.read | Row-level policy on user |

The authorisation server performs the subset check during each exchange. If an agent asks for a scope its incoming token does not hold, the exchange fails.

## How do you join the hops in logs and traces?

Tokens prove authority. Traces prove sequence. Use both.

1. **Propagate W3C Trace Context.** Pass the `traceparent` header on every agent-to-agent and agent-to-tool call so all spans share one trace ID.
2. **Record identity on each span.** Add the user subject, current actor and agent version as span attributes. OpenTelemetry's generative AI semantic conventions give a starting vocabulary for agent and tool spans.
3. **Log the token's `jti`.** Store the token identifier for each exchange, so you can show which token authorised which action.
4. **Cap chain depth.** Reject requests deeper than a set number of hops (four or five is common). Deep chains are usually loops or design errors.
5. **Write one audit record per side effect.** For any write, refund or send, record user, full actor chain, scope, tool and outcome together.

## What checklist proves the design works?

Before production, confirm each item:

1. A tool call at the last hop shows the original user in the tool's own log.
2. A downstream agent cannot obtain a scope its caller did not hold.
3. Revoking the user's session stops every in-flight hop within the token lifetime.
4. One trace ID returns the full path in your tracing backend.
5. Chain depth beyond the limit is rejected and alerted.
6. Agents never forward the user's original token; each hop exchanges it.

## How Opencontroller does this

Opencontroller provides delegated on-behalf-of identity and agent workload identity federation, and its registry records which agents, versions, tools and MCP servers exist and who owns them. Its Agent Gateway sits in the path of agent traffic, and it supports OpenTelemetry for traces. See [how to govern agent-to-agent calls](/blog/how-to-govern-agent-to-agent-a2a-calls) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Can agent B just reuse the token agent A received?**
It should not. Forwarding tokens loses the actor record and keeps the full scope. Each hop should exchange the token for a new one with itself as actor and a narrower scope.

**Do nested act claims let the API enforce rules on every prior agent?**
No. RFC 8693 says only the current actor is used for access control; nested actors are informational. Enforce chain rules at the authorisation server or gateway.

**How long should exchanged tokens live?**
Minutes, not hours. Short lifetimes limit damage if a downstream agent is compromised and make user revocation take effect quickly.

## Key facts

In multi-agent flows, keep the original user as the token subject and record each agent as actor. RFC 8693 expresses delegation chains by nesting act claims; the outermost is the current actor and only it is used for access control, nested actors are informational. Each hop should exchange the token for a narrower scope, propagate W3C Trace Context, and log user, actor chain and token ID per side effect.

## Related

- [How does OAuth token exchange work for AI agents?](https://opencontroller.lyzr.com/blog/oauth-token-exchange-for-ai-agents.md)
- [How do audit logs show which user an AI agent acted for?](https://opencontroller.lyzr.com/blog/show-which-user-an-ai-agent-acted-for-in-audit-logs.md)
- [How do you govern agent-to-agent (A2A) calls?](https://opencontroller.lyzr.com/blog/how-to-govern-agent-to-agent-a2a-calls.md)
- [More on Agent identity and access](https://opencontroller.lyzr.com/blog/cluster/agent-identity-and-access)
