What taint tracking means in an agent context
In an agent, content arrives from many places: the web, documents, email, and MCP tool outputs. Each source passes through a runtime layer that assigns a provenance label before the content reaches the model, so every item is tagged by origin as trusted or untrusted.
The label does not stay on the original item. It follows the content into model context, model outputs, and tool arguments, and the propagation rule also has to cover memory and agent-to-agent messages. The stages below show where taint is applied and where it is checked.
Where taint is applied and checked
- LabelContent entering context is tagged by origin: trusted or untrusted.
- PropagateLabels follow content into model context, outputs, and tool arguments.
- CheckThe runtime evaluates taint on each tool call before execution.
- DecidePolicy allows, blocks, escalates for approval, or restricts the call.
A concrete scenario: the injected email
Email is one of the sources an agent may ingest, and its content is labeled by origin like any other. If an email carries injected instructions and a later call to a privileged tool was influenced by that content, the taint label is still attached to the call when it reaches the enforcement point.
Policy then evaluates the call before it executes. Because the decision rests on provenance, it does not depend on whether the model recognized the email as an injection.
Policy decisions at the tool-call boundary
Tool calls are mediated by a single enforcement point that the model and agent code cannot bypass. At that point, policy can express its actions by tool sensitivity, agent identity, and taint state.
| Outcome | Effect on the call |
|---|---|
| Allow | The call proceeds to execution. |
| Block | A privileged call influenced by untrusted content does not execute. |
| Approve | The call is escalated for human approval before it executes. |
| Restrict | The call is limited to lower-privilege tools. |
Limitations and trade-offs
Taint tracking is only as complete as its labels and its enforcement point. Where derivation cannot be determined, the propagation rule must define what happens. Declassification, which removes a taint label, must be explicit, narrowly scoped, approved by a named owner, and logged. The requirements below describe what an architecture needs in place for these controls to hold.
Architectural requirements for adoption
- Every content source, including web, documents, email, and MCP tool outputs, passes through a runtime layer that assigns a provenance label before reaching the model.
- Tool calls are mediated by a single enforcement point that the model and agent code cannot bypass.
- A defined propagation rule covers model outputs, memory, and agent-to-agent messages, including what happens when derivation cannot be determined.
- Policy can express block, approve, and restrict actions by tool sensitivity, agent identity, and taint state.
- Declassification is explicit, narrowly scoped, approved by a named owner, and logged.
- Each tainted-call decision is recorded with enough detail for audit and incident review.