Which contextual signals are worth enforcing
Not every signal deserves a place in policy. The table below compares common context signals by how much weight they carry for enforcement.
| Signal | Value | When it works |
|---|---|---|
| Task scope | Strong | Strong when set by the orchestrator, not inferred from prompt text. |
| Delegating user | Strong | Strong when the agent cannot exceed the user's own entitlements. |
| Data sensitivity | Strong | Strong when resources carry reliable classification labels. |
| Session state and risk | Useful | Useful for step-up approval or revocation. |
| Time | Useful | Useful for scheduled or change-window work. |
| Network and location | Weak | Weak for cloud-hosted software actors. |
Failure modes and tradeoffs
Context-aware policy is only as reliable as the signals and enforcement points behind it. Watch for these issues:
- Weak signals. Network and location are weak for cloud-hosted software actors, so they should not carry the decision on their own.
- Client-asserted context. Trusted components should assert context rather than the model, and the tool gateway should validate context itself instead of accepting client-asserted claims.
- Gateway bypass. Downstream resources should keep their own authorization and short-lived credentials, so a bypass does not grant full access.
- Enforcement failures. Define a fail-open or fail-closed setting per tool, and default to deny.
Where to enforce decisions at the tool-call level
Separate the decision from its enforcement, and have trusted components assert context rather than the model. Each layer below has a distinct role.
Agent runtime or orchestrator
Attaches task scope, delegating user, and session identifiers to every outbound tool request.
Policy decision point
Evaluates the request against policy and returns allow, deny, or require approval.
Tool gateway or MCP server layer
Enforces the decision per tool and per argument. It should validate context itself instead of accepting client-asserted claims.
Downstream resource
Acts as a backstop with its own authorization and short-lived credentials, so a gateway bypass does not grant full access.
Audit pipeline
Records each decision with the inputs used, outside the agent's control.
Audit evidence and evaluation criteria for runtime enforcement
Use this checklist to evaluate whether a runtime enforcement approach produces usable evidence.
- Each decision record names the agent identity, delegating user, tool, and outcome.
- The record stores the context values and policy version used, so the decision can be reproduced.
- Denials and approvals include a reason, and approvers are recorded.
- Decisions can be correlated across a multi-step task or an agent-to-agent chain.
- Policies can be tested against recorded requests before enforcement, with a defined fail-open or fail-closed setting per tool.
- The tooling mediates MCP-based tool access and measures added latency per call.