Specification · Controls · EAS-05

EAS-05 Bounds

Every dimension along which an agent can consume resources has an explicit limit, enforced by deterministic code outside the model, so that the worst case of any Run can be stated in advance.

Rationale: Principle 5 essay · 14 controls · L1 6 · L2 5 · L3 3

IDControlLevelFix
EAS-05.01Step limitL1local
EAS-05.02Token limitL1local
EAS-05.03Wall-time limit and call timeoutsL1local
EAS-05.04Cost limitL2local
EAS-05.05Per-tool call limitL1local
EAS-05.06Tool output size limitL1local
EAS-05.07Concurrency limitsL2local
EAS-05.08Retry in exactly one layerL1local
EAS-05.09Retry budgets and circuit breakersL2structural
EAS-05.10Loop detectionL2local
EAS-05.11Token-based hierarchical quotasL3structural
EAS-05.12Queue-based admissionL3structural
EAS-05.13Spend as an alarmL2local
EAS-05.14Planned degradationL3structural

EAS-05.01 Step limit L1

Applies to: All Workflows at rung agent or multi_agent.

Every Run MUST have a maximum number of Steps, enforced by the orchestration layer. Reaching the limit MUST end the Run with a distinct terminal status (budget_exhausted), not an error that triggers a retry.

Why: A confused model can loop indefinitely. At production volume a loop is a statistical certainty, and the only reliable defence is a hard cap the model cannot negotiate with. Essay →

Declared
budgets.steps is set for the Workflow in the manifest.
Static
The framework’s step or recursion limit is set explicitly to a finite value, in code or configuration that the model cannot influence. A framework default counts only if the profile confirms it is finite.
Runtime
Every Run span carries eas.budget.steps.limit; no Run’s step count exceeds it; Runs that hit it end with status budget_exhausted.

Remediation local: Set the framework’s step or recursion limit from the Workflow’s declared budget, and map the limit-reached exception to a terminal status rather than a retryable error.

Hooks: model.before, run.end · Components: orchestrator

EAS-05.02 Token limit L1

Applies to: All Workflows.

Every Run MUST have a cap on total input plus output tokens, checked before each ModelCall against the tokens already consumed.

Why: A Run with few Steps but very large context can cost as much as one with many Steps; a step cap alone does not bound spend. Essay →

Declared
budgets.tokens is set in the manifest.
Static
A check of accumulated usage against a limit runs before each model call (a model.before hook or equivalent). Per-call max_tokens alone does not satisfy this control; it bounds one call, not the Run.
Runtime
eas.budget.tokens.used never exceeds eas.budget.tokens.limit on any Run.

Remediation local: Accumulate gen_ai.usage.* per Run in a model.after hook and refuse further calls in model.before once the limit is reached.

Hooks: model.before, model.after · Components: orchestrator, model-gateway

EAS-05.03 Wall-time limit and call timeouts L1

Applies to: All Workflows.

Every Run MUST have a maximum elapsed active time, and every ModelCall and tool invocation MUST have a timeout. Time spent durably waiting (see EAS-09.02) does not count against the active-time limit.

Why: A stuck tool or a slow provider should release resources and report, not hang. Essay →

Declared
budgets.wall_time_s is set in the manifest.
Static
Explicit timeouts on model clients and on every tool’s outbound I/O; a Run-level deadline enforced by the orchestrator or runtime.
Runtime
No execute_tool or model span exceeds its configured timeout.

Remediation local: Pass explicit timeouts to the model client and to HTTP or database clients inside tools; wrap Run execution in a deadline.

Hooks: run.start, tool.before · Components: orchestrator, tool-gateway, model-gateway

EAS-05.04 Cost limit L2

Applies to: All Workflows.

Every Run MUST have a cap expressed in currency that combines token consumption across models at their respective prices with metered tool and infrastructure costs.

Why: The currency cap catches what the token cap misses, such as an unexpected escalation to a more expensive model. Essay →

Declared
budgets.cost_usd is set in the manifest.
Static
A price table per model and a per-Run cost accumulator checked before each ModelCall.
Runtime
eas.cost.usd is recorded on every model span; Run totals never exceed the limit.

