LLM Digest
Subscribe

Agent Builder Foundations

Evidence-tiered mechanisms for agent builders

View as JSON

Agent foundations

Why can a permission check that's correct for a single tool call still let an agent break the rules across many?

Concept·Safety and control·7 sources·updated 2026-11-25

If your tool-call authorization checks each request in isolation (classic RBAC, and Cedar's default), a policy can be correct for every single call and still let the agent do what it was meant to prevent. AWS's example: a $5,000 transfer cap, checked correctly per request, falls to three concurrent $2,000 transfers. The cap logic is fine. The bug is enforcing a stateful rule with a stateless check.

What's new in the evidence
Short answer

Rules about what an agent has already done (approval before acting, rate or spend limits, "stop after touching confidential data") need the agent's event history, not just the current request. AWS's Dogwood adds a when temporal clause to Cedar with four history operators. What the rule counts matters as much as the operator. Counting *settled responses* lets several *in-flight requests* each pass before any of them updates the total.

Builder model

Split authorization into two questions that need different mechanisms:

  • Is this request allowed on its own? A stateless check of caller, action, and resource answers it. Most tool calls only need this.
  • Is it allowed given what the agent already did? Approval workflows, rate or spend limits, and sequencing rules need history. A stateless check cannot answer this however you tune it.

Even history-aware checks fail when they count the wrong event: completed actions instead of issued ones.

Two more questions apply to long-running agents:

  • Is the authority this run started with still valid now? A check at request arrival does not cover a run that keeps working, waits for approval, or retries after the user's status changed.
  • Has the rulebook itself moved? Every check compares against a policy and a tool's approved shape. If a permission reply can edit the policy, or a tool update can widen its arguments, each check stays correct against a rulebook that is no longer the one you approved.
Mechanism

Why stateless is the default. Cedar evaluates a request using only its own context: principal, action, resource, and attributes. That restriction is what lets Cedar formally verify a policy set, for example that no request is both permitted and denied, without simulating every call sequence.

How Dogwood adds history. A when temporal clause is translated into ordinary Cedar context fields, filled from the event history, before the stateless evaluator runs. Temporal reasoning happens once, up front. Four operators cover the common shapes:

  • formerly: did X happen in a window?
  • count_within: how many times?
  • count_distinct_within: how many distinct values?
  • sum_within: what is the running total?

The cost is that temporal conditions give up Cedar's automated formal-analysis guarantees.

The concurrency trap. sum_within(response.amount, 1h) <= 5000 passes every sequential test. Under concurrency, three $2,000 requests are each evaluated while the settled total is still $0, so all three pass. Writing the rule against request events closes the gap, because a request counts the moment it is issued.

Rules that move mid-run. Two 2026 papers show the reference point drifting:

  • Policy edits through answers. Claude Code lets a plugin or remote service answer a permission prompt, and the answer can carry a policy update. Only added allow rules were checked, so an answer could delete a deny rule. The deletion looked like a local operator edit.
  • Tool schemas that widen. In a pilot on 39 public MCP servers, 412 of 580 backward-compatible schema changes widened some argument. No surveyed client re-approved them.

Consistency across servers. Cloudflare's WriteGuard gives many MCP servers one shared risk-tier layer instead of per-server definitions of "risky write".

How to apply
  • Decide up front whether a rule needs history. Approval workflows, rate or spend limits, and post-action sequencing rules do. Most others do not.
  • Count events when they are issued, not when they settle. This applies to any budget or rate limit you write, with or without Dogwood.
  • Use the four operator shapes as vocabulary to name which kind of history a rule needs, even without adopting Dogwood.
  • Test stateful rules with concurrent calls, not only sequential ones.
  • Re-check authority at each write, not only at run start. Test by suspending a user mid-run; Scopehaven's pilot saw 2 of 14 such runs still write a file.
  • Do not make a reference interpreter or private beta your only control. AWS says Dogwood's interpreter is not for production; WriteGuard has no production track record.
  • Treat a policy update as an admin action. Accept one from a delegated answerer only if every denied call stays denied, and record who wrote each rule.
  • Re-approve a tool when its input schema widens, not only when it breaks compatibility.
  • Centralize risk tiering if you run many MCP servers.
Failure modes
  • Testing a spend cap or rate limit only with sequential traffic, then shipping it.
  • Summing responses instead of requests, so in-flight calls slip past a rule that looks correct.
  • Expecting a stateless system (classic RBAC, plain Cedar) to express "stop after the agent did X".
  • Letting whoever answers a permission prompt also delete deny rules.
  • Auto-accepting "compatible" tool updates that add or widen authority-bearing arguments.
  • Deploying a reference implementation or beta as a production control.
Related

See MCP for the protocol both tools govern, agent sandboxing for isolation controls at a different layer, and tool use for the agent-tool integrations where this gap appears.

Evidence · 7 sources
newest first
  1. TheoryWhen Answering Is Administering: Permission Replies That Rewrite Coding-Agent Policytheory/paper-backed · in the feed

    Claude Code checks each permission answer, but only updates that add or replace allow rules. A remote service approves an unrelated command, attaches an update deleting the deny rule on project secrets, and the agent reads them in that session and the next. Proves tight bounds on safe delegation: without rule authorship, accept only updates that keep every denied call denied. The bounds predicted the outcome in all 13 permission designs across 10 agent systems.

  2. BenchmarkSchemaCaps: When a Compatible Tool Update Silently Widens an AI Agent's Authoritybenchmark/result-backed · in the feed

    None of 8 surveyed MCP clients and scanners is documented to re-approve a tool whose input schema widens. In 604 releases of 39 public MCP servers, 412 of 580 backward-compatible schema changes widen some argument, and at least 76 add or widen an authority-bearing one. A subschema-inclusion re-approval rule asks 645 re-approvals, against 1,197 for pinning the schema. Behavior changes behind an unchanged schema stay out of reach.

  3. Field reportA suspended user's agent run still wrote a file: an internal pilotproduction field-report-backed · in the feed

    Vendor internal pilot on a pinned open-source AI workspace with synthetic data. After a test user was suspended, new requests were refused, but in 2 of 14 test cases a run started before the suspension still wrote a file. Small, vendor-run sample, so treat the rate as illustrative, not a prevalence estimate.

  4. TheoryPermission to Retry: A Study of Authorization and Recovery in AI Agent Workflowstheory/paper-backed · in the feed

    Frames the gap: a durable agent can resume a consequential action while its authority has changed and the action's external outcome is uncertain. The study isolates recovery decisions in tool-using agents. Only the abstract was reviewed; no numbers are cited here.

  5. Source storyAWS Open-Sources Dogwood, Extending Cedar to Govern Sequences of Agent Tool Callssource story

    AWS open-sourced Dogwood (Apache 2.0), a Cedar extension adding a `when temporal` clause that reads agent event history. Four operators, macros over Metric First-Order Temporal Logic: formerly, count_within, count_distinct_within, sum_within. Worked example: a $5,000 cap summing settled responses is beaten by three concurrent $2,000 transfers; count requests as issued instead. Caveats: the reference interpreter is not for production, and temporal conditions give up Cedar's automated formal-analysis guarantees.

  6. Source storyCloudflare WriteGuard Brings Fine-Grained Security Controls for MCP Serverssource story

    Cloudflare WriteGuard, in private beta with no production results reported, sits behind Cloudflare's MCP server portal as a shared policy and audit layer. It intercepts MCP tool calls and assigns each operation a risk tier: read-only, minimal impact, contained write, or critical. Stated rationale: reimplementing controls in each server 'would take more work and produce inconsistent behavior.'

  7. EditorialLLM Digest synthesiseditorial inference

    Dogwood and WriteGuard attack the same gap from different sides. Dogwood puts cross-call state into the policy language; WriteGuard centralizes per-operation risk tiering so many MCP servers share one enforcement point. Neither is a proven production control yet, but both are independent 2026 evidence that per-request authorization is no longer treated as enough for agents acting in sequences.