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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
I measure AI coding claims in public. LGTM — Let's Get the Measurements: real runs, real numbers, receipts. Every article is an experiment I actually ran. Books & packs: aheadkit.gumroad.com
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
I measure AI coding claims in public. LGTM — Let's Get the Measurements: real runs, real numbers, receipts. Every article is an experiment I actually ran. Books & packs: aheadkit.gumroad.com
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
I measure AI coding claims in public. LGTM — Let's Get the Measurements: real runs, real numbers, receipts. Every article is an experiment I actually ran. Books & packs: aheadkit.gumroad.com
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Nova Ops — AI automation systems and software. Home of Elias HiveMind for Obsidian. We build small, measured tools — MCP servers, plugins, release gates — and write up real builds with real numbers.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Nova Ops — AI automation systems and software. Home of Elias HiveMind for Obsidian. We build small, measured tools — MCP servers, plugins, release gates — and write up real builds with real numbers.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Nova Ops — AI automation systems and software. Home of Elias HiveMind for Obsidian. We build small, measured tools — MCP servers, plugins, release gates — and write up real builds with real numbers.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
I'm Honey Kiran. I build and direct AI agents that do real DevOps/SRE work, and I write up the runs — commands, logs, failures and all. This is the code-and-receipts home of Agents on Duty.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
I'm Honey Kiran. I build and direct AI agents that do real DevOps/SRE work, and I write up the runs — commands, logs, failures and all. This is the code-and-receipts home of Agents on Duty.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
I'm Honey Kiran. I build and direct AI agents that do real DevOps/SRE work, and I write up the runs — commands, logs, failures and all. This is the code-and-receipts home of Agents on Duty.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
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?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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:
Scope belongs to the task, not the repo. A human sets it per branch ("this ticket may touch src/billing/**"), and it expires with the branch. No standing allow-list to maintain.
The agent can read the scope but can't change it. If it genuinely needs a file outside, it stops and asks, and widening is one command for the human.
Only real breaks block. Something that passes on main and fails on the branch fails the check. Things that were already broken on main, or look suspicious (a skipped test, an @ts-ignore), are reported, not blocked. Teams can start in report-only mode and tighten later.
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"?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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:
JS/TS: dependency-cruiser with a payments → ui forbidden rule
Python: import-linter contracts
Java: an ArchUnit test
Passes 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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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_details silent schema expansion trap — especially how default: true on 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 canonicalized inputSchema + description from tools/list at 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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
I help Python and backend engineers move beyond writing working code to designing production-ready systems, making architecture decisions, and growing into senior engineering roles.
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.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
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.
Founder of Hex16, a small web studio in Poland. I build Next.js sites and headless Shopify stores, with GSAP, Three.js and shaders where they earn their place, and look after technical SEO.
Same trust problem one level down. I once accepted a package an agent suggested without checking it, and it pulled in a pile of dependencies nobody had asked for. A tool that changes its schema overnight is that, with no lockfile to diff.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
That’s a good analogy. An unreviewed dependency can quietly expand an application's attack surface, just as an unreviewed tool update can expand an agent’s permissions or behaviour. I’d treat both as supply-chain changes: pin the approved version, inspect the diff, verify dependencies and permissions, and require renewed approval when the contract or capability boundary changes. The important part is that the agent must not automatically trust what it discovers at runtime.
Founder of Hex16, a small web studio in Poland. I build Next.js sites and headless Shopify stores, with GSAP, Three.js and shaders where they earn their place, and look after technical SEO.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
Absolutely. A dependency incident makes you realise that pinning isn't just about reproducibility; it's about preserving the boundary of what was actually reviewed and approved. The same principle applies to AI tools: if their capabilities or permissions change, the old approval no longer tells us what we're trusting.
Developer Advocate exploring APIs, AI agents, developer tools, and open-source projects. Passionate about learning, building, and connecting with developers.
Location
Amsterdam,Netherlands
Education
B.E. Computer Science, Chandigarh University (2022–2026)
This is an interesting model. In relation to the example given of description changes – would even a minor change need to be re-approved?
Is there not a risk of excessive re-approval processes if servers regularly update their documentation?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
That's a fair concern. I wouldn't require full re-approval for every minor documentation change. I'd distinguish between cosmetic edits and changes that affect the tool's meaning, intended use, permissions or expected behaviour. A typo correction shouldn't trigger the same process as a description change that alters how an agent interprets a tool's capabilities. The fingerprint should detect all changes, but a predefined policy should classify their risk. Low-risk changes can go through lightweight validation, while security-relevant or behaviour-changing updates require explicit review. The goal is to prevent silent permission expansion without turning routine maintenance into an approval bottleneck.
Developer Advocate exploring APIs, AI agents, developer tools, and open-source projects. Passionate about learning, building, and connecting with developers.
Location
Amsterdam,Netherlands
Education
B.E. Computer Science, Chandigarh University (2022–2026)
That makes sense. Separating "something changed" from "how much it matters" is the key point. Fingerprinting everything but triaging by risk keeps the signal without the approval fatigue.
I'm curious how you'd handle the classification itself, though. A description edit can look cosmetic and still change how the model reads the tool. Rewording "retrieves order details" to "retrieves order and customer details" is a small diff with a big change in meaning. Would you lean on rules, like flagging any change to verbs, nouns or scope words, or would you have a model compare the old and new descriptions? And should schema or permission changes always skip the lightweight path no matter how small the diff is?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
I'd use a hybrid approach: deterministic rules for hard boundaries and model-assisted semantic comparison for description changes. Rules can flag changes to permissions, required parameters, data fields, defaults and constraints. Those should always leave the lightweight path, regardless of how small the diff looks. A model can then compare old and new descriptions for changes in capability, scope, intended use or interpretation. For example, "retrieves order details" becoming "retrieves order and customer details" should be treated as a potential data-access expansion, not a cosmetic edit. But I wouldn't let the model approve the change itself. It should explain the semantic difference and assign a risk category; ambiguous or capability-expanding changes go to human review. The principle I'd follow is that small textual changes can have large permission or behavioural consequences, so review should be based on semantic impact, not diff size.
Schema hashing is a useful tripwire, but it only describes the declared interface. I would pair it with a signed capability manifest that states data classes, side effects, and effective identity, then require a new approval when that contract broadens. A stable tool name and even a stable JSON schema should not preserve trust when implementation permissions or downstream retention have changed.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
I agree. Schema hashing verifies the declared interface, but it doesn't prove what the tool is actually permitted to do behind that interface. A signed capability manifest adds the missing context: data access, side effects, execution identity and downstream retention. I’d bind that manifest to the approved contract version and verify both at runtime. Any expansion of permissions or data handling should trigger fresh approval, even if the JSON schema remains unchanged.
Tool-name stability hiding a changed return payload or a widened input schema is such an underrated MCP risk. Pinning or hashing the tool schema and description at approval time—and failing closed when a remote server drifts—feels like the missing lockfile equivalent for agents.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
Exactly. We have become accustomed to pinning dependencies in traditional software, but AI agents need the same discipline for their tools. A stable tool name should never imply a stable contract. I'd also include response-field validation at the gateway, because an unchanged schema doesn't guarantee that the server's actual output hasn't changed. The goal is to make tool trust version-bound, continuously verified and enforced outside the model's reasoning process.
pinning the approved inputSchema and server_identity in a manifest instead of trusting the tool name is the right boundary
once an MCP server adds a default-true param like include_internal_notes, dynamic discovery without a diff check turns into silent scope creep
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
Exactly. The tool name is only a label, not a trust boundary. Pinning the approved inputSchema and server_identity in a manifest gives the consumer something concrete to verify before accepting a discovered tool. A new default-true parameter like include_internal_notes is particularly risky because existing callers may inherit broader behaviour without changing their requests. I’d flag that as a contract change, block automatic adoption and require explicit re-approval.
One important challenge with agentic AI systems is that tool trust needs to be continuously validated, not just established during the initial integration. A tool can retain the same name and input schema while its underlying implementation, data access, or execution permissions change.
Schema fingerprinting is a useful way to detect contract changes, but I would also emphasize runtime authorization and server-side permission enforcement. Even when a tool passes schema verification, every invocation should independently validate the requested action, resource access, and permitted capabilities.
In production agentic AI engineering at IT Path Solutions, this distinction is important because reliable autonomy depends on maintaining clear boundaries between what an agent can discover, what it can request, and what the system actually allows it to execute.
A fail-closed approach for unverified tool changes, combined with versioned approvals, audit logging, and continuous security testing, can help prevent seemingly harmless updates from becoming production security incidents.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
I agree with the distinction between detecting a change and enforcing trust at runtime. Fingerprinting tells us whether the contract has changed, but it cannot prove that the requested action is safe. I’d treat schema verification as an integration-time control and authorisation as a per-invocation decision. The server should validate the agent’s identity, requested action, resource scope and current permissions before execution, regardless of what the tool description or schema says. I’d also log the authorisation decision alongside the tool and contract versions so the execution can be reconstructed later.
A trusted schema should never become a blanket permission to execute.
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, Atul 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?
The point that landed for me is that approval is usually treated as a one-time event, while the thing approved keeps changing underneath it. A tool called get_order_details that quietly starts returning more customer fields is still "the same tool" to the model, which is exactly why the thread keeps arriving at the same answer: the check has to live in middleware that compares a fingerprint, not in the model noticing something feels different.
We learned a smaller version of this at Ascendra Ventures while building memory for AI coding tools. One handwritten parser read every field one column off, and the numbers it reported were confidently and uniformly wrong. Nothing about them looked suspicious. The lesson we took was that the real design question is the boundary: which values the model may propose, and which values plain code must be allowed to reject. OWASP's 2025 guidance to check outputs in deterministic code says the same thing.
How do you plan to handle the benign case, say a vendor adding an optional field, without turning every schema change into a manual review?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
That's a great example, especially the parser issue. Uniformly wrong data is often more dangerous than an obvious failure because it can pass through multiple layers without raising suspicion. For benign schema changes, I'd use deterministic compatibility rules rather than sending every update for manual approval. An optional field could be accepted automatically only if it doesn't expand permissions, expose additional sensitive data or change existing field semantics. The fingerprint would still detect the change, but the policy layer could classify it as low risk and validate it against the approved contract. Anything ambiguous or permission-expanding would pause for review. The goal is to make routine evolution frictionless without allowing compatibility to become a loophole for privilege expansion.
I research AI tools, APIs & agents — comparing specs, pricing and real user reports — then publish honest rankings so you don't waste money. Research-first, never sponsored fluff.
The ₹25,000 → ₹75,000 refund example is the one that made it click for me — everything else here is the tool changing, but that one's the agent changing the action after a human already said yes. That's the scarier shape, because the approval looks valid right up until you compare the payload. Who holds the approval record in your setup — the same process that executes, or somewhere the agent can't reach to mint its own?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
That's exactly why I'd separate approval authority from execution authority. The approval record should live in a trusted orchestration or authorization service, outside the agent's control. The agent can request approval, but it should never be able to create, modify or reuse an approval record. I'd bind the approval to the exact action payload, including the amount, recipient, operation ID and expiry. At execution time, the orchestrator verifies that the requested action matches the approved payload exactly. If ₹25,000 changes to ₹75,000, the approval is invalid and a new human decision is required. The component executing the action should verify approval, not manufacture it.
"The tool's name stayed the same. The trust assumptions did not." That line sums it up. It's the same problem with documents in RAG: the policy file keeps its name, but the content changes, and the bot keeps answering from what it thinks is still true.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
That's a great parallel. RAG systems can make the same mistake by treating a document's identity as proof that its contents are still valid. A policy file may retain the same name and URL while its rules, exceptions or effective dates have changed. I'd apply the same discipline: track document versions or content hashes, verify freshness before retrieval, and make answers traceable to the exact version used. If the source has changed or its current status cannot be verified, the system should flag that uncertainty rather than confidently reuse an outdated answer.
Sharing tutorials and API guides on omnichannel automation. We help devs build seamless end-user workflows across WhatsApp, Telegram, Meta (FB/IG), SMS, and webchat.
This is a very important aspect of AI agent security that doesn't get enough attention. We often focus on whether an agent chooses the right tool, but we sometimes forget that the tool itself can change over time. I particularly like the idea of treating trust as a versioned decision rather than a one-time approval. The distinction between schema verification and actual implementation integrity is especially valuable because a matching schema doesn't always mean the underlying behavior is safe. Ultimately, AI agents need more than smart decision-making; they need continuous verification, clear permission boundaries, and accountability at every step. Really thoughtful breakdown with practical engineering insights!
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
Thank you, I really appreciate that. I think the key issue is that trust in an AI agent cannot stop at the moment a tool is approved. The tool, its implementation, dependencies and permissions can all change, sometimes without an obvious change to the interface. That's why verification needs to continue at runtime, with clear ownership of every approval and action.
Schema fingerprints catch a changed contract, but not a server whose behaviour changes behind an identical schema. How about pinning the server version or package hash next to the schema fingerprint? Also curious how you'd handle re-approval fatigue when only a tool description changes. Would a description-only change be allowed to pass with a warning?
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
I’d pin both where the environment allows it: the schema fingerprint identifies the approved contract, while the server build or package hash helps detect implementation changes behind an unchanged interface. For description-only changes, I’d avoid forcing full re-approval if the change is genuinely non-functional and introduces no new capability or permission. But I’d still record the change, compare it with the approved version and issue a warning for review. If the description changes what the agent is being told the tool can do, it should trigger revalidation.
A technologist working in automation. Here I write up what I actually learn building tools, engineering AI agents, and keeping systems running, along with the workflows and habits that stick.
One race to account for: the contract can change between discovery and execution. I'd bind each approved call to the manifest version the policy layer checked, then reject it if that version changes before dispatch. That still won't detect a server changing behavior behind an unchanged schema, so the server-side permissions remain essential.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
Exactly. This is where the time-of-check-to-time-of-use gap becomes important. Binding the approval to the exact manifest version ensures the agent executes against the contract that was actually reviewed, not whatever happens to be available at dispatch time. I'd also keep server-side authorization as the final enforcement boundary, because a stable schema doesn't guarantee stable behaviour. Client-side validation protects the approved contract; server-side permissions protect the actual operation. Both are necessary for meaningful security.
GMT strategy and custom B2B outreach lists on request: people and companies by ICP, domain, profile URL, email or name. 1B+ profiles. Claude Code plugins, API, MCP. kevin@outricher.com
the name staying the same is the trap, so i keep a hash of the tools list and one sample response shape from each server, a new field with a default on is the thing that gives it away
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
That's a useful additional safeguard. Tracking both the tool definition and a representative response shape can catch changes that a name-based check would miss. I'd just be careful with sample responses, since they may not expose every possible field or conditional behaviour. Combining schema fingerprints, response-shape validation, and a strict output allowlist gives much stronger coverage. The key is to detect drift before the agent gets access to data it was never originally approved to receive.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
Exactly. Familiarity creates a false sense of security. We tend to trust a tool because its name and endpoint haven't changed, while overlooking what its updated schema actually permits. That's why I believe trust should be tied to the complete tool contract, not its identity label. Even a small schema change deserves detection before execution.
Hi, I'm Atul Kumar, an AI Engineer passionate about Generative AI, AI Agents, and building practical AI solutions. I enjoy sharing what I learn and exploring the future of intelligent technology.
Thank you! I really appreciate you taking the time to read it. Glad you found it useful. I believe these practical discussions are important as AI agents move into real-world workflows. Always happy to exchange ideas and learn from different perspectives!
We're a place where coders share, stay up-to-date and grow their careers.
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.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.
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 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.
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.
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.
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.
Same trust problem one level down. I once accepted a package an agent suggested without checking it, and it pulled in a pile of dependencies nobody had asked for. A tool that changes its schema overnight is that, with no lockfile to diff.
That’s a good analogy. An unreviewed dependency can quietly expand an application's attack surface, just as an unreviewed tool update can expand an agent’s permissions or behaviour. I’d treat both as supply-chain changes: pin the approved version, inspect the diff, verify dependencies and permissions, and require renewed approval when the contract or capability boundary changes. The important part is that the agent must not automatically trust what it discovers at runtime.
Renewed approval when the capability changes is the part I hadn't thought about. Pinning feels obvious once a dependency has burned you.
Absolutely. A dependency incident makes you realise that pinning isn't just about reproducibility; it's about preserving the boundary of what was actually reviewed and approved. The same principle applies to AI tools: if their capabilities or permissions change, the old approval no longer tells us what we're trusting.
This is an interesting model. In relation to the example given of description changes – would even a minor change need to be re-approved?
Is there not a risk of excessive re-approval processes if servers regularly update their documentation?
That's a fair concern. I wouldn't require full re-approval for every minor documentation change. I'd distinguish between cosmetic edits and changes that affect the tool's meaning, intended use, permissions or expected behaviour. A typo correction shouldn't trigger the same process as a description change that alters how an agent interprets a tool's capabilities. The fingerprint should detect all changes, but a predefined policy should classify their risk. Low-risk changes can go through lightweight validation, while security-relevant or behaviour-changing updates require explicit review. The goal is to prevent silent permission expansion without turning routine maintenance into an approval bottleneck.
That makes sense. Separating "something changed" from "how much it matters" is the key point. Fingerprinting everything but triaging by risk keeps the signal without the approval fatigue.
I'm curious how you'd handle the classification itself, though. A description edit can look cosmetic and still change how the model reads the tool. Rewording "retrieves order details" to "retrieves order and customer details" is a small diff with a big change in meaning. Would you lean on rules, like flagging any change to verbs, nouns or scope words, or would you have a model compare the old and new descriptions? And should schema or permission changes always skip the lightweight path no matter how small the diff is?
I'd use a hybrid approach: deterministic rules for hard boundaries and model-assisted semantic comparison for description changes. Rules can flag changes to permissions, required parameters, data fields, defaults and constraints. Those should always leave the lightweight path, regardless of how small the diff looks. A model can then compare old and new descriptions for changes in capability, scope, intended use or interpretation. For example, "retrieves order details" becoming "retrieves order and customer details" should be treated as a potential data-access expansion, not a cosmetic edit. But I wouldn't let the model approve the change itself. It should explain the semantic difference and assign a risk category; ambiguous or capability-expanding changes go to human review. The principle I'd follow is that small textual changes can have large permission or behavioural consequences, so review should be based on semantic impact, not diff size.
Schema hashing is a useful tripwire, but it only describes the declared interface. I would pair it with a signed capability manifest that states data classes, side effects, and effective identity, then require a new approval when that contract broadens. A stable tool name and even a stable JSON schema should not preserve trust when implementation permissions or downstream retention have changed.
I agree. Schema hashing verifies the declared interface, but it doesn't prove what the tool is actually permitted to do behind that interface. A signed capability manifest adds the missing context: data access, side effects, execution identity and downstream retention. I’d bind that manifest to the approved contract version and verify both at runtime. Any expansion of permissions or data handling should trigger fresh approval, even if the JSON schema remains unchanged.
Tool-name stability hiding a changed return payload or a widened input schema is such an underrated MCP risk. Pinning or hashing the tool schema and description at approval time—and failing closed when a remote server drifts—feels like the missing lockfile equivalent for agents.
Exactly. We have become accustomed to pinning dependencies in traditional software, but AI agents need the same discipline for their tools. A stable tool name should never imply a stable contract. I'd also include response-field validation at the gateway, because an unchanged schema doesn't guarantee that the server's actual output hasn't changed. The goal is to make tool trust version-bound, continuously verified and enforced outside the model's reasoning process.
pinning the approved inputSchema and server_identity in a manifest instead of trusting the tool name is the right boundary
once an MCP server adds a default-true param like include_internal_notes, dynamic discovery without a diff check turns into silent scope creep
Exactly. The tool name is only a label, not a trust boundary. Pinning the approved
inputSchemaandserver_identityin a manifest gives the consumer something concrete to verify before accepting a discovered tool. A new default-true parameter likeinclude_internal_notesis particularly risky because existing callers may inherit broader behaviour without changing their requests. I’d flag that as a contract change, block automatic adoption and require explicit re-approval.One important challenge with agentic AI systems is that tool trust needs to be continuously validated, not just established during the initial integration. A tool can retain the same name and input schema while its underlying implementation, data access, or execution permissions change.
Schema fingerprinting is a useful way to detect contract changes, but I would also emphasize runtime authorization and server-side permission enforcement. Even when a tool passes schema verification, every invocation should independently validate the requested action, resource access, and permitted capabilities.
In production agentic AI engineering at IT Path Solutions, this distinction is important because reliable autonomy depends on maintaining clear boundaries between what an agent can discover, what it can request, and what the system actually allows it to execute.
A fail-closed approach for unverified tool changes, combined with versioned approvals, audit logging, and continuous security testing, can help prevent seemingly harmless updates from becoming production security incidents.
I agree with the distinction between detecting a change and enforcing trust at runtime. Fingerprinting tells us whether the contract has changed, but it cannot prove that the requested action is safe. I’d treat schema verification as an integration-time control and authorisation as a per-invocation decision. The server should validate the agent’s identity, requested action, resource scope and current permissions before execution, regardless of what the tool description or schema says. I’d also log the authorisation decision alongside the tool and contract versions so the execution can be reconstructed later.
A trusted schema should never become a blanket permission to execute.
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, Atul 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?
The point that landed for me is that approval is usually treated as a one-time event, while the thing approved keeps changing underneath it. A tool called get_order_details that quietly starts returning more customer fields is still "the same tool" to the model, which is exactly why the thread keeps arriving at the same answer: the check has to live in middleware that compares a fingerprint, not in the model noticing something feels different.
We learned a smaller version of this at Ascendra Ventures while building memory for AI coding tools. One handwritten parser read every field one column off, and the numbers it reported were confidently and uniformly wrong. Nothing about them looked suspicious. The lesson we took was that the real design question is the boundary: which values the model may propose, and which values plain code must be allowed to reject. OWASP's 2025 guidance to check outputs in deterministic code says the same thing.
How do you plan to handle the benign case, say a vendor adding an optional field, without turning every schema change into a manual review?
That's a great example, especially the parser issue. Uniformly wrong data is often more dangerous than an obvious failure because it can pass through multiple layers without raising suspicion. For benign schema changes, I'd use deterministic compatibility rules rather than sending every update for manual approval. An optional field could be accepted automatically only if it doesn't expand permissions, expose additional sensitive data or change existing field semantics. The fingerprint would still detect the change, but the policy layer could classify it as low risk and validate it against the approved contract. Anything ambiguous or permission-expanding would pause for review. The goal is to make routine evolution frictionless without allowing compatibility to become a loophole for privilege expansion.
The ₹25,000 → ₹75,000 refund example is the one that made it click for me — everything else here is the tool changing, but that one's the agent changing the action after a human already said yes. That's the scarier shape, because the approval looks valid right up until you compare the payload. Who holds the approval record in your setup — the same process that executes, or somewhere the agent can't reach to mint its own?
That's exactly why I'd separate approval authority from execution authority. The approval record should live in a trusted orchestration or authorization service, outside the agent's control. The agent can request approval, but it should never be able to create, modify or reuse an approval record. I'd bind the approval to the exact action payload, including the amount, recipient, operation ID and expiry. At execution time, the orchestrator verifies that the requested action matches the approved payload exactly. If ₹25,000 changes to ₹75,000, the approval is invalid and a new human decision is required. The component executing the action should verify approval, not manufacture it.
"The tool's name stayed the same. The trust assumptions did not." That line sums it up. It's the same problem with documents in RAG: the policy file keeps its name, but the content changes, and the bot keeps answering from what it thinks is still true.
That's a great parallel. RAG systems can make the same mistake by treating a document's identity as proof that its contents are still valid. A policy file may retain the same name and URL while its rules, exceptions or effective dates have changed. I'd apply the same discipline: track document versions or content hashes, verify freshness before retrieval, and make answers traceable to the exact version used. If the source has changed or its current status cannot be verified, the system should flag that uncertainty rather than confidently reuse an outdated answer.
This is a very important aspect of AI agent security that doesn't get enough attention. We often focus on whether an agent chooses the right tool, but we sometimes forget that the tool itself can change over time. I particularly like the idea of treating trust as a versioned decision rather than a one-time approval. The distinction between schema verification and actual implementation integrity is especially valuable because a matching schema doesn't always mean the underlying behavior is safe. Ultimately, AI agents need more than smart decision-making; they need continuous verification, clear permission boundaries, and accountability at every step. Really thoughtful breakdown with practical engineering insights!
Thank you, I really appreciate that. I think the key issue is that trust in an AI agent cannot stop at the moment a tool is approved. The tool, its implementation, dependencies and permissions can all change, sometimes without an obvious change to the interface. That's why verification needs to continue at runtime, with clear ownership of every approval and action.
Schema fingerprints catch a changed contract, but not a server whose behaviour changes behind an identical schema. How about pinning the server version or package hash next to the schema fingerprint? Also curious how you'd handle re-approval fatigue when only a tool description changes. Would a description-only change be allowed to pass with a warning?
I’d pin both where the environment allows it: the schema fingerprint identifies the approved contract, while the server build or package hash helps detect implementation changes behind an unchanged interface. For description-only changes, I’d avoid forcing full re-approval if the change is genuinely non-functional and introduces no new capability or permission. But I’d still record the change, compare it with the approved version and issue a warning for review. If the description changes what the agent is being told the tool can do, it should trigger revalidation.
One race to account for: the contract can change between discovery and execution. I'd bind each approved call to the manifest version the policy layer checked, then reject it if that version changes before dispatch. That still won't detect a server changing behavior behind an unchanged schema, so the server-side permissions remain essential.
Exactly. This is where the time-of-check-to-time-of-use gap becomes important. Binding the approval to the exact manifest version ensures the agent executes against the contract that was actually reviewed, not whatever happens to be available at dispatch time. I'd also keep server-side authorization as the final enforcement boundary, because a stable schema doesn't guarantee stable behaviour. Client-side validation protects the approved contract; server-side permissions protect the actual operation. Both are necessary for meaningful security.
the name staying the same is the trap, so i keep a hash of the tools list and one sample response shape from each server, a new field with a default on is the thing that gives it away
That's a useful additional safeguard. Tracking both the tool definition and a representative response shape can catch changes that a name-based check would miss. I'd just be careful with sample responses, since they may not expose every possible field or conditional behaviour. Combining schema fingerprints, response-shape validation, and a strict output allowlist gives much stronger coverage. The key is to detect drift before the agent gets access to data it was never originally approved to receive.
I think the silent schema change is the part that worries me most, because a familiar tool name makes it easy to miss.
Exactly. Familiarity creates a false sense of security. We tend to trust a tool because its name and endpoint haven't changed, while overlooking what its updated schema actually permits. That's why I believe trust should be tied to the complete tool contract, not its identity label. Even a small schema change deserves detection before execution.
very good article
Thank you! I really appreciate you taking the time to read it. Glad you found it useful. I believe these practical discussions are important as AI agents move into real-world workflows. Always happy to exchange ideas and learn from different perspectives!