Spawn Detection & Trace Propagation
While sub-agent detection works passively via traffic analysis, spawn detection actively identifies agent creation in MCP tool calls and propagates trace context through the agent hierarchy.Spawn Patterns
Quint ships with 8 built-in patterns that match tool calls indicating agent creation:| ID | Description | Tool Pattern | Confidence | Spawn Type |
|---|---|---|---|---|
openai-handoff | OpenAI Agents SDK transfer | *transfer_to_* | 0.90 | delegation |
generic-create-agent | Generic agent creation | *create*agent* | 0.85 | direct |
a2a-delegation | Agent-to-Agent protocol | *send_task* | 0.85 | delegation |
run-agent | Running another agent | *run*agent* | 0.85 | direct |
invoke-assistant | Invoking an assistant | *invoke*assistant* | 0.80 | direct |
delegation-flag | Delegation keywords in args | * (any tool) | 0.75 | delegation |
shell-agent-spawn | Shell exec launching agents | *exec* | 0.70 | fork |
subtask-spawn | Task decomposition | *task* | 0.65 | delegation |
Argument Scanning
Some patterns also check tool call arguments for keywords:- delegation-flag:
delegate,handoff,transfer,spawn_agent - shell-agent-spawn:
agent,assistant,claude,gpt,llm - subtask-spawn:
subtask,sub_task,child_task,delegate_task - generic-create-agent:
agent,assistant,model
Child Hint Extraction
When a spawn is detected, Quint extracts the child agent’s identity hint from:- Tool name patterns (e.g.,
transfer_to_research_bot→research_bot) - Argument fields:
agent,agent_name,agent_id,assistant,assistant_id,target_agent,delegate_to
Spawn Tickets
For cryptographically verified parent-child links, Quint issues HMAC-SHA256 spawn tickets when a spawn is detected.Ticket Format
Claims
| Field | Description |
|---|---|
pid | Parent agent ID |
pname | Parent agent name |
child | Child hint (extracted from tool call) |
d | Depth in agent hierarchy |
sc | Narrowed scopes for child |
tid | Trace ID for correlation |
st | Spawn type: direct, delegation, fork |
exp | Expiration (default: 5 minutes from creation) |
n | Random nonce (replay protection) |
Trace Context
Quint propagates trace context through two mechanisms:HTTP Header: X-Quint-Trace
X-Quint-Trace: a1b2c3d4-e5f6-7890.2
The trace ID is a UUID generated at the root agent. Depth increments at each spawn. This header is used in the forward proxy to link CONNECT tunnels to parent agents.
In-Band Field: _quint
For MCP stdio transport (where HTTP headers aren’t available), trace context is embedded in JSON-RPC params:
_quint field is stripped before forwarding to the actual MCP server.
In-Band Auth
The_quint field in MCP initialize params can also carry authentication:
Signal Flow
When a spawn is detected, the following happens:Pattern Match
The tool call matches a spawn pattern. A
SpawnEvent is emitted with the pattern ID, confidence, and child hint.Ticket Generation
An HMAC-SHA256 spawn ticket is created with the parent’s identity, narrowed scopes, and a 5-minute TTL.
Ticket Injection
The ticket is injected into the tool call’s
_quint field (MCP) or made available via X-Quint-Trace (HTTP).Child Verification
When the child agent connects, it presents the ticket. Quint verifies the HMAC signature and establishes the relationship with 1.0 confidence.
Correlation
The spawn signal is sent to the correlation engine, which merges it with any other signals (temporal, context, model divergence).
Streaming
The spawn event is published to the
agent.spawns.detected Kafka topic.