Skip to content

[enhancement] Per-run knobs configurable too — per-tree budget ($5/50/depth-4) and Loop max-iterations, via the same UI + MCP surfaces #477

Description

@serge-ivo

Part of the budget-configurability epic — the “all of them” completeness item.

Scope

Beyond the account circuit breaker, make the run-level bounds settable through the same config resolver, UI, and MCP:

  • Per-delegation-tree budget (DEFAULT_LIMITS in workers/api/src/lib/delegation-budget.ts): costMicros ($5), delegations (50), maxDepth (4). Today only the cost ceiling is auto-derived (p95 × headroom in openBudget); make the defaults explicit and overridable.
  • Loop max-iterations (the “iter 12/50” cap the Loop orchestrator enforces): expose as a per-instance / per-run setting rather than a fixed 50.

Clamp each to a safe maximum. Reuse the resolver + endpoints from the backend/MCP tickets; no separate plumbing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendBackend / Worker / API workdeferred-by-#68Parked under the focus bet (#68) — picking this up is a deliberate overrideenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions