Subtitle: How changing MCP servers, modified tool schemas, and silent permission expansion can turn a previously safe AI workflow into a production security incident.
I have started looking at AI agent reliability from a slightly different angle. We spend a lot of time discussing whether an agent makes the right decision, whether it uses the correct data, and whether it can recover when an API call fails. But there is another question that deserves the same attention:
What happens when the tool an agent trusts is no longer the tool it originally trusted?
Imagine building an AI assistant for an operations team. You give it access to an MCP server with three tools. One reads order details, another checks inventory, and the third retrieves shipment status. You review the available tools, approve their use, configure permissions, and test the workflow. Everything behaves as expected.
A few weeks later, the MCP server is updated. The tool named get_order_details still exists. The connection still works. Authentication succeeds. The agent sees a familiar tool name and continues using it.
But the implementation behind that name has changed. Perhaps the tool now returns additional customer information. Perhaps its input schema accepts a new parameter that enables a more powerful operation. Perhaps the tool description has changed in a way that encourages the model to use it differently.
Nothing in the agent's original approval necessarily tells it that the security assumptions have changed. This is the problem I want to explore. We often treat tool approval as a one-time decision. In a system where tools, schemas, permissions, and server implementations evolve independently, that assumption is dangerous.
The tool you approved may not be the tool you are calling
An AI agent does not interact with a tool in the same way a developer interacts with a fixed function in a traditional application.
A developer might import a function from a known package, review its implementation, lock its dependency version, and deploy it as part of a controlled release. An AI agent, particularly one using MCP, can discover tools dynamically, inspect their descriptions, and decide which one to call based on the context of a task.
That flexibility is useful. It is also a new trust boundary. Consider an MCP server exposing this tool:
{
"name": "get_order_details",
"description": "Retrieve order information using an order ID.",
"inputSchema": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
}
},
"required": ["order_id"]
}
}
The agent is allowed to retrieve an order using its identifier. The application might enforce a read-only permission, and the tool might return only the information required by the workflow. Now imagine that the server is updated and exposes this:
{
"name": "get_order_details",
"description": "Retrieve order information, customer contact details, and internal account notes.",
"inputSchema": {
"type": "object",
"properties": {
"order_id": {
"type": "string"
},
"include_customer_profile": {
"type": "boolean",
"default": true
},
"include_internal_notes": {
"type": "boolean",
"default": true
}
},
"required": ["order_id"]
}
}
The tool still has the same name. It may even be operated by the same organisation. But its behaviour and the data it can expose have changed.
This is not necessarily a malicious update. It could be a legitimate feature release. The problem is that a previously approved capability has silently become broader.
The agent may now have access to information that was never part of the original security review. This is why I would separate the three questions:
- Is this the tool we intended to connect to?
- Is this the exact version of the tool contract we approved?
- Does this particular invocation have permission to perform this particular action?
Those questions are related, but they are not interchangeable. A familiar name answers none of them reliably.
MCP makes tool discovery dynamic, so trust must be dynamic too
One of the useful characteristics of the Model Context Protocol is that clients can discover tools exposed by servers rather than requiring every integration to be hardcoded into the application.
A server can expose a list of tools and their input schemas. Clients can use that information to understand what operations are available. MCP also provides a mechanism for servers to notify clients when their tool list changes.
This is valuable for extensibility. A server can add a capability without requiring an entirely new client implementation.
However, dynamic discovery introduces a security question that traditional static integrations often handle differently: what should happen when the available capabilities change after approval?
Suppose an agent connects to an MCP server at startup. It discovers ten tools, loads their descriptions into its context, and begins processing requests.
Later, the server changes one of those tools. If the client never checks for changes, it might continue operating using an outdated understanding of the server. If it automatically accepts every new tool definition, it might accept a capability expansion without review.
Neither behaviour is a good security policy. The important distinction is between discovering a tool and trusting a tool. Discovery tells the client what the server currently offers. Trust determines whether the application is willing to allow the agent to use that capability.
A tool list is not an authorisation policy.
Tool names are not identities
One of the first changes I would make in an agent architecture is to stop treating a tool name as its identity. A tool named update_customer_record is just a label. Another server can expose a tool with exactly the same name and completely different behaviour.
Even the same server can change the implementation behind that name. For security purposes, I would identify a tool using a combination of attributes:
- The identity of the MCP server.
- The authenticated server endpoint or deployment identity.
- The tool name.
- The approved input schema.
- The approved output contract, where relevant.
- The version of the tool implementation or signed release.
- The capabilities and permissions granted to the tool.
This creates a much stronger identity model. For example, the application might maintain a trusted tool manifest:
{
"server_id": "orders-mcp-production",
"server_identity": "orders-service-prod",
"tool_name": "get_order_details",
"tool_version": "1.4.2",
"schema_fingerprint": "sha256:approved-fingerprint",
"allowed_capabilities": [
"orders.read"
],
"approval_status": "approved"
}
The fingerprint is illustrative, not a real digest. In a real implementation, it would be calculated from a canonical representation of the approved schema.
The point is that the application now has something concrete to compare against.
If the server returns a different schema, the application can detect that the tool contract has changed. It does not have to ask the language model whether the change looks safe.
That decision belongs to the security and policy layer.
Detecting a changed schema before the agent uses it
A schema fingerprint is a useful starting point. The application can serialise a tool schema into a deterministic representation and calculate a cryptographic hash. If the schema changes, the hash changes as well. Here is a simplified Python example:
import hashlib
import json
def schema_fingerprint(schema: dict) -> str:
canonical = json.dumps(
schema,
sort_keys=True,
separators=(",", ":"),
ensure_ascii=False
)
digest = hashlib.sha256(
canonical.encode("utf-8")
).hexdigest()
return f"sha256:{digest}"
The use of sorted keys and consistent serialisation matters. Two JSON objects with identical meaning should not produce different fingerprints simply because their properties appear in a different order.
However, this example is intentionally simple. A production implementation needs a defined canonicalization policy, including how it handles schema references, defaults, descriptions, omitted fields, and version-specific metadata.
It should also distinguish between changes that affect security and changes that do not.
For example, changing a spelling mistake in a description may not require the same response as adding a new parameter that exposes private information.
I would therefore keep two fingerprints where appropriate:
Contract fingerprint: Represents the complete approved tool definition, including descriptions and metadata that influence model behaviour.
Capability fingerprint: Represents the security-relevant aspects of the tool, such as accepted inputs, exposed data, side effects, and required permissions.
This distinction matters because descriptions are not harmless documentation in an AI system. The model may use them to decide when and how to call a tool.
A changed description can influence behaviour even if the input schema remains identical.
At the same time, a schema fingerprint alone cannot prove that the server's implementation is unchanged. A server can preserve its schema while changing what happens behind the API.
That is why schema verification must be combined with server identity, release provenance, runtime authorisation, and implementation controls.
A practical runtime verification layer
I would place a tool verification layer between the MCP client and the agent's tool execution interface. The agent can request a tool call, but the request does not go directly to the MCP server. Instead, the verification layer checks whether the tool is still approved.
The flow looks like this:
User Request
|
v
AI Agent
|
v
Proposed Tool Call
|
v
+---------------------+
| Tool Verification |
| |
| Server Identity |
| Tool Identity |
| Schema Fingerprint |
| Capability Policy |
+---------------------+
|
+-------+-------+
| |
v v
Approved Changed or
Contract Untrusted
| |
v v
Authorisation Block Call
Check Alert / Review
|
v
Input Validation
|
v
MCP Server
|
v
Result Validation
|
v
AI Agent
The important design decision is that the model does not control the verification result.
It can propose a tool invocation, but the application decides whether that invocation is permitted.
Here is a simplified implementation:
class ToolTrustError(Exception):
pass
class ToolVerifier:
def __init__(self, approved_manifest):
self.approved_manifest = approved_manifest
def verify(self, server_id, tool_name, schema):
key = f"{server_id}:{tool_name}"
approved = self.approved_manifest.get(key)
if approved is None:
raise ToolTrustError(
"Tool is not registered as trusted"
)
current_fingerprint = schema_fingerprint(schema)
if current_fingerprint != approved["schema_fingerprint"]:
raise ToolTrustError(
"Tool contract changed after approval"
)
if approved["approval_status"] != "approved":
raise ToolTrustError(
"Tool is not currently approved"
)
return True
The example deliberately fails closed. If the current contract does not match the approved contract, the tool invocation is blocked.
It is important to understand what this code does not do. It does not authenticate the MCP server, prove the server's implementation integrity, validate every input, or enforce authorisation at the resource level. Those controls need to exist separately.
The verifier is one part of the trust boundary, not the entire security architecture.
A changed schema should not automatically mean a malicious tool
There is an important balance here.
I would not want every harmless update to stop an entire production workflow. At the same time, I would not want a tool to gain new permissions just because the server owner added a field.
The answer is a controlled change-management process.
When the application detects a changed tool definition, it should compare the current contract with the approved version and classify the difference.
For example:
| Change | Possible security impact | Suggested response |
|---|---|---|
| Description wording changed | Model behaviour may change | Review and reapprove |
| Optional input added | May expand invocation behaviour | Block pending review |
| Required input changed | Existing calls may behave differently | Block and test |
| Output fields expanded | May expose additional data | Review data permissions |
| New write operation | New side-effect capability | Explicit approval |
| Server identity changed | Trust boundary changed | Reject connection |
| Implementation digest changed | Code provenance changed | Verify release and reapprove |
The exact classification depends on the application.
A change to a tool's description might be low risk in a tightly controlled workflow, but it should not automatically be ignored. A description can contain instructions that influence an agent's behaviour.
A new parameter might also be harmless if it only changes formatting. But if it enables access to internal customer records, it changes the security boundary. The important thing is to make that assessment explicit. I would not allow the language model to decide whether its own tool has become trustworthy. That is a circular security model.
The more dangerous problem: schema unchanged, implementation changed
This is where I think many implementations could develop a false sense of security. Imagine that the original tool has this interface:
def get_order_details(order_id: str):
return database.get_order(order_id)
The tool is read-only and returns the order associated with the supplied identifier. The server is then updated:
def get_order_details(order_id: str):
order = database.get_order(order_id)
audit_service.record_access(order_id)
return {
"order": order,
"customer_profile": database.get_customer(
order.customer_id
),
"internal_notes": database.get_internal_notes(
order.customer_id
)
}
The input schema has not changed at all. The tool still accepts one string called order_id. A schema fingerprint will not detect this implementation change.
The problem is no longer just tool discovery. It is software supply-chain trust. For sensitive MCP servers, I would combine schema verification with additional controls:
1. Server identity verification. The client should authenticate the server and verify that it is connecting to the expected deployment. TLS protects the connection, but the application should also establish the expected service identity.
2. Release provenance. Deployments should have traceable release versions and, where supported, signed artefacts or attestations. The client or deployment platform should be able to establish which approved build is running.
3. Capability enforcement outside the tool. A read-only agent should not become capable of accessing private records simply because a tool implementation starts returning them. The backend must enforce resource-level authorisation.
4. Output filtering. Results should be checked against the data classification and output contract expected by the workflow.
5. Change monitoring. A server release should produce an auditable event that can be compared with the approved deployment state.
The key principle is simple: the schema tells us what a tool claims to accept. It does not prove everything the implementation can do.
The permission problem is bigger than the tool description
I would also avoid giving an agent broad permissions simply because one of its tools needs a particular capability. For example, suppose an agent can retrieve order details and initiate refunds.
A poorly designed system might give the MCP server a general-purpose database credential and a payment API key with broad access. The tool interface might look harmless, but the underlying credentials could allow far more than the agent's approved workflow.
Instead, permissions should be enforced at the action level. For instance:
POLICIES = {
"get_order_details": {
"capabilities": ["orders. read"],
"effect": "read"
},
"reserve_inventory": {
"capabilities": ["inventory.reserve"],
"effect": "write"
},
"issue_refund": {
"capabilities": ["payments.refund"],
"effect": "financial"
}
}
Before executing a call, the application should verify that the authenticated agent has the required capability.
It should also check the resource being accessed, the user's authority, and any business constraints. A tool name is not a permission. A schema is not a permission.
A successful authentication handshake does not permit performing every operation exposed by the server.
This distinction becomes especially important when several agents share the same MCP server. A research agent may need read-only access, while an operations agent may need permission to reserve stock. They should not inherit the same capabilities just because they use the same connection.
Bind approvals to the actual action
There is another problem that appears when a tool invocation requires human approval.
Imagine an agent proposes a refund of ₹25,000. A person reviews the request and approves it. Before execution, the agent changes the amount to ₹75,000. If the system records only that the refund tool was approved, the approval may accidentally be reused for a different action. I would bind the approval to the actual invocation.
That means recording:
- The server identity and tool identity.
- The approved tool contract version.
- The exact resource being affected.
- The action parameters.
- The amount or other sensitive business values.
- The authenticated requester.
- The approval identity.
- An expiry time.
- A unique, single-use approval identifier.
A simplified approval payload might look like this:
{
"approval_id": "approval-8912",
"tool": "issue_refund",
"tool_version": "2.1.0",
"schema_fingerprint": "sha256:approved-fingerprint",
"order_id": "ORD-2048",
"amount": 25000,
"currency": "INR",
"approved_by": "finance-manager",
"expires_at": "2026-11-25T12:00:00Z",
"single_use": true
}
Before executing the refund, the application should compare the proposed action against the approved action.
If the amount, order, destination, or tool contract has changed, the old approval should no longer be valid. This is important because approval is not a general permission slip. It is authorisation for a specific action under specific conditions. The execution layer should also enforce the approval independently. It should not trust the agent to preserve the approved parameters.
What if the tool changes while the workflow is running?
This is a classic time-of-check versus time-of-use problem.
The agent might discover and verify a tool at the beginning of a workflow. Several minutes later, it might invoke that tool after the server has been updated.
A check performed at startup does not guarantee that the tool remains unchanged at execution time. For sensitive operations, I would verify the contract at the point of invocation.
The sequence should look like this:
- Discover the available tool.
- Compare its identity and contract with the approved manifest.
- Authorise the specific action.
- Validate the input against the approved schema.
- Check that the server identity and approved release remain valid.
- Execute the call.
- Validate the response and record the execution evidence.
For long-running workflows, the system should also define what happens when a tool changes between steps.
I would not automatically restart the entire workflow using the new contract. Nor would I silently continue using an old assumption if the server's implementation has been replaced.
Instead, the workflow should preserve the tool version and approval context under which it started.
If the new release is not compatible with that context, the next sensitive operation should stop until the system can establish that it is safe to proceed.
This is particularly important when the workflow contains irreversible operations such as issuing refunds, changing customer permissions, placing orders, or submitting financial transactions.
A tool update should not rewrite the security assumptions of an already-running workflow.
What should happen when verification fails?
I would use explicit states rather than returning a generic tool error.
For example:
| State | Meaning | System behaviour |
|---|---|---|
APPROVED |
Contract matches approved manifest | Continue policy checks |
UNAPPROVED |
Tool has no approved identity | Block invocation |
SCHEMA_CHANGED |
Contract differs from approved version | Quarantine and review |
SERVER_IDENTITY_MISMATCH |
Server identity cannot be verified | Reject connection |
RELEASE_UNVERIFIED |
Implementation provenance is uncertain | Block sensitive actions |
CAPABILITY_DENIED |
Action exceeds granted permission | Reject invocation |
APPROVAL_EXPIRED |
Human approval is no longer valid | Request fresh approval |
MANUAL_REVIEW_REQUIRED |
Change cannot be safely classified | Escalate |
The distinction matters operationally.
A schema change is not necessarily evidence of an attack. But it is evidence that the original approval no longer describes the current contract.
The system should record the observed version, the approved version, the reason for rejection, and the action that was blocked. The agent can then explain that the operation could not proceed because the tool contract changed. It should not be allowed to bypass the restriction by asking for another tool with a similar name.
Build a replay test for tool changes
I would not consider this security control complete until it can be tested automatically.
A useful test suite should contain at least four scenarios.
Scenario 1: An approved tool remains unchanged.
The server identity, tool schema, and approved release match. The tool invocation passes verification and continues to authorisation.
Scenario 2: A new optional parameter appears.
The tool retains its name but now accepts an additional parameter. The verifier detects the contract change and blocks the call pending review.
Scenario 3: The schema remains unchanged, but the server release changes.
The schema fingerprint matches, but the deployment identity or release provenance no longer matches the approved manifest. The system must not assume that the implementation is safe simply because the interface looks familiar.
Scenario 4: A previously approved tool attempts a broader action.
The contract may be valid, but the requested action requires a capability that the agent does not possess. The authorisation layer rejects it.
Here is a simple example using Python:
def test_approved_tool_is_accepted():
verifier = ToolVerifier(approved_manifest)
assert verifier.verify(
"orders-mcp-production",
"get_order_details",
approved_schema
)
def test_changed_schema_is_rejected():
verifier = ToolVerifier(approved_manifest)
try:
verifier. verify(
"orders-mcp-production",
"get_order_details",
modified_schema
)
except ToolTrustError:
return
raise AssertionError(
"Changed tool schema was accepted"
)
These are deliberately small examples. In a real test suite, I would use pytest, fixtures, explicit exception assertions, and integration tests against a controlled MCP server.
I would also test that a notification about changed tools invalidates the appropriate cached contract, that a server restart does not silently restore trust, and that a worker handoff preserves the approved manifest version.
One especially important test is this:
If the same changed tool is presented ten times, does the system consistently reject it until an explicit approval event occurs?
If the answer depends on which agent receives the request, or which worker happens to process it, the trust policy is not deterministic enough.
Tool changes should be auditable events
There is a final engineering detail I would not leave out: the audit trail.
When an agent is blocked from using a tool, the system should record enough information to explain why.
A useful event might contain:
{
"event": "TOOL_CONTRACT_REJECTED",
"server_id": "orders-mcp-production",
"tool_name": "get_order_details",
"approved_fingerprint": "sha256:old-fingerprint",
"observed_fingerprint": "sha256:new-fingerprint",
"approved_version": "1.4.2",
"observed_version": "1.5.0",
"workflow_id": "workflow-7831",
"agent_id": "order-assistant",
"decision": "BLOCKED",
"reason": "APPROVED_CONTRACT_MISMATCH"
}
This makes the decision reproducible.
It also helps distinguish a legitimate deployment from a suspicious change, a configuration error, or a compromised server.
I would keep these events append-only and correlate them with the actual tool invocation attempts. Sensitive credentials, access tokens, and customer data should never be written into the audit log.
The goal is not simply to know that a tool failed.
The goal is to know which contract the application trusted, which contract it observed, which policy it applied, and why the invocation was allowed or rejected.
The architecture I would actually trust
If I were designing this for a production environment, I would separate the responsibilities into four layers.
The discovery layer communicates with MCP servers and retrieves the current tools and schemas. It does not grant permission merely because a tool is discoverable.
The trust layer verifies server identity, approved tool identity, contract fingerprints, release provenance, and version compatibility. It compares observed information against a versioned trusted manifest.
The authorisation layer checks the agent's identity, user authority, resource-level access, action permissions, approval records, and business constraints. It evaluates the actual invocation rather than relying on the tool's description.
The execution layer sends the request, validates the response, records the execution result, and provides evidence for audit and recovery.
This separation prevents a common architectural mistake: allowing the language model to become responsible for both choosing an action and deciding whether the infrastructure is safe enough to execute it.
The agent should be able to propose. The policy layer should decide. The execution layer should enforce. And the audit layer should preserve evidence of what happened.
A practical checklist before deploying an MCP integration
Before I allow an AI agent to use an MCP server in production, I would want clear answers to these questions:
- [ ] Is the MCP server authenticated and bound to an expected identity?
- [ ] Is the approved tool manifest version-controlled?
- [ ] Are tool definitions compared against approved fingerprints?
- [ ] Are descriptions and metadata changes reviewed when they can influence model behaviour?
- [ ] Is implementation provenance verified independently of the schema?
- [ ] Are capabilities enforced outside the language model?
- [ ] Are credentials scoped to the minimum required operations?
- [ ] Are sensitive outputs checked against data-access policies?
- [ ] Are human approvals bound to exact action parameters?
- [ ] Are tool changes detected during long-running workflows?
- [ ] Are changed or unverified tools blocked by default?
- [ ] Are all verification decisions recorded in an auditable event history?
- [ ] Can the security tests reproduce the same decision across retries and worker handoffs?
Not every tool needs the same level of control. A low-risk calculator does not need the same release verification and approval workflow as a tool that can transfer money or modify customer permissions.
But the trust boundary should be explicit in both cases.
The bigger lesson: trust should expire when its assumptions change
I think we have spent a lot of time discussing how an AI agent should decide which tool to call. That is an important problem, but it is only half of the story.
A tool can be selected correctly and still be unsafe to execute.
An agent can follow its instructions perfectly and still operate against a changed interface, a broader permission set, or a different implementation than the one originally reviewed.
This is why I would not treat tool approval as a permanent property attached to a name.
I would treat it as a versioned security decision, tied to an authenticated server identity, a known contract, a verified implementation, and a defined set of capabilities.
When one of those assumptions changes, the application should reassess trust before allowing the next sensitive action.
The language model should not be expected to notice every security-relevant change in a tool description. It should not be asked to determine whether a new parameter is safe. And it should never be allowed to grant itself additional authority simply because a server exposes a new capability.
The most reliable design is one in which the agent can discover new tools, but cannot automatically trust them.
Because in production, the dangerous part is not always that an AI agent makes a bad decision.
Sometimes it makes exactly the decision it was designed to make, using a tool that is no longer what the system originally approved.
The tool's name stayed the same. The trust assumptions did not.
Top comments (221)
The get_order_details example is the sharpest part — same name, a new include_internal_notes parameter defaulting to true, and nothing in the original approval covers it. I'd push one step further: even a perfect schema fingerprint doesn't catch the case where the schema stays identical and the implementation quietly starts returning the customer profile anyway, which your own section admits. Do you think the practical answer is output filtering at the gateway, or is that just moving the trust problem one layer out?
I think output filtering at the gateway is necessary, but it shouldn't become the only line of defence. You're right that an unchanged schema doesn't guarantee unchanged implementation behaviour. A tool could start returning additional sensitive fields without any contract-level change. I'd use the gateway to enforce a deterministic response-field allowlist based on the approved operation and caller permissions, rather than trusting whatever the backend returns. But I'd combine that with server-side authorisation and resource-level access controls. The gateway limits what reaches the agent; the backend must still enforce what the tool is allowed to access. Ultimately, we're not eliminating trust; we're distributing enforcement across independent boundaries so that one compromised layer doesn't expose everything.
That's the right framing — you're not eliminating trust, you're distributing enforcement so no single layer failing exposes everything. The gateway allowlist catches exactly the silent-extra-fields case, and the backend auth catches the tool that was over-permissioned from the start. How do you keep the allowlist in sync with approved operations as they change?
I'd keep the allowlist versioned alongside the approved operation manifest rather than maintaining it as a separate configuration. Every approved operation should define its permitted input parameters, response fields and access scope. When the contract changes, the policy and allowlist should be reviewed and released together as one versioned unit. At runtime, the gateway checks that the operation's manifest version matches the policy version before filtering the response. If they drift, execution should pause rather than fall back to a broader default. This keeps the approval, permissions and actual data exposure tied to the same contract.
Pausing on drift instead of falling back to a broader default is the move that makes the whole scheme fail-closed — a version mismatch becomes a stop, not a silent widening. Tying the approval, the permissions and the actual data exposure to one versioned unit also kills the usual drift where the policy says one thing and the gateway enforces another. When execution pauses, does that surface to an operator, or does the agent just stall waiting?
I'd make it an explicit, auditable state rather than letting the agent simply stall. The operator should receive a clear alert explaining which version changed, what validation failed and why execution was paused. The agent can receive a controlled response such as
CONTRACT_VERSION_MISMATCH, but it shouldn't be allowed to bypass the check or retry with broader permissions. Once the change is reviewed and approved, execution can resume against the updated contract. The important thing is that uncertainty becomes visible to both the system and the people responsible for it.That's a stronger answer than either option I offered — making the mismatch an explicit, auditable state instead of a silent stall or a quiet retry. The part I'd underline is the no-bypass rule: once the agent can route around a failed check, the contract isn't a gate anymore. In your setup, does the operator review happen in the loop before execution resumes, or is it an async queue the agent waits on?
I'd favour an asynchronous review queue, with execution remaining paused until an authorised operator explicitly resolves the issue. This avoids blocking the entire system while ensuring the agent cannot bypass the decision. The review should capture the mismatch, the affected contract version and the reason for approval or rejection. Once cleared, the orchestrator can resume execution against the newly approved version. Importantly, the agent should only receive the outcome, not control over the review process. Human oversight should remain an independent authority, not another tool the agent can invoke to approve itself.
The last point is the one that matters most — oversight stops being oversight the moment the agent can invoke its own approval. An async queue with execution paused is the right shape, but it raises a practical question: who counts as the authorised operator here, and does the queue distinguish roles, or is any human with access enough to clear it?
I'd make authorization role-based rather than treating every human with system access as an authorised operator. The person clearing a routine contract mismatch may not need the same privileges as someone approving expanded data access or a financial operation. I'd define permissions based on the risk and impact of the requested change, with stronger approval requirements for sensitive actions, potentially including a second reviewer. Every decision should also be recorded with the operator's identity, role, rationale and timestamp. Human involvement alone doesn't guarantee oversight; the right person needs the right authority, and that authority must be independently verifiable.
Role-based is the right correction — my question was too flat about who counts as authorised. Risk-tiered approval with a second reviewer for the sensitive tier is the shape that actually holds up. The part I'd push on: does the audit record capture the role the operator held at decision time, or just their identity? A role change after the fact shouldn't rewrite what the approval meant.
That's an important detail. I'd capture both the operator's identity and their role, including the specific permissions and authorisation scope they held at the time of approval. Ideally, the audit record would also preserve the relevant policy version and approval timestamp. These details should be immutable, so a later role change cannot retroactively alter the meaning or validity of an earlier decision. An audit should explain not just who approved an action, but whether they were authorised to approve it at that exact moment. Otherwise, accountability becomes difficult to establish when something goes wrong.
That's the right standard — identity alone was never the question, authorisation at that exact moment was, and the policy version is the part most audits skip. The tension is cost: immutable, versioned records for every approval is real plumbing. Do you see teams actually building that, or does it stay a principle most settle for approximating?
I think we're seeing both, depending on the risk profile of the system. In lower-risk workflows, teams often approximate this with application logs and approval metadata. But for financial transactions, sensitive data access, or actions with regulatory implications, that approach becomes difficult to defend. The good news is that immutable auditability doesn't necessarily mean building an entirely separate infrastructure. A versioned approval record, policy reference, timestamp, operator identity and exact action payload can be captured as part of the existing orchestration flow. I'd start with the actions where accountability matters most and expand from there. The cost of recording a decision is usually far lower than the cost of being unable to explain why it was authorised.
The risk-tiered framing is the right one — starting with the actions where accountability matters most keeps this from becoming a second infrastructure project. One gap I'd still poke at: the versioned record captures the action payload that was authorised, but the drift in your get_order_details example is on the return side — the tool quietly returning more than was asked. Does your record also capture what came back, or is the return path still trusting the tool?
That's a fair point. Capturing the authorised payload is only half the accountability story. I'd extend the record to include the actual tool response as well, ideally with a timestamp, tool and version identity, response schema or contract version, and a hash of the returned data. The important part is not just storing the raw response, but validating it against the expected output contract before the agent can use it. If
get_order_detailsis expected to return an order ID, status and total, but suddenly starts returning additional customer or payment information, the gateway should detect that change and apply an explicit policy: reject the response, filter unexpected fields, or route it for review depending on the sensitivity.I'd also preserve both the original response and the validated response in the audit trail, with appropriate protection for sensitive data. That gives us a way to reconstruct not only what the agent was authorised to do, but also what information it actually received and what it was allowed to act on. So yes, the return path needs the same discipline as the execution path. A trusted tool should never mean an unrestricted response.
The original-plus-validated pair is the part I'd steal — it turns a drifted response into something you can actually reconstruct after the fact, not just notice. The open question for me is who owns the expected contract: if the provider changes the schema silently, the gateway is validating against a contract the provider already rewrote. Do you pin the contract on the consumer side, or trust the provider's versioning?
I'd pin the expected contract on the consumer side rather than rely solely on the provider's versioning. The provider's version is useful metadata, but it shouldn't be the authority for what the consumer is willing to accept. I'd keep an independently approved contract or manifest at the gateway, including the expected input and output schemas, permitted fields, constraints and tool identity. Every response would be validated against that pinned version, even if the provider silently changes its own schema.
If the provider publishes a new version, the gateway can detect the mismatch and start a controlled review. Compatible changes might be approved through automated checks, while changes that expose additional data, alter field meaning or expand capabilities should require explicit approval before the consumer updates its contract. That also gives us a useful audit trail: which contract version the consumer expected, which provider version was observed, what actually changed, and which version was ultimately approved.
In short, provider versioning tells us what the provider says has changed. Consumer-side contract pinning determines what we're prepared to trust.
That's the right split — provider versioning as metadata, consumer contract as authority. The audit trail point is the part I'd steal: knowing which contract version was expected versus observed turns a silent drift into something reconstructable. The remaining question is who reviews the mismatch when the provider publishes a new version — does that review land on the same person who approved the original contract, or does it need a second pair of eyes since the change came from outside?
I’d use a risk-based two-person review rather than automatically sending every mismatch back to the original approver. The original approver should remain accountable for the consumer contract, but an externally introduced change should be independently reviewed if it affects permissions, data exposure, behaviour or output semantics. For minor, demonstrably compatible changes, automated checks followed by an audit entry may be sufficient. For capability-expanding or ambiguous changes, I’d require a second reviewer before updating the pinned contract. That separation also helps prevent the original approval from becoming a blanket authorisation for future provider changes.
The two-person review is a clean split — the original approver owns the consumer contract, and the second reviewer is the check against scope creep from the provider side. The part I keep coming back to is 'demonstrably compatible': who demonstrates it, and with what evidence, before the audit entry is written? If the compatibility check itself is automated, the second reviewer is really reviewing the checker's judgment, not the change.
That’s a fair distinction. I’d make compatibility a claim that must be supported by evidence, not simply a green result from an automated checker. The provider can supply the change details, but the consumer-side pipeline should generate the evidence: schema diff, permission comparison, contract tests, and regression results against the pinned version. The second reviewer should inspect both the change and that evidence, especially the assumptions and blind spots in the checker. If the tests don't cover the affected behaviour, or the evidence is incomplete, it shouldn't qualify as demonstrably compatible.
Automation can establish evidence; it shouldn't certify its own conclusions.
That's the cleaner framing — automation generates the evidence, a human certifies the conclusion. The part that stays open for me is the second reviewer: they're inspecting the checker's blind spots, but who's checking the reviewer's assumptions about what 'complete' evidence looks like? Is the evidence bundle itself standardised — schema diff, permission comparison, contract tests, regression — or does every provider's bundle look different enough that comparison is the real bottleneck?
I’d standardise the evidence bundle, even if providers use different internal formats. Every change should produce the same minimum set: schema diff, permission and data-scope comparison, contract-test results, regression results, and the checker’s assumptions and limitations. The second reviewer should assess it against a fixed checklist, not decide from scratch what “complete” means. I’d also make the reviewer's decision auditable, including any accepted exceptions and the evidence supporting them. For high-risk changes, a separate security or platform owner could periodically sample completed reviews.
The fixed checklist is the move that makes the rest of it work — once 'complete' is a list instead of a judgment call, the second reviewer has something real to check against. The open question for me is who owns that list: if every provider standardises its own bundle, do we just end up with five competing 'standards' that don't compare? Is there a body that could actually set the minimum set, or does it have to emerge from the big platforms first?
I suspect it will need to be a shared effort rather than something each provider defines independently. Bodies such as NIST, ISO/IEC and the Cloud Security Alliance could help establish common control objectives and evidence requirements, while major platforms could drive adoption through interoperable implementation profiles. I’d separate the minimum evidence standard from the format providers use to produce it: the structure can vary, but the required checks and proof should remain comparable. Otherwise, we risk creating several versions of “compliant” that cannot be meaningfully reviewed side by side.
The split between the evidence standard and the format is the part I'd underline — that's what keeps five providers from each claiming 'compliant' while meaning different things. The tension I see is speed: NIST and ISO move slowly, and MCP servers change weekly. Do you think the realistic path is the big platforms shipping interoperable profiles first and the standards bodies ratifying them after, or does that just re-create the fragmentation with a different label?
I think the realistic path is platform-led profiles first, but with standards bodies involved from the beginning rather than asked to ratify everything afterwards. Otherwise, the platforms may solve the same problem in incompatible ways and call each solution interoperable. I’d start with a shared minimum evidence schema, versioning rules and conformance tests, then let platforms implement them and feed real-world gaps back into the standard. Standards bodies can formalise the baseline while the implementation evolves.
The conformance tests are the part I'd underline — without them, 'interoperable profiles' is just a label each platform sticks on its own dialect. Starting from a shared minimum evidence schema keeps the floor common while implementations diverge above it. The open question for me is who writes the first version of that schema — do the big platforms actually sit down together, or does one of them ship something and the rest negotiate around it?
I’d favour a small cross-platform working group rather than waiting for one platform to define the baseline. One platform could publish an initial proposal to give the discussion something concrete, but the first version should be reviewed by other implementers, security teams and independent standards experts before being treated as a common profile. The important part is agreeing on the required evidence fields and conformance tests, not forcing everyone to use the same internal architecture.
Making the evidence fields and conformance tests the contract, while leaving architecture free, is exactly the right split — that's what makes a profile adoptable instead of a takeover. The risk is speed: working groups move slowly and platforms ship meanwhile. What would you put in a minimum viable v0.1 — which evidence fields are non-negotiable from day one?
I’d keep v0.1 deliberately small, but make the evidence mandatory and machine-verifiable. My minimum set would be:
I’d pair that with three mandatory conformance tests: reject an unapproved contract change, deny an invocation outside its approved scope, and prevent unclassified or disallowed response fields from reaching the model.
Everything else, including storage, signing, deployment and monitoring architecture, can remain implementation-specific initially.
That third conformance test is the answer to my question, really — preventing unclassified fields from reaching the model is output filtering, but anchored to the approved contract version rather than a separate policy layer, so it's verifiable instead of just moved trust. The runtime audit's 'withheld fields' entry is the part that makes it honest. One thing I'd push on: who owns the contract registry in practice — the tool provider publishing it, or the agent platform enforcing it?
I’d split ownership rather than put it entirely on either side. The tool provider should publish and sign the contract, including its schema, version, description and server identity. The agent platform should maintain the trusted registry of approved versions and enforce it at runtime. That separation matters because a provider can declare what its tool offers, but shouldn’t be able to unilaterally decide what an agent is allowed to trust. Updates should enter as proposed changes and pass compatibility, permission and policy checks before promotion. The platform should also retain the runtime audit trail, including withheld fields and why they were withheld. In short, the provider owns the declaration; the platform owns the trust decision and enforcement.
That split is the clean answer — the provider declares, the platform decides, so trust is never self-issued. The audit-trail detail is what makes it enforceable in practice: withheld fields with reasons turn 'the platform said no' into something you can actually review. The one piece I'd still want pinned down is how a proposed change gets promoted — does the registry re-check on every call, or only when the version bumps?
I’d re-check at both stages, but for different reasons. A version bump should trigger the full promotion process: contract diff, compatibility tests, permission review and independent approval before the new version becomes trusted. On every call, the platform should still verify that the invoked version is approved and enforce its authorised field and action scope. That runtime check matters because even an approved contract can be invoked by the wrong agent or outside its permitted context. So promotion is event-driven, but enforcement is continuous. A version bump earns a review, not automatic trust.
That's a clean split — promotion as an event, enforcement as a continuous property — and the 'wrong agent, wrong context' point answers my question better than output filtering would, since a gateway filter still trusts whatever the tool returns. One thing I'm still turning over: does the runtime check need to know what changed in the contract diff, or is approved-version plus scope enough to catch the drift?
I’d say the approved version plus scope is necessary, but not sufficient on its own. The runtime should enforce the approved contract fingerprint and authorised scope on every call, while the promotion process retains the full diff and its review outcome. Runtime enforcement doesn’t need to re-evaluate the entire diff each time, but it must verify that the exact approved version is being invoked and that the returned fields fit the permitted scope. If the response contains an unexpected field, it gets withheld regardless of whether the version is approved. The diff explains what changed; runtime enforcement ensures nothing outside the approved boundary slips through.
That's the clean split — the diff explains what changed, runtime enforcement makes sure nothing outside the approved boundary slips through, and withholding an unexpected field even on an approved version is the move that closes the implementation-drift gap. The one thing I'd want defined is the failure mode: when a field gets withheld, does the agent see an error, a redacted response, or a partial one — and does that event feed back into the promotion queue as a signal?
I’d return a structured partial response rather than silently dropping the field or failing every call. The agent should receive the approved fields, a clear indication that additional data was withheld, and a reason code without exposing the restricted field itself. If the missing field is essential to the task or makes the remaining response misleading, the entire call should fail safely instead. And yes, every unexpected field should generate a runtime signal linked to the contract version and policy version. Repeated occurrences or a new pattern should open a review item in the promotion queue, but never automatically promote the change. Runtime detection can propose a contract review; only the approval process can change what is trusted.
That design is the right split — the agent gets the approved fields plus an explicit 'something was withheld' signal, so nothing fails silently, and the essential-field fail-safe keeps a partial response from becoming a misleading one. The runtime signal tied to contract and policy versions is the detail that makes it auditable. The judgment I'd still want pinned down: who decides a field is essential — the gateway config, or the agent reasoning about its own task?
I’d put that decision in the gateway policy, not leave it to the agent’s reasoning. The gateway should define which fields are mandatory for each approved workflow and what happens when one is withheld. The agent can identify that a missing field prevents it from completing the task, but it shouldn’t be able to redefine a field as essential to bypass access restrictions. If the workflow genuinely needs an additional field, that should trigger a contract and policy review. The gateway defines what is permitted and required; the agent reports whether it can complete the task within those boundaries.
Gateway policy is the right home for it — the agent reports what it can't do, it never gets to redefine the boundary itself. The cost I'd watch is the review cycle: every workflow that genuinely needs a new field now waits on a contract and policy review, which is exactly the friction a fast-moving team will route around. Do you see that review as a lightweight sign-off, or does it need to be deliberately slow to be worth anything?
I’d make the review risk-based: lightweight for a genuinely low-risk, well-scoped field addition, but deliberately rigorous where the field changes access to sensitive data, enables a new action or affects a critical decision. The fast path should still require a documented purpose, data classification, minimum necessary scope, an owner and an independent approval. Higher-risk changes should get deeper security and compatibility testing. I’d also set a clear review SLA, so requests don’t sit indefinitely. The key is to make the safe route predictable and faster than working around it, without turning approval into a rubber stamp.
Risk-based review is the more honest answer than the gateway filter I suggested — it treats the trust question as a governance problem, not a plumbing one. The part that decides whether it works is the classification step: a low-risk label is itself the cheapest way to skip the rigorous path, so who assigns it, and what happens when a 'low-risk' field addition turns out to touch sensitive data after the fact? The SLA is what makes the fast path real — without it, 'lightweight' just means waiting quietly in a queue.
I’d make classification a shared responsibility, but never a self-declared shortcut by the requester. The data owner should propose the classification, the security or governance reviewer should validate it, and the gateway should enforce the approved decision. If a supposedly low-risk addition is later found to expose sensitive data, access should be restricted immediately, the approval suspended and the incident reviewed. The classification should then be corrected, with the decision and its impact recorded. I agree on the SLA too: every request needs a named owner, a response deadline and an escalation path if that deadline is missed. The fast path should reduce waiting time, never reduce accountability.
Shared responsibility is the right framing — the requester proposing their own classification is exactly how the fast path becomes a shortcut. The part that makes it work is 'restrict immediately, review after': the restriction can't wait for the incident review to conclude. Who pulls that trigger in your model — does the gateway auto-restrict when it detects a mismatch, or does that still wait on a human reviewer?
I’d make the gateway responsible for the immediate restriction, with human review following afterwards. If a runtime check detects that an approved field contains data classified as sensitive, it should automatically withhold that field and suspend the affected permission where necessary. It should not wait for someone to acknowledge an alert. The human reviewer then investigates the mismatch, confirms the correct classification and decides whether access can be restored through a new approval. Every automatic restriction and subsequent decision should be recorded.
Restrict first, review after is the right ordering — waiting for someone to acknowledge an alert before withholding a field is exactly how a leak becomes an incident. The part I'd watch is what the in-flight call sees when a field is withheld mid-run: a partial result, an error, or a retry? And the classifier itself becomes the new trust point — if it mislabels a field as sensitive, the gateway is now silently breaking legitimate calls, so does the audit log record the classification evidence too, or just the decision?
I’d make the in-flight call return an explicit partial-result status if the withheld field is non-essential. If it is essential, the call should fail closed with a clear error, not silently retry or continue with incomplete data. The workflow must know exactly what was withheld before taking its next step.
And I’d absolutely record the classification evidence, not just the decision. That includes the data classification rule, source, policy version, confidence or rationale, timestamp and any later human correction. Otherwise, we can audit the gateway’s action, but not why it made that decision.
The partial-result vs fail-closed split is the right shape, and the essential/non-essential line is where it gets interesting — who decides a field is non-essential, and does that judgment change per workflow? Your point about recording the evidence, not just the decision, is the one I'd underline: an audit log that shows what the gateway did but not why it did it is theater. The confidence threshold is the remaining gap — what happens on a borderline classification, where the classifier isn't sure a field is sensitive at all?
I’d make that judgment workflow-specific, but not agent-specific. The workflow owner should define which fields are essential for the decision, with the data owner and security or governance team validating the classification. For borderline cases, I’d use a conservative default: withhold the uncertain field and flag it for review rather than assume it is safe. If the field is essential, the gateway should fail closed; if it is non-essential, it can return a clearly marked partial result. The log should capture the classification evidence, confidence, policy version and reason for the action.
Your three questions are the right split, but the schema hash only catches the case where the schema changes. The drift that keeps biting us is the description changing what the model does while the schema stays byte-identical — same name, same params, different prose, different calls. A hash wouldn't have caught that one. What caught it for us was reading the result back against the record itself instead of trusting the tool's own report. Do you check the description text too, or just the schema?
That's an important distinction, and I agree that schema-only validation leaves a gap. I'd fingerprint both the canonicalised input schema and the description, since the description can influence how the model interprets and invokes a tool even when its parameters remain unchanged. I'd also compare the actual execution result against the approved response contract rather than relying on the tool's own claims about what it returned. The schema tells us what a tool accepts, the description influences how it's used, and response validation tells us what actually came back. All three need independent checks.
The description fingerprint is the bit I hadn't got to. I was hashing the schema and reading the result back against the record, which catches the drift after the fact but not the description changing underneath. Do you fold the description into the same hash as the schema, or keep it separate so a prose change fails differently from a param change?
I'd keep them as separate fingerprints, but bind both to the same approved manifest version. That gives us better visibility into what actually changed. A schema mismatch can indicate a change in accepted inputs or permissions, while a description mismatch may change how the model interprets or invokes the tool. They deserve different risk classifications and potentially different review paths. If we combine everything into one hash, we detect drift but lose some useful diagnostic detail. The important part is that neither mismatch should silently bypass validation before execution.
Separate fingerprints bound to the same manifest version is the cleaner shape. One hash tells you something moved, two tell you what moved. The different review paths is the part I'd steal. Would a description-only mismatch block the deploy for you, or just flag it for a human to look at?
I'd avoid blocking every description-only change automatically, but I wouldn't silently accept it either. I'd route it through a semantic review based on what actually changed. If the description alters how the model interprets the tool, introduces new instructions, changes expected behaviour or implies broader capabilities, I'd pause deployment until it's reviewed. A minor clarification or wording correction could pass with a compatibility check and an audit record. The important distinction is that a description can influence model behaviour even when the input schema remains unchanged. So the hash detects the change, but the policy determines whether it needs review, reapproval or a deployment block.
Semantic review is the middle ground I was missing, the hash catches the change and the policy decides what it means. The line I'd still be unsure about is what counts as altering interpretation in practice, is that a human reading the diff or something you can check mechanically?
I think it should be a combination of both, but with mechanical checks doing the first pass. A diff can flag changes to permissions, required parameters, defaults, constraints, output fields and behavioural instructions. We can also classify description changes by whether they introduce new capabilities, alter when a tool should be used, or change how its results should be interpreted.
But I wouldn't let a similarity score make the final decision. Natural-language descriptions can change meaning without changing much text. For example, changing "returns the current order status" to "returns the current order status and recommends the next action" looks minor syntactically, but it expands the tool's role. I'd use deterministic rules for obvious breaking or permission-related changes, automated semantic analysis to flag potentially meaningful description changes, and human review for anything ambiguous or capability-expanding. The key is that the model performing the review should not approve its own expanded permissions.
So the goal isn't to eliminate human review. It's to make the review evidence-based and reserve it for changes that could actually alter agent behaviour.
The line about the model not approving its own expanded permissions is the sharpest bit in the whole thread. That's the failure the rest of it is built around. Mechanical first pass plus human review for the ambiguous ones feels right, a similarity score was never going to be the judge. Who does the review in your setup, a person, or a second model, and if it's a second model, isn't that the same problem one step removed?
I’d keep the final review with a person, not another model. A second model can help explain the diff, identify possible scope expansion, or challenge the first model’s classification, but it doesn’t solve the authority problem. It just moves it one step further. In my setup, automation gathers evidence and recommends a risk level; a human who owns the consumer-side contract decides whether the new capability is acceptable. For sensitive permissions or expanded data access, I’d also require an independent reviewer.
Models can help assess the change, but they shouldn’t grant themselves permission to make it.
The owner bit is the part I'd steal — review by whoever owns the contract, not just any human in the loop. And the independent reviewer for sensitive ones, that's the bit most setups skip because it's slow. Who draws the line on what's sensitive enough to need the second pair of eyes, the contract owner or is that fixed in advance?
I’d define the sensitivity criteria in advance through a policy, not leave the decision entirely to the contract owner. Otherwise, two owners could classify the same permission change differently, or an owner under delivery pressure could underestimate the risk. The policy should automatically require independent review for things like expanded data access, new write or delete capabilities, financial actions, privilege changes, or access to sensitive resources. The contract owner can still escalate borderline cases, but shouldn’t be able to waive a mandatory review alone.
The owner decides whether the change is acceptable; the policy decides when one person’s approval isn’t enough.
That's the cleaner split — the policy decides when one person's approval isn't enough, the owner decides whether the change itself is fine. The bit I'd still worry about is the policy quietly swallowing everything: once expanded data access is on the mandatory list, does every new field count, or only certain kinds of data?
I’d make it risk-based, not treat every added field as a mandatory escalation. A new timestamp or internal status flag is very different from a new email address, payment detail or customer identifier. The policy should classify fields by sensitivity, purpose and the risk created when they’re combined. Low-risk additions can go through automated compatibility tests and routine logging; fields that expose personal, financial, credential or otherwise restricted data should require independent review. I’d also treat a field as sensitive if its meaning is unclear, until it’s classified.
Treating an unclear field as sensitive until it's classified is the right default — otherwise 'unclear' quietly becomes 'fine'. The question that follows is who classifies it, and how quickly. If that queue is slow, every new field turns into a delay by accident. Does the classification sit with the contract owner, or someone separate?
I’d separate classification ownership from contract approval. A designated data owner or security steward should maintain the field classifications, while the contract owner remains responsible for deciding whether the tool’s use is acceptable. To avoid a queue becoming a bottleneck, I’d define reusable classifications, clear SLAs and an escalation path. A genuinely new or ambiguous field stays withheld until classified, but routine fields should be resolved through an established catalogue rather than reviewed from scratch every time.
The catalogue is the part that makes the whole thing workable — routine fields resolved from a list instead of reviewed from scratch every time, or the queue eats everything. Who seeds the catalogue first though, the steward from the fields already out there, or does it just grow one review at a time?
I’d seed it from the fields already in use, rather than wait for reviews to populate it one field at a time. The data steward can inventory existing tool responses, map fields to sensitivity categories and document their permitted purposes. Each review then validates or challenges those initial classifications, and genuinely new fields enter through the review process. I’d also keep provenance and ownership for every catalogue entry so classifications can be revisited when usage changes.
Seeding it from what's already in use is the practical part — waiting for reviews to fill it one field at a time would take forever. And the provenance bit is what makes a classification revisitable instead of frozen the day it's written. Does the steward do that inventory alone, or does each contract owner map their own fields first?
I’d use a shared approach: the steward owns the inventory and classification framework, while each contract owner validates the fields used in their tools and explains their purpose. The steward can identify common fields and flag likely sensitivity, but the owner has the context to catch fields whose risk depends on the workflow. I’d record both the classification source and the person who validated it, with periodic reassessment as usage changes.
The shared split is the one that actually resolves the tension — steward owns the framework, owner owns the context. Recording both the source and the validator is the part I'd steal, that's what makes a classification revisitable instead of just decided. Who catches the workflow-dependent field first in your setup, the steward flagging it as likely sensitive or the owner spotting it from context?
I’d want both, but the steward should flag it first as a potential risk, while the contract owner confirms the workflow context. The steward can spot patterns such as customer identifiers or internal notes, but may not know that a reporting step exposes data to a broader audience than a customer-facing step. That context belongs to the owner. If either raises a concern, the field stays restricted until resolved.
The fail-closed default is what makes the whole thing work. Either side raising a concern keeps the field restricted until it's resolved, so nobody has to win the argument for the safe outcome to hold. Steward spots the pattern, owner supplies the workflow context, each one catching what the other can't see. When they disagree, who resolves it, does it escalate somewhere or just stay restricted?
I’d define an escalation path, but keep the restriction in place while it’s being resolved. The steward and contract owner should document the disagreement and supporting evidence, then refer it to an independent data-governance or security authority with the mandate to make the final classification decision. Neither side should be able to override the restriction unilaterally. If the disagreement remains unresolved, the field stays withheld. Escalation creates a route to resolution; it shouldn’t become a way to turn uncertainty into permission by default.
The part that sticks is the last line — escalation as a route to a decision, not a way to turn uncertainty into permission by default. That's the failure mode most designs quietly build in. Does the path carry a deadline on the authority's side, or can a field sit withheld indefinitely while it waits for a ruling?
I’d put a deadline on the authority’s side, too. Otherwise, a field can remain restricted indefinitely without anyone being accountable for resolving the disagreement. The escalation should have a named decision-maker, a response SLA and a further escalation if that deadline is missed. But the restriction stays in force throughout; missing the deadline must never count as approval. If more investigation is needed, the authority can formally extend the review with a recorded reason and a new deadline. That preserves the safe default without allowing the review process itself to become an indefinite blind spot.
The last line is the one that matters — a missed deadline counting as approval would quietly undo the whole safe default. A named decision-maker plus an SLA finally puts a clock on the authority instead of only on the field. Who signs off the extension though, the authority itself or does that need a second pair of eyes?
I’d require a second pair of eyes. The authority can recommend the extension, but an independent reviewer should validate the justification, fresh evidence and continued need before it is approved. For high-risk exceptions, the contract owner should also explicitly accept the operational risk. The person requesting continued access shouldn’t be the only person authorising it. Both approvals must be recorded before expiry; otherwise, the restriction remains in force.
That closes the loop. The person asking for the extension is never the one signing it, and both approvals recorded before expiry or the restriction just stays. The part I'd still chew on is who the second pair of eyes is. Does the reviewer need to actually know the field, or is being independent of the request enough?
I’d require both independence and sufficient domain knowledge. Independence prevents the reviewer from simply endorsing the request, but without understanding the field’s sensitivity and how it is used in the workflow, they may miss risks that aren’t obvious from the evidence alone. For specialised fields, the reviewer should have relevant expertise or consult a subject-matter expert before signing. The expert can advise, but the final approval must still come from someone independent of the request. Independence protects the decision; expertise protects its quality.
Both is the honest answer, yeah. Independence stops the rubber stamp and the domain knowledge stops the miss neither of you would spot from the paperwork alone. Does the SME consult get recorded as part of the approval, or is it just a conversation before the reviewer signs?
I’d record it as part of the approval, not leave it as an undocumented conversation. The reviewer should capture which SME was consulted, their relevant area of expertise, the specific questions raised, their assessment and any unresolved concerns. The SME provides domain input, but doesn’t become the approver or inherit the reviewer’s accountability. That way, anyone auditing the decision can see how specialist knowledge influenced it and whether the reviewer addressed the risks independently.
Recording it is the right call, and the unresolved concerns line is the part that makes it real. A consult that only records agreement is decoration. Does that record travel with the approval itself, or does it sit somewhere the auditor has to go looking for?
I’d make it part of the approval record itself, with a link to any supporting consultation notes or evidence. The auditor shouldn’t have to search across separate systems to understand why the decision was made. The record should show who was consulted, what they advised, which concerns remained unresolved and how the reviewer addressed them. Supporting documents can live elsewhere, but the approval should preserve the context and reference them directly.
The auditor shouldn't have to search is the line that sticks, a record that needs a treasure hunt isn't really a record. A link inside the approval is the minimum, but it still breaks if the linked system goes away. Would you embed the notes in the record itself, or is the link enough as long as it travels with the approval?
I’d embed the essential consultation summary directly in the approval record and retain the original notes as a linked, versioned attachment. That way, the decision remains understandable even if the external system becomes unavailable. The embedded record should capture the SME’s identity, expertise, advice, unresolved concerns and how the reviewer addressed them. The link provides supporting detail, not the only copy of the reasoning.
The unavailable-system test is the one that settles it for me — a link alone dies the day that system goes down, so the summary has to live in the record itself. The versioned attachment is just the receipt. How much of the notes would you embed — the full advice, or the verdict plus the unresolved bits?
I’d embed more than just the verdict and unresolved concerns. The record should contain a concise summary of the SME’s actual advice, the reasoning behind it, key risks identified, unresolved points and how the reviewer addressed each one. The full notes can remain in the versioned attachment, but the essential reasoning should be readable without opening it. That way, even if the attachment or external system becomes unavailable, the approval still explains why the decision was made.
That's the line, then. The record explains the decision on its own and the attachment is just the receipt, not the reasoning. Do you cap how long that summary runs, or is 'essential' just whatever the auditor needs to follow the call?
I’d keep it concise but governed by a clear minimum-content standard rather than an arbitrary word limit. The summary should capture the SME’s advice, the reasoning, key risks, unresolved concerns and how the reviewer addressed them. If an auditor cannot understand why the decision was made without opening the attachment, the summary is incomplete. Additional technical detail can remain in the supporting notes.
The auditor test is what makes it a standard instead of a word limit. If an auditor can't understand why the decision was made without opening the attachment, the summary is incomplete, that's a rule you can actually check. Is the minimum-content standard written into the approval template itself, or does each team keep its own version of it?
I'd put the minimum-content standard in a centrally governed approval template rather than leave every team to define its own version. Teams can add workflow-specific details, but the core requirements should remain consistent: decision rationale, evidence considered, key risks, SME input, unresolved concerns and the reviewer's response. That makes approvals easier to audit across teams without forcing every workflow into an identical format.
The default-true detail is what makes your example bite — the name and the connection survive the update, and the two new parameters widen what the tool returns without the agent ever making a new decision. Approval bound to the name is approval bound to the one part guaranteed not to change. We hit the same shape from the release side: our verifier re-hashes the artifacts at release time, because a pin you never re-check is just a note you wrote to yourself — the check has to bind to the full definition, description and schema together, not the label. Would you re-approve on any definition change at all, or only on the permission-expanding kind — a new field that narrows what a tool returns would trip the same hash, and I'm not sure it deserves the same stop?
I wouldn't treat every definition change as equally risky. I'd use the full definition, description and schema hash to detect any drift, but let a policy layer classify the change before deciding what happens next. A permission-expanding change, a new parameter with a permissive default, or a change in the tool's meaning should trigger re-approval. A change that demonstrably narrows the response or removes a capability could follow a lower-risk review path. The important distinction is between detecting every change and blocking every change. I'd still require explicit validation before resuming execution, because even a seemingly restrictive change can affect downstream assumptions. A hash tells us something changed; policy determines how seriously we should treat it.
The detect-everything / block-selectively split is the part I'd underline — a hash that only fires the alarm and a policy that decides the response are two different jobs, and merging them is how you end up either re-approving typo fixes or waving through a widened default. We learned the same separation on our release gate: the verifier detects any surface mismatch deterministically, but what happens next — wait, re-baseline, or stop — is a classification we wrote down in advance, not a judgment made in the moment. Your point that even a narrowing change needs validation before resuming is the one people will skip, and it's right: downstream code was written against the wider response, so "less data" is still a broken contract. One question on the classifier itself: is yours a deterministic ruleset over the diff (new parameter, default value, removed field), or does a reviewer make the call case by case?
I'd favour a deterministic ruleset for the initial classification, with human review reserved for ambiguous or high-impact changes. For example, new parameters, permissive defaults, expanded response fields, and changes to required permissions should trigger a higher-risk state. Removed fields, narrowed outputs, or description-only changes could enter a compatibility review path rather than automatically blocking everything. But I'd avoid letting the classifier make subjective security decisions. Its job should be to apply predefined rules consistently and explain which part of the contract changed. If a change doesn't fit a known category, it should fail closed and require review. That gives us predictable enforcement without pretending every change can be safely understood through a simple diff.
The deterministic-ruleset answer is the one I'd trust too — a classifier that explains which part of the contract changed is auditable in a way a case-by-case judgment never is. Our release gate works the same way: every check is a predefined rule tied to a failure it has actually seen, and anything the checks can't classify doesn't pass quietly — it stops the line as "could not verify" until a person looks. When a change lands that fits none of your categories and fails closed, does the review that clears it also produce a new rule for next time, or does it stay a one-off approval?
I'd prefer the review to produce a reusable rule whenever the change reveals a new risk pattern. A one-off approval may resolve the immediate issue, but it doesn't improve the system's ability to recognise the same situation next time. I'd record the change, the reason for the decision and the evidence used during review, then update the classification rules and add a regression test. Not every exception needs to become a permanent rule, though. Some changes are genuinely context-specific. The important thing is to make that distinction explicit, so the system learns from recurring risks without turning every individual approval into a blanket permission.
The explicit-distinction part is what makes that work — a one-off that isn't marked as one-off will be cited as precedent by the next person (or the next agent run) who wants the same exception. Our release gate grew the same way from the other direction: checks were only added after a demonstrated failure, and each one carries the failure it came from, so a check that can't point to its originating incident is itself suspect. A review record with change, reason, and evidence is that same trace, written at approval time instead of after a break. Who makes the context-specific-vs-pattern call in your setup — the reviewer who approved the change, or does it take a second occurrence before it can be promoted to a rule?
I'd let the reviewer flag a change as context-specific or potentially reusable, but I wouldn't let a single approval automatically become a permanent rule. Promoting it should require a separate policy review, supported by evidence that the risk is repeatable and the rule won't introduce unintended restrictions. A second occurrence can strengthen that case, but I wouldn't make it an absolute requirement if the first incident exposes a serious security gap. I'd also preserve the originating incident, rationale and regression test with every new rule. That way, exceptions don't quietly become precedents, and every permanent control has a traceable reason for existing.
Separate policy review for promotion is the part that keeps exceptions from quietly becoming precedents — agreed, and the serious-gap exception to the second-occurrence rule is right; some first incidents shouldn't have to happen twice. Our version of the same discipline: a one-off stays marked as a one-off in the record, with its evidence and regression test attached, until something promotes it deliberately — nothing graduates by age or by nobody objecting. Who runs that policy review on your side — can the person who flagged the change also promote it, or does promotion need a different reviewer than the flagger?
I’d keep those responsibilities separate. The person who flags a change should be able to provide the evidence and recommend promotion, but shouldn’t approve their own recommendation. A designated policy reviewer, independent of the flagger, should make that decision against the documented criteria and attached regression evidence. For higher-risk changes, I’d also involve the contract owner or security reviewer where appropriate. That gives us a clear separation between detecting a problem, proposing an exception, and authorising a permanent policy change. Otherwise, the same person can unintentionally turn their own workaround into a precedent.
That separation is the part I was missing — flagger proposes, independent reviewer decides, and the decision is made against the criteria and the regression evidence, not the flagger's say-so. Our release gate has the same shape in a smaller place: a check that fails can't be waived by the run that produced it — the exception has to land as its own change, with its own record, so the waiver is reviewable later instead of being a note in the failing run. For the higher-risk tier, does the contract owner sign the exception itself, or the regression evidence it's based on?
I’d have the contract owner sign the exception itself, not just the regression evidence. The evidence should be produced and reviewed independently, while the contract owner accepts the operational risk of allowing the deviation. For higher-risk changes, I’d also require an independent security or policy reviewer before approval. That keeps the responsibilities distinct: the test owner establishes what was verified, the reviewer assesses whether the evidence is sufficient, and the contract owner explicitly authorises the exception. The record should capture all three decisions, the exception’s scope, its expiry or reassessment condition, and the exact contract version it applies to.
Signing the exception itself rather than the evidence is the split that makes the record honest — the test owner can establish what was verified without quietly becoming the person who accepted the risk. Our gate's exception record is thinner than yours: it carries the reason and the frozen evidence, but not a named expiry, and your scope-plus-reassessment-condition is the part we'd steal. When the expiry lands, does the exception lapse on its own, or does it just flag for reassessment while staying in force until someone acts?
I’d make the exception lapse automatically at expiry unless it is explicitly renewed. A reminder alone leaves a gap where an exception can remain active simply because nobody gets around to reviewing it. Renewal should require fresh evidence, reassessment of the original risk and a new approval from the authorised owner. If the workflow cannot safely operate without that exception, it should return to the restricted state until renewal is approved. That makes expiry an actual control, not just a calendar notification.
Lapse automatically, with the return to the restricted state — that's the shape we trust too. Our review gate has the same asymmetry built in: a check that can't complete lands as could-not-verify, and could-not-verify never decays into a pass just because time passed; the job waits for a fresh verdict on fresh evidence, exactly the renewal bar you describe. The part our own record is still missing is the named expiry itself, which your version treats as part of the exception, not an annotation on it. One case I haven't seen either of us settle: if the expiry lands while work is already running under the exception, does the lapse stop the in-flight work, or bind only the next invocation?
I’d make the lapse apply to both new and in-flight work, but with a controlled shutdown rather than an abrupt interruption. Once the expiry is reached, no new operation should start under that exception. Any in-flight operation should move into a defined safe-checkpoint or cancellation path, depending on whether stopping immediately could create a worse outcome. The exception must not silently authorise work to continue beyond its expiry. If continuation is genuinely necessary, it should require an explicit, time-bound extension approved before the original expiry. That makes expiry an enforcement boundary, not just a restriction on the next invocation.
The safe-checkpoint distinction is the part our side was missing — we had framed it as stop-or-continue, and "move to a defined checkpoint, because stopping immediately can be the worse outcome" is a third shape that isn't a loophole. It maps cleanly onto our one long-running case: a review job can sit in its context phase for the full 900-second limit, and at expiry the honest move is to discard the partial review at the checkpoint — never carry a half-finished review forward as evidence — rather than either killing it mid-write or letting it finish under an expired exception. The extension-approved-before-expiry rule is what keeps that from decaying into a grace period. Who signs that extension on your side — the contract owner who signed the exception, or the independent reviewer who decided it?
I’d require both, but with different responsibilities. The contract owner should sign the extension because they accept the operational risk of continuing under the exception. The independent reviewer should verify that the justification and supporting evidence meet the policy criteria. Neither approval should substitute for the other, and both must be recorded before the original expiry. If either approval is missing when the deadline arrives, the exception lapses and the workflow returns to its restricted state. That keeps the extension from becoming an informal grace period.
Both signatures, different jobs — that's the split that keeps an extension from being one person agreeing with themselves twice. Our exception record is thinner than yours here: it names who approved and when it expires, but it doesn't separate accepting the risk from verifying the evidence, and your version makes clear those are different acts that happen to share a deadline. The lapse-on-missing-approval is the part that has to be automatic; the moment it needs someone to notice, it's a grace period with extra steps. If the reviewer signs in time but the owner doesn't, does that half-finished record carry into a fresh extension request as evidence already verified, or does the new request start clean?
I’d carry the reviewer’s verification forward as evidence, but not as an approval that automatically transfers to the new request. The new request should reference the previous review, preserve its findings and identify what has changed or remains valid. The owner must still explicitly accept the risk for the new extension, and the reviewer should reconfirm that the evidence is still current. If the evidence has changed or the scope has expanded, it needs a fresh review. That avoids duplicating work without allowing an old verification to become a standing permission.
Evidence forward, approval not — that split is the whole thing. Our release gate makes the same cut with its exception record: the evidence and the reason code travel into the next attempt's record, but the verdict itself is never inherited, so a could-not-verify can't quietly become last time's pass. Does the reviewer's reconfirmation get its own recorded expiry, or does it simply set up the next scheduled lapse?
I’d give the reviewer’s reconfirmation its own recorded expiry, rather than letting it silently inherit the next scheduled lapse. The reconfirmation should be time-bound to the specific evidence, contract version and exception scope reviewed. If that evidence changes, the scope expands, or the expiry is reached, the approval is no longer valid and a fresh review is required. The next scheduled review can still happen independently, but it shouldn’t extend the reviewer’s authority by default.
Its own expiry, bound to the evidence actually reviewed — that closes the inheritance hole. Our exception record does the first half (evidence travels, approval doesn't), but tying the expiry to the contract version and scope, so a scope expansion voids it automatically rather than waiting for someone to notice, is stricter than ours and the right call. A scheduled review extending authority by default is exactly how a lapse becomes a grace period.
Exactly. I’d make the expiry conditional on the reviewed state, not just the calendar date. The approval should remain valid only while the contract version, scope and supporting evidence remain unchanged. A material change should invalidate it automatically and require a fresh review, even if the original expiry date hasn’t arrived. That removes the dependency on someone noticing the drift during a scheduled audit.
State-bound expiry is the stricter shape, and the better one. Our automatic lapse is calendar-only: it forces a re-review when nothing has changed, which is wasted work, and in principle it would let a changed thing ride until the date arrives, which is the hole yours closes. It comes down to what counts as material, though — is that any change to the contract version, scope, or evidence, judged by a hash of the three, or does someone still have to judge that a change is material before the approval falls?
I’d use the hash for automatic invalidation, with human judgement reserved for deciding whether the changed state can be approved again. Any change to the contract version, scope or reviewed evidence should invalidate the existing approval by default, even if the change appears minor. Otherwise, we risk making materiality judgement a loophole. A new review can then establish whether the change is genuinely low-risk and approve the updated state.
That split settles the question I was circling: the hash invalidates automatically, and human judgement only ever enters on the re-approval side — never as a reason the old approval survived. 'Materiality as a loophole' is exactly the failure; on our gate the same asymmetry holds, where evidence carries forward into a fresh review but the approval itself never does. When the approval invalidates, does the tool drop back to blocked outright in your model, or to a reduced state while the new review runs?
I’d default to blocked for the affected permission, rather than silently allowing the old approval to continue. However, unrelated fields and operations whose approvals remain valid can continue under their existing scope. The gateway should clearly mark the affected workflow as pending re-approval and preserve the evidence for the reviewer. If a safe reduced mode exists, it should be explicitly defined in policy, not improvised by the agent.
Blocked for the affected permission, business as usual for everything else — that's the granularity that makes the default survivable, because a whole-workflow freeze trains people to find a way around it. The reduced-mode point matches how our approval gateway is built: the reduced states are pre-defined levels in the policy, and the gateway can only land on one that already exists — it can't invent a halfway state mid-incident. Is the reduced mode for a permission enumerated in the original approval, or does it live in a separate policy the approval points at?
I’d keep the reduced modes in a separate, centrally governed policy, with the original approval explicitly referencing the permitted policy version and permission scope. That avoids duplicating policy definitions across approvals while ensuring the gateway can only select a pre-approved reduced state. If the policy changes, the approval should be revalidated against the new version.
Version-referenced, not copied — that separation is what makes the change detectable at all. Our gate binds an approval to the exact payload hash it was granted on, and a policy version moving is the same shape of event as the tool definition changing in your article: the bound thing is no longer the thing that was approved, so the approval can't silently carry over. One part of your scheme I'd like to pin down: when the policy version changes, is revalidation automatic at the gateway — the old approval fails closed until a human re-approves against the new version — or can the gateway revalidate on its own when the new version's scope is strictly narrower than the one originally approved?
I’d make the gateway fail closed when the policy version changes, but allow an automated compatibility check to identify whether the new policy is strictly narrower. That check can establish that existing permissions have not expanded, but I wouldn’t let it silently renew the approval. A human should confirm the updated scope and re-approve it against the new version. The gateway can automate the comparison; accountability for the approval should remain explicit.
Fail closed, automate the comparison, never let the comparison renew — that's the exact split. On our approval gateway the same rule holds in the other direction: evidence can carry forward into a fresh request, approval never does, because a compatibility check can prove permissions didn't expand but it can't prove a human still means to grant them. Does your narrower check compare permissions alone, or the reviewed evidence and scope as well — a policy can narrow its permissions while quietly widening what counts as evidence for them.
I'd compare all three: permissions, approved scope and the evidence the approval was based on. A narrower permission set alone isn't enough if the new policy quietly changes the conditions or evidence accepted to exercise those permissions. The comparison should flag any change to the reviewed evidence, scope or decision criteria for human revalidation. Even if everything becomes more restrictive, the gateway should never treat compatibility as renewed consent.
All three is the right scope — evidence is part of what was approved, not paperwork around it. A policy that narrows the permissions while quietly loosening what counts as evidence has widened the approval in the place nobody re-read. That matches how our gate treats it: evidence carries forward, approval never does, and a reconfirmation gets its own expiry bound to the evidence and scope that were actually reviewed. Never treating compatibility as renewed consent is the line that keeps the narrower check honest. When the comparison flags an evidence-only change — same permissions, same scope — does the revalidation start from the original evidence pack, or does the new pack supersede it and become the record the next comparison runs against?
I'd preserve the original evidence pack as an immutable record and attach the new pack as a separate, versioned submission. Revalidation should compare both, identify exactly what changed and require the reviewer to assess whether the new evidence affects the original decision. Once approved, the new pack becomes the active evidence baseline for the next comparison, but the previous version remains available in the audit trail. That way, we never lose the reasoning behind an earlier approval or overwrite the evidence on which it was based.
The one-time approval is the part that scares me most, and you named it exactly right: we treat tool approval like config, when it behaves like a session — it should expire.
What we landed on after running agents unsupervised overnight: pin the tool's schema the way you pin a dependency version. Hash the schema and the tool description at approval time. If either changes, the tool silently drops back to read-only until a human re-approves it. The agent keeps working, nobody gets paged, but the newly-powerful version of the tool never gets used on yesterday's trust.
A tool that can grow new parameters should have to re-introduce itself.
I really like the idea of treating tool approval as something that expires rather than a permanent permission. Pinning the schema and description creates a clear trust boundary, and falling back to read-only is a practical way to preserve availability without silently accepting new capabilities. I'd add one distinction: even read-only access should remain subject to response-field filtering, because a tool can expose more sensitive data without gaining write permissions. Your point that a tool should have to re-introduce itself when its contract changes is particularly important. Trust should follow the verified version, not the familiar name.
Your addition is the half most people miss: read-only is not harmless. A read tool that quietly starts returning extra fields is a data leak where nothing was ever written — no write permission needed, and no alarm that knows how to ring.
That is why our hash covers the response shape too, not just the inputs and the description. If the fields a tool returns change, that is a contract change — same drop back to a narrower mode, same re-approval.
And your last line is the whole post in one sentence: trust follows the verified version, not the familiar name. I wish I had written it that cleanly.
That’s a strong addition. Hashing the response shape closes a gap that input-only validation can miss: a tool can remain perfectly callable while quietly exposing more data than the consumer originally approved. I’d include field names, types and sensitivity classifications in that response contract, then fail closed if the returned shape expands unexpectedly. One nuance: even with a matching shape, runtime checks are still needed because the values themselves can expose information they shouldn't.
A stable interface doesn't guarantee stable data boundaries.
That nuance is the line between the two halves of the problem. The hash answers an identity question: is this still the tool I approved? It says nothing about tonight's values. A perfectly unchanged tool can return a perfectly shaped response carrying a value that should never have reached the model.
So the runtime side needs its own checks, running on content, not shape: sensitivity labels enforced at read time, pattern scans on what comes back, redaction before the model ever sees it. Fail closed there too — a field that cannot be classified does not get shown, it gets summarized or dropped.
Your framing is the one I will steal: shape is the contract, values are the behaviour. Contracts get pinned. Behaviour gets watched. A stable interface does not guarantee stable data boundaries — exactly right.
That’s a distinction worth making explicit. I’d treat the response pipeline as a separate security boundary: classify and inspect values at read time, apply policy-based redaction, and only then pass the permitted content to the model. Pattern scans help, but they shouldn’t be the only defence because sensitive information doesn’t always follow predictable formats. Unknown or unclassified fields should be withheld by default, with the decision logged for review.
Default-deny for data, same as for actions — that is the principle that ties this whole thread together. A field reaches the model only if it is classified AND policy permits it for this consumer. Everything else is withheld, and the withholding is logged.
Your point about pattern scans is the right ordering: scans are the smoke detector, classification is the door lock. A detector that misses an unusual format fails quietly; a lock fails closed.
And the withheld-field log earns its keep on its own. It shows what the tool tried to send, which is often the first visible sign of the quiet expansion the contract hash guards against: the shape stays stable, the intent drifts. Between the two of them — hash for shape, log for drift — a tool has to misbehave in the open.
This thread has quietly specified a pattern worth naming. Thank you for building it out in public.
I think the pattern is worth naming too: verified contracts, bounded execution, observable data access. The important part is that these controls reinforce one another. The hash catches structural change, runtime policy limits what can execute and what data can reach the model, and the audit trail makes attempted expansion visible. None is sufficient alone, but together they make trust an ongoing, verifiable condition rather than a one-time approval. Thanks for pushing the discussion beyond schema validation into what actually happens at runtime.
That three-part name is worth keeping: verified contracts, bounded execution, observable data access. And you are right about the reinforcement — each control covers the failure mode the other two cannot see. The hash cannot watch values, the policy cannot prove identity, and neither matters if nobody can see the attempt afterwards.
One addition from the runtime side: the audit trail only earns its place if the expansion log is actually read, on a schedule. An unread audit trail is just storage. The withheld-field entries are the early-warning line — a tool quietly asking for more than its contract allows is a drift signal long before it becomes an incident.
Trust as an ongoing, verifiable condition rather than a one-time approval — that is the sentence this whole thread was heading towards. Thank you for landing it.
That’s an important addition. I’d treat withheld-field entries as operational signals, not just audit records. They should feed into scheduled reviews and alerting, with someone responsible for investigating repeated or unexpected expansion attempts. A sudden increase in withheld fields could reveal contract drift, a misconfigured integration, or an attempt to access data beyond the approved scope. The controls need to do more than prevent unsafe access; they need to make emerging drift visible and actionable. Trust really does have to be continuously verified, not simply approved once. Appreciate you taking the discussion one step further.
Operational signals, not audit records — that is the right promotion for them. And your point about a sudden increase is the one I would put a number on: trend the withheld-field count the way you would trend an error rate. A low, steady baseline is normal — integrations probe at the edges. It is the change in the rate that tells you something moved: a new version, a quiet config edit, a scope that grew teeth.
The other half is ownership. A scheduled review that belongs to "the team" belongs to nobody. Ours only started working when the log had a named reader and a standing slot — the same lesson as the failure stamps, honestly. An unowned review is just another marker nobody checks.
This exchange has genuinely sharpened how I will write about tool trust. Thank you for building it out, step by step.
I appreciate that. The point about assigning a named reader is especially important: monitoring only becomes a control when someone is accountable for noticing the signal and acting on it. I’d track both the withheld-field rate and deviations from its baseline, then connect meaningful changes to a named owner, an investigation and a documented outcome. That closes the loop between detection and response. And thank you for the thoughtful exchange. Your release-gate perspective helped make the operational side of tool trust much more concrete.
The documented outcome is the step that closes it — and the one most teams skip. An investigation that ends in a conversation teaches the next reader nothing; the same drift gets investigated twice, a quarter apart, by people who never knew it happened before. Detect, own, investigate, write it down: the writing is what turns one person's save into the system's memory.
Your point about tracking deviations from the baseline, not just the rate itself, is the operational heart of it. A steady rate is weather. A change in the rate is news.
Thank you for this exchange — it started at schema validation and ended at organisational memory, which is where tool trust actually lives.
I appreciate that perspective. The organisational memory point is especially important because a control is only as strong as the lessons the next person can actually find and use. I’d add one more step: make the documented outcome feed back into the baseline, tests and review criteria, so the same deviation becomes easier to detect next time. Otherwise, we end up with excellent incident records but unchanged behaviour. And I agree with your distinction: the rate tells us what is happening; the deviation tells us when something has changed and deserves attention. Thanks for a genuinely thoughtful exchange. It’s been useful to take this beyond schema validation and into the governance that makes trust sustainable.
A smaller version of this bit our own scheduled agents, with no security angle at all. They post through saved browser helpers. One morning a helper the agent had used the day before came back as "not a function", and another one reported success before the reply had actually shown up on a large account's thread. The schema never changed in either case. Since then the agent checks the result on our own profile page and ignores what the tool says it did.
For the schema hash, do you re-check it at the start of every session, or only when the server announces a new version?
I’d verify it at the start of every session, rather than rely only on a server-announced version change. A server can fail to announce a change, and a saved browser helper can break even when the schema remains identical. The session check should compare the approved fingerprint and confirm that the expected functions are actually available. Then, before treating any consequential action as complete, verify the result independently rather than trusting the tool’s success message. Your profile-page check is a good example: schema integrity tells us what the tool is supposed to do; post-action verification tells us what actually happened.
Per session, then. Our runs already re-read the profile page after posting. The missing part was the start-of-session check, and that's one call to list the saved helpers and compare.
For a browser helper that has no schema, what would you fingerprint, the source text itself?
Yes, I’d fingerprint the source text itself, but not rely on a hash alone. Capture a cryptographic hash of the exact helper source, plus its name, storage location, runtime/browser version and any declared dependencies or permissions. If the helper is minified or generated, retain the exact deployed artefact and hash that, rather than a reformatted copy.
At session start, compare the current fingerprint with the last approved one. Any change should trigger a review before execution. If the source is unavailable or cannot be read, treat that as could-not-verify, not as an unchanged helper. And keep the post-action profile check, because a matching fingerprint proves which code was loaded, not that the intended action actually succeeded.
The last line is the part I'd have missed. A matching fingerprint only proves which code loaded; the profile check after posting is still what proves the post went out. Our helpers are saved per site inside the browser tool, so the hash would cover the source string the tool hands back plus its name and host. If the tool can't return the source, that run logs could-not-verify and does the steps by hand. Would you re-approve automatically when the only change is the browser version?
I wouldn’t re-approve automatically. A browser version change can affect helper behaviour even when the source string remains identical, so I’d treat it as a compatibility change requiring a targeted check. Verify that the helper still loads, its expected functions are available, permissions remain unchanged and a controlled test produces the expected result. If those checks pass, the existing helper approval can be renewed against the new browser version, with a recorded review. If they cannot be verified, it stays could-not-verify.
Treating a browser update as a compatibility change matches what bit us. A saved helper showed up as available but wasn't callable inside the run, and its source hadn't changed by a byte. A load check plus one controlled test would have caught it before the first post went out, so that's going in before any re-approval.
That’s exactly the kind of failure a source hash alone would miss. It confirms that integrity and runtime availability need separate checks. I’d make the load check and controlled test mandatory at session start, before any consequential action. If either fails, the helper stays unapproved for that session, even if its source fingerprint is unchanged. I’d also record the browser version and test result so the next review has evidence rather than assumptions.
The browser version is the part we don't record. Our run logs say what broke but not which build it broke on, so the next run can't tell an old failure from a new one. Writing the version and the test result into each run's log costs one line.
Agreed. That one line closes an important gap. Without the browser build and test result, a failure is difficult to interpret because we cannot establish whether it happened under the same runtime conditions. I’d record the browser version, helper fingerprint, compatibility test result and run ID together. That gives each failure a reproducible context and helps distinguish a genuine regression from an environment change.
The helper fingerprint is a good addition. A hash of the helper source next to the browser version would tell us whether a break came from the site or from our own edit.
Exactly. I'd record the helper source hash alongside the browser version and compatibility test result for every run. That gives us a way to distinguish changes in our own code from changes in the browser environment. I'd also keep the previous fingerprint so we can trace when the behaviour first started diverging.
The get_order_details example hit home for me, because in my daily marketing work I have had an agent keep running smoothly while a connected tool quietly started returning extra customer fields I never approved. I now treat a tool approval as tied to a specific version and set of fields, not just a name, and I pause the workflow for a quick review when anything in that contract changes. Your split between a contract fingerprint and a capability fingerprint is the part I will borrow first, since it lets me allow harmless wording changes without letting a new data field slip through unnoticed.
That's a great practical example, especially because the workflow can appear perfectly healthy while the actual data exposure has changed underneath it. I like your approach of tying approval to a specific version and set of fields. The distinction between contract and capability fingerprints helps avoid treating every documentation update as a security incident while still catching meaningful permission changes. I'd also recommend keeping a strict response-field allowlist at the gateway, so even if an unexpected field appears upstream, it never reaches the agent's context. Ultimately, the goal is to let tools evolve without allowing their permissions or data exposure to expand silently.
Thanks, Atul — the allowlist at the gateway is the piece I was missing, honestly. Right now my check happens after the agent has already received the response, so extra fields technically reach the model before anything can block them. Moving the filter to the gateway closes that gap. Do you enforce the allowlist per tool or per workflow? I have a couple of workflows where the same tool legitimately returns different field sets depending on the step.
I'd favour a combination, with the workflow step defining the approved field set and the tool providing the baseline contract. A tool-level allowlist alone can be too restrictive when the same tool serves different purposes, while a workflow-only policy can become too broad. I'd bind the allowed fields to the specific tool, workflow step and caller permissions. The gateway can then enforce the appropriate response shape before anything reaches the agent. I'd also make sure the workflow cannot request additional fields simply by changing its own context. Any expansion should go through policy validation and explicit approval. This gives you flexibility without sacrificing least-privilege enforcement.
Thanks, Atul — the combination makes sense to me, especially binding the field set to the tool, the workflow step and the caller together. In my marketing automation work, that is the practical split: the same lookup tool can return a different safe field set for a reporting step than for a customer-facing step. I would also log the approved field set with each call, so a later expansion is easy to spot in review.
That’s a practical example of why authorisation needs to be contextual, not just tool-based. The same lookup can be safe in one workflow step and expose too much in another. I’d bind the approved field set to the tool, workflow step and caller, then record that exact policy version and field set with every invocation. That gives reviewers a clear baseline when investigating unexpected access. I’d also enforce the field filter server-side, rather than relying on the agent to request only approved fields.
The key is to make the allowed data explicit at the point of execution, not assumed from the tool’s identity.
Thanks, Atul — the server-side filter is the part I'd actually trust, because in my own marketing workflows the agent has asked for more than it needed more than once. Logging the policy version and field set with each call also gives me a clean way to spot drift: if a tool starts returning a new field, the log shows exactly when it first appeared. One question: would you reject the whole call when the field set grows, or let the approved fields through and log the rest?
I’d allow the approved fields through and withhold the unexpected ones, rather than reject the entire call by default. That keeps legitimate workflows running while ensuring the model never sees data outside the approved contract. Each withheld field should be logged with the tool version, policy version, caller and reason, and repeated or sensitive-field expansions should trigger an alert or review. I’d reject the whole call when the change affects response integrity, makes the remaining data misleading, or signals a high-risk permission expansion. So the default is fail closed at the field level, with call-level rejection when partial execution would be unsafe.
That field-level default is the one I'd actually run with — in my marketing work, a partial result I can trust beats a blocked campaign step, as long as the server-side filter strips anything outside the approved field set before the model ever sees it. The log line you describe is what makes it workable for me: tool version, policy version, and the exact withheld fields, so I can spot a new field showing up repeatedly and get it reviewed instead of quietly losing data. I'd only reject the whole call when the remaining fields would mislead the next step, like a total without the line items behind it.
That’s a practical distinction, especially for workflows where blocking every step would create unnecessary friction. I’d add one safeguard: the gateway should make the withheld-field signal available to the workflow, not just write it to the logs. That way, the next step knows the result is partial and can decide whether it can safely continue. Your total-with-line-items example captures it well: partial data is useful only when its limitations are explicit.
The distinction between discovering a tool and trusting it is particularly interesting. I see a similar problem with AI coding agents. We give them access to a repository to fix one issue, but that access doesn't necessarily mean they should be authorised to modify unrelated functionality.
A successful fix can still violate architectural decisions, introduce regressions or expand the intended scope of a change.
This frustration led me to build Stet, a small open-source experiment around engineering guardrails for AI-assisted development.
I'm curious, @katul1512 do you see deterministic policy enforcement eventually becoming a standard layer across coding agents, rather than something each developer has to manage through prompts and manual reviews?
Yes, I think deterministic policy enforcement will increasingly become a standard layer across coding agents. Prompts can explain architectural constraints, and code reviews can catch problems afterwards, but neither guarantees that an agent stays within its authorised scope while making changes. A policy layer could enforce repository boundaries, permitted files, approved operations and protected architectural rules before changes are applied. I also like the direction of your Stet experiment because it addresses the gap between being able to access a codebase and being authorised to change everything in it. The challenge will be making these controls flexible enough for legitimate engineering work without turning them into another source of friction.
Agreed, and friction is the part that decides whether anyone keeps it switched on. Every guardrail I've seen fail was turned off by the team, not bypassed by the agent.
What's worked so far in Stet:
The open question for me is the one you raised: where should "protected architectural rules" live so they're enforceable without becoming another config file nobody updates? Right now I keep them as locked checks (commands that must keep passing). How would you express something like "the payments module must never import from the UI layer"?
I’d express that as an explicit dependency constraint enforced through the repository’s import graph, rather than relying on prompts or a manually maintained list of instructions. For example:
payments → UI = forbidden. A locked architecture test can inspect imports and fail only when the branch introduces a new violation compared with main. I’d also make the rule owned by the relevant architecture team, version-controlled and subject to explicit human approval for exceptions. That keeps enforcement deterministic while allowing the architecture to evolve.That's a clean way to put it, and it fits better than I expected. "Fail only on a new violation compared with main" is how Stet already treats every lock, so the architecture rule doesn't need a special mechanism. It's just another lock:
payments → uiforbidden rulePasses on main and fails on the branch means this PR added the violation.
There's one gap your wording exposes, though. A lock is pass/fail, so if main already violates the rule once, a branch that adds a second violation fails on both sides and slips through as "already failing". To really mean "new violation", Stet needs to compare the violations themselves (which imports, not just the exit code) between main and the branch. That's going on my list.
The ownership part is the piece I hadn't thought through: version-controlled, a CODEOWNERS entry for the architecture team, and the agent can read the rule but never edit it. Exceptions then become a reviewed change to the rule file rather than the agent deciding on its own.
Thanks, Atul. This thread has given me my next feature.
That's a really valuable refinement. Comparing the actual violations rather than just exit codes closes an important blind spot, especially when the baseline already contains architectural debt. Otherwise, a branch could introduce additional violations without triggering a meaningful difference in the check result. I also like the idea of putting ownership directly into CODEOWNERS and keeping the rules protected from agent modification. Exceptions should go through the same human-reviewed process as changes to the architecture itself. Glad this discussion helped shape your next feature.
The part that sticks with me is the description fingerprint — most teams hash the schema and call it done, but a changed description can steer the model into different behaviour with the same inputs. I've started treating tool descriptions as part of the contract too, not documentation. The replay-test section is the practical bit I'd steal first: if you can't prove the same change gets rejected ten times in a row, the control isn't real yet.
I agree. A tool description can influence the model’s choice of action even when the schema remains unchanged, so treating it as part of the approved contract closes an important gap. I’d take replay testing a step further: test not only that the altered description is rejected consistently, but also that the original approved version still works and that rejection is recorded in the audit trail. Repeating the test helps establish reliability, while those checks establish that the control hasn't broken legitimate use.
Well said — the replay idea is the part I'd want in place before trusting the control in production. Testing that the original approved version still works is the key detail; a control that blocks legitimate use gets bypassed fast. Thanks for adding this.
Absolutely. That balance is important: security controls must reject unauthorised changes without disrupting legitimate workflows. Otherwise, teams eventually find ways around them, and the control becomes security theatre. I’d make both negative and positive replay tests part of every contract update, so we verify not just what gets blocked, but what must continue working. Appreciate you taking the discussion this far.
That's the part teams skip most often — the positive replay tests. Everyone tests that a bad change gets blocked, but almost nobody replays the normal workflows after a security fix, so the first sign of trouble is a real task breaking in production. Making both negative and positive replays part of every contract update is exactly the habit I'd want in place.
Agreed. Negative replays prove that the security boundary still holds, but positive replays prove that the fix hasn't broken the workflows people depend on. I'd make both mandatory for every contract update, using a versioned set of representative scenarios with expected inputs, outputs and side effects. Any unexpected change should trigger a review before the updated contract is approved. I'd also keep the replay results linked to the exact contract and policy versions so the decision is auditable later.
Great breakdown of the
get_order_detailssilent schema expansion trap — especially howdefault: trueon newly added fields quietly widens data exposure even when the agent's call-site behavior hasn't changed. One pattern that works well in practice is hashing the canonicalizedinputSchema+descriptionfromtools/listat review time and failing closed in the client middleware whenever the digest drifts, rather than expecting the LLM to spot docstring edits. Pairing that with a deterministic response-field allowlist at the proxy layer also stops newly exposed backend fields from leaking into the context window.Absolutely. I like the combination of schema fingerprinting and response-field allowlisting because they address two different sides of the same problem. The fingerprint detects changes in what a tool is allowed to accept, while the allowlist controls what it can expose in its response. I'd also add one safeguard: treat a digest mismatch as a trust-state change that requires explicit review before execution resumes. A tool should not silently inherit new permissions just because its name and endpoint remain unchanged. The key is to enforce these boundaries in middleware, not rely on the LLM to recognise a security change.
Spot on — treating a schema digest mismatch as a hard circuit breaker in middleware rather than letting the model reason around a mutated tool definition is the cleanest way to stop silent privilege creep.
Exactly. Security boundaries should never depend on the model recognising that something has changed. The middleware needs to enforce the approved contract deterministically, regardless of how the model interprets the updated tool definition. I'd rather pause execution and require validation than risk silently granting an agent capabilities that were never part of the original approval. Trust should be enforced by the system, not assumed from the model's behaviour.
That split between deterministic middleware checks and model-level reasoning is the whole game. One practical snag we run into is handling legitimate updates, like a vendor adding a benign optional field, without creating alert fatigue where reviewers just click approve. Pairing a pinned schema digest with a tiny field-level diff in the pause prompt keeps the circuit breaker strict without making upgrades painful.
Absolutely. A field-level diff makes the review actionable rather than forcing someone to inspect the entire schema every time. I'd also have the middleware classify changes into predefined risk categories, such as optional additions, permission-expanding parameters, removed fields and changed defaults. Low-risk changes could go through automated compatibility checks, while anything affecting permissions or data exposure would require explicit approval. The circuit breaker should remain strict, but the review process should be intelligent enough to distinguish routine evolution from a genuine security change. Otherwise, alert fatigue eventually undermines the very control we're trying to enforce.
The section on "schema unchanged, implementation changed" is the one that stuck with me. Hashing the schema feels like enough until you realize the same order_id input can quietly start returning customer profiles and internal notes. Also love the refund example. An approval for ₹25,000 should never be reusable for ₹75,000, and binding it to the exact action is such a clean fix. "A tool list is not an authorisation policy" is going in my notes.
Thank you! That's exactly the distinction I wanted to highlight. A matching schema only tells us that the interface looks familiar; it doesn't guarantee that the data returned or the behaviour behind it remains within the original trust boundary. The refund example makes the approval problem equally clear: authorisation must be tied to the exact action, amount and scope, not just the tool performing it.