Skip to Content
Tares

What should I do when an AI SRE run on slow database queries ends as exhausted?

When an AI SRE run on slow database queries ends as exhausted, raise max rounds for that Tares agent, under Advanced on the agent form or as max_rounds in catalog YAML. Exhausted means the agent used its whole model-round budget before it could conclude. The run keeps the last text as a partial note, so you lose nothing already worked out. Raise the cap, then fire the trigger again.

How it works

Each Tares agent has a budget per run. The budget is max_rounds model rounds, from 1 to 24, with 2,048 tokens per call.

  • Default cap: If you leave it unset, the cap is 6 rounds. Once the agent uses external MCP servers, the default is 12, because a run that reads a diff or a file and writes back needs more than a read-and-conclude budget.
  • Rounds recorded: Every run records the cap it was held to and shows it as rounds/max. A run showing 6/6 hit its cap.
  • Last call to conclude: When the budget runs out mid-investigation, the model gets one final call with tools disabled. It must conclude from what it has already gathered.
  • Exhausted: If the model still cannot conclude, the run ends as exhausted. Tares keeps the last text as a partial note and tells you to raise max rounds.

A slow-queries investigation tends to spend rounds reading a wider window of the timeline, or another entity, before it writes anything. That is why the default of 6 can run out. An exhausted run is recorded under the agent’s page, in Runs. It is not written to the timeline as a finding.

Set it up

  1. Open the agent’s page and go to Runs. Find the run with status exhausted and read the rounds/max value. Read the partial note too. It shows how far the agent got.
  2. Pick a new cap. It must be between 1 and 24. If the run hit 6/6, try 12 and raise it again only if it still ends exhausted.
  3. In the console, open the project’s Advanced setup and open the agent. Open Advanced on the agent form and set max rounds. Save the agent.
  4. If you manage agents as a catalog, set max_rounds on the agent in your catalog YAML instead. Catalog YAML is exported and imported with everything else, so the change ships with your seed catalog.
agents: - name: incident-first-look project: Default # optional; the project that made it trigger: incident # the trigger that wakes it enabled: true # on in its project max_rounds: 12 prompt: | You are an SRE taking the first look when an alert fires on this service. You are handed the correlated timeline: the firing alert plus the signals behind it and the request logs. Produce a tight incident note: what is failing and since when, the most likely cause tied to specific evidence lines, and a suggested next action. Do not speculate beyond the evidence.
  1. Fire the agent’s trigger again, or wait for the next firing. Then check Runs for the new status and the rounds/max value.
  2. Read the conclusion on the project’s Overview under What the agents found. The same finding appears in Explore on the entity’s timeline, next to the evidence it was drawn from.

The Build an AI SRE guide walks the whole loop on a demo system, if you want to see a run end to end first.

Two other limits can stop the next run, so keep them in mind while you retest. The agent runs at most once per the trigger’s cooldown per entity. It also runs at most 50 times per agent per day, set by TARES_AGENT_DAILY_CAP.

What you get

  • A run that concludes: With enough rounds, the agent finishes its investigation of the slow queries. It writes a finding with a headline, summary and next step on the entity’s timeline.
  • Nothing lost on the way: An exhausted run keeps its last text as a partial note. You can read how far the agent got before you change anything.
  • A clear signal for tuning: Each run shows rounds/max, so you can see how close to the cap it ran. Raise the cap only as far as the runs need.
  • A bounded bill: The cap is at most 24 rounds, 2,048 tokens per call, and 50 runs per agent per day. A higher max rounds raises the cost of one run, but not without limit.
  • The same setting in the console and in YAML: Whichever way you manage agents, the field is the same, so the fix survives export and import.

When something else fits

  • If runs end exhausted even at a high cap, the agent’s prompt may ask for too much in one run. Narrow it to one clear question about the slow queries, or split the work and hand off part of it to a second agent.
  • If a run ends as inconclusive or fails rather than exhausted, the cause is not the round budget. Open the run under Runs and read its status and errors.

Still stuck? Get help

Last updated on