Remediation local: Extend the token accumulator with a per-model price table and enforce the currency cap in the same hook.

Hooks: model.before, model.after · Components: model-gateway · See also: EAS-05.02, EAS-11.02

EAS-05.05 Per-tool call limit L1

Applies to: All Workflows that expose tools to the model.

Every Run MUST cap the number of invocations of each Tool, enforced at the tool interception point.

Why: A common failure is the model calling the same search or lookup repeatedly with minor variations, hoping for a different result. Essay →

Declared
budgets.tool_calls (default and per-tool overrides) in the manifest.
Static
A per-tool counter checked in a tool.before hook or tool gateway.
Runtime
No Run has more execute_tool spans for a Tool than its configured limit.

Remediation local: Add a per-Run, per-Tool counter to the tool interception point and deny with a structured error once exceeded.

Hooks: tool.before · Components: tool-gateway

EAS-05.06 Tool output size limit L1

Applies to: All Tools whose output is returned to the model.

Every Tool MUST declare a maximum output size measured in tokens, and the limit MUST be enforced before the output enters the model’s context. Truncation semantics are specified by EAS-08.01.

Why: An unbounded tool can flood the context window in one call, degrading reasoning and multiplying the cost of every later Step. Essay →

Declared
tools[].output_limit_tokens for every Tool in the manifest.
Static
Output size enforcement in each tool or in a shared tool.after hook.
Runtime
eas.tool.output_tokens never exceeds the Tool’s declared limit.

Remediation local: Enforce limits once in a shared tool.after hook rather than in every tool.

Hooks: tool.after · Components: tool-gateway · See also: EAS-08.01

EAS-05.07 Concurrency limits L2

Applies to: Workflows that fan out (parallel tool calls, parallel sub-agents) or run multi-tenant.

The number of parallel operations in flight MUST be capped per Run, per tenant and per Workflow, so that fan-out cannot overwhelm the systems behind the Tools.

Why: Agents are a different kind of client from people: one Run can fan out across hundreds of entities, at any hour, across every tenant at once. Essay →

Declared
budgets.concurrency in the manifest.
Static
Semaphores or worker-pool limits around parallel tool and sub-agent execution; tenant-level limits in the scheduler.
Runtime
Concurrent execute_tool spans per Run and per tenant never exceed configured limits.

Remediation local: Bound parallel execution with a semaphore sized from the manifest; add tenant-level limits at admission.

Components: scheduler, tool-gateway

EAS-05.08 Retry in exactly one layer L1

Applies to: All Workflows.

For each dependency (model provider, tool backend), retries MUST happen in exactly one layer of the stack, using exponential backoff with jitter and honouring any retry-after signal. All other layers MUST NOT retry that dependency.

Why: If each of three layers retries three times, one logical call becomes twenty-seven attempts, arriving exactly when the provider is overloaded. Essay →

Static
Inventory every retry mechanism on the path to each dependency: model SDK client defaults, framework step retry, tool wrappers (for example decorator-based retry libraries), workflow-engine retry policies. More than one active layer for the same dependency is a finding. SDK client defaults count as an active layer unless explicitly disabled.
Runtime
For a single logical call, retry attempts appear at only one span level.

Remediation local: Choose the owning layer (typically the model gateway or the SDK client), set the others’ retry counts to zero explicitly, and document the choice next to the configuration.

Components: model-gateway · See also: EAS-05.09

EAS-05.09 Retry budgets and circuit breakers L2

Applies to: All Workflows.

Each client MUST have a retry budget limiting retries to a fixed fraction of its normal traffic, and MUST fail fast once the budget is spent. Each dependency MUST be protected by a circuit breaker.

Why: Retry budgets are the limit that most directly separates a bad hour from an outage. Essay →

Static
A retry budget (token bucket or ratio) and circuit breaker configuration for each model provider and tool backend.
Runtime
Retry rate stays below the configured fraction during provider error spikes; breaker state transitions are visible in telemetry.

