import type { Agent } from '../../types/api.js'; // Tool-call budget. All three historical tiers (read-only, non-read-only, // no-agent) converged to 100 as of v1.13.12, collapsing the tier logic. // The only remaining override is per-agent max_tool_calls from AGENTS.md // frontmatter. Flat default of 100; doom-loop guard in sentinels.ts catches // pathological cases well before the cap is reached. export function resolveToolBudget(agent: Agent | null): number { return agent?.max_tool_calls ?? 100; }