Remediation structural: Centralise model access behind a gateway that owns retries, budgets and breakers for all Workflows.

Components: model-gateway · See also: EAS-05.08

EAS-05.10 Loop detection L2

Applies to: All Workflows at rung agent or multi_agent.

The orchestration layer MUST detect repeated identical tool calls (same Tool, same normalised arguments) and repeating Step cycles, and MUST end such Runs early with status stuck and an escalation, rather than letting them consume their full budget.

Why: A stuck Run that ends quickly and tells a person is much better than one that silently burns its limit and fails. Essay →

Static
Normalised-argument fingerprinting of tool calls and a repetition threshold in the orchestrator or a tool.before hook.
Runtime
Runs with repeated identical calls end with eas.run.status = stuck.

Remediation local: Fingerprint each ToolRequest (tool name + canonicalised arguments) per Run and stop at a small repeat threshold.

Hooks: tool.before · Components: orchestrator

EAS-05.11 Token-based hierarchical quotas L3

Applies to: Platforms where several Workflows or tenants share model capacity.

All ModelCalls MUST pass through a gateway that enforces quotas measured in tokens, allocated hierarchically (organisation, product, tenant, Run) with guaranteed floors, borrowing, and priority classes that let interactive work take precedence over background work.

Why: Model throughput is the scarce shared resource; it cannot be autoscaled and must be scheduled. Essay →

Static
Model clients point at a gateway rather than directly at providers; quota configuration exists with hierarchy and priorities.
Runtime
Every model span carries tenant and priority attributes; quota rejections are observable.
Attested
How is model capacity allocated between products and tenants, and what happens when a tenant exceeds its share?

Remediation structural: Introduce a model gateway with token-denominated hierarchical quotas; route all model traffic through it.

Components: model-gateway

EAS-05.12 Queue-based admission L3

Applies to: Platforms running Workflows at volume.

Runs MUST be admitted through a durable queue from which workers pull according to available capacity. When capacity is exhausted, work MUST wait rather than fail; low-priority work MAY be refused at admission with a clear status.

Why: Refusing work at admission is far better than accepting work that will time out. Essay →

Static
Run creation enqueues durably; workers pull; admission control exists with priority-aware shedding.
Runtime
Queue wait time is recorded; refusals carry an explicit status.

Remediation structural: Move Run execution behind a durable queue with capacity-aware workers; route non-urgent work to provider batch interfaces.

Components: scheduler

EAS-05.13 Spend as an alarm L2

Applies to: All Workflows in production.

Spend per Workflow and per tenant MUST be tracked against a baseline, and exceeding a configured multiple of that baseline MUST page an owner and pause new Runs of the affected Workflow until a person intervenes.

Why: A prompt edit, routing change or new tool can multiply cost without any error; the first signal should not be the monthly invoice. Essay →

Static
Alert rules on cost per Workflow and tenant with an automated pause action.
Runtime
Hourly cost per Workflow and tenant is derivable from telemetry.
Attested
Who is paged when a Workflow’s spend exceeds its baseline, and what pauses automatically?

Remediation local: Derive hourly cost per Workflow from eas.cost.usd, alert at a baseline multiple, and wire the alert to the kill switch (EAS-10.02).

Components: telemetry-pipeline, release-control · See also: EAS-10.02

EAS-05.14 Planned degradation L3

Applies to: Platforms running Workflows at volume.

The platform MUST define a degradation order in advance (for example: shed background work, reduce low-priority tenants to their floor, shrink context, route to evaluated smaller models, queue interactive work with honest status). A Run MUST NOT be shed partway through its side effects; capacity for in-flight Runs MUST be reserved before new work is admitted.

Why: Degradation decided during an incident is improvised; a Run abandoned between two side effects leaves the world half-changed. Essay →

Static
Admission logic distinguishes Runs with committed but unexecuted ActionIntents.
Attested
What is the documented degradation order, and how does admission protect Runs with in-flight side effects?

Remediation structural: Document the degradation order as a runbook and encode in-flight protection in the scheduler.

Components: scheduler, model-gateway