# Limits

> Every limit of the agent: analyses a day or a month, analyses per problem, pull requests a month on Sypnia Cloud, sizes, timeouts, and what happens at each limit.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://telemetry.docs.sypnia.com/agent/limits/

For agents: Limits of Sypnia's analysis: analyses per project per day on the engine (setting SYPNIA_AI_MAX_ANALYSES_PER_DAY), per organization per month on Sypnia Cloud (plan numbers only in cloud/plans-and-limits; Free also at most 10 a day), 3 per problem per day, pull requests a project setting off by default and not included in the Free plan (plan numbers only in cloud/plans-and-limits), input and output sizes, timeout and retries, weekly suggestions caps.

**\[Engine]** **\[Cloud]** The agent has limits so that a bad day cannot turn into a large bill, yours or ours. At every limit Sypnia says so in plain sight; it never analyses less quietly.

## Analyses

| Limit                            | Self-hosted engine                                                                                    | Sypnia Cloud                                                                                                                                                                                         |
| -------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Analyses                         | 100 a day per project by default. Yours to set with `SYPNIA_AI_MAX_ANALYSES_PER_DAY`; `0` is no limit | A number a month for the organization, the plan's in the table [The plans](https://telemetry.docs.sypnia.com/cloud/plans-and-limits#the-plans), plus add-ons on Team. On Free, also at most 10 a day |
| Analyses a day, per problem      | 3 by default (`SYPNIA_AI_MAX_ANALYSES_PER_PROBLEM_PER_DAY`)                                           | 3                                                                                                                                                                                                    |
| Asking by API (`POST …/analyze`) | 10 a minute per token                                                                                 | 10 a minute per token                                                                                                                                                                                |

A day is a calendar day in UTC, and a month a calendar month in UTC. Every run counts: the first analysis of a problem, a new one because it grew or came back, and one you asked for.

**At the limit**, a new problem gets `analysis.status` `limit_reached`. It keeps its technical title, still alerts, and its prompt carries the evidence. When the count starts again (the next day on an engine and for Free's daily cap, the next month on Sypnia Cloud), problems that are still open and were skipped are analysed first, those that hit the most people first. A `usage.limit` alert is created at 80 % and at 100 %.

[`GET /v1/usage`](https://telemetry.docs.sypnia.com/api/projects-keys-and-tokens) returns `analyses.used_today` and `analyses.limit_per_day` (the engine's setting, or Free's 10), and on Sypnia Cloud `analyses.organization_used` and `analyses.limit` for the month.

## Pull requests **\[Cloud]**

Pull requests are a project setting, off by default, and not included in the Free plan. How many Sypnia opens a month on the Builder and Team plans is in the table [The plans](https://telemetry.docs.sypnia.com/cloud/plans-and-limits#the-plans), and nowhere else. Counted per organization, per calendar month in UTC, when a pull request is opened. A pull request that Sypnia could not write does not count. See [Pull requests](https://telemetry.docs.sypnia.com/agent/pull-requests). The engine has no pull requests and so no such limit.

## Sizes

These are the same everywhere. They keep one analysis small, fast and cheap.

| What                                              | Limit                                                                                              |
| ------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| Frames of your own code sent, with source lines   | 8 frames, 5 lines on each side                                                                     |
| Breadcrumbs sent                                  | 30                                                                                                 |
| Spans of the trace sent                           | 40, the failing ones and their parents first                                                       |
| Changed files of the release sent with their diff | 10 files, 20,000 characters of diff in all                                                         |
| The whole input                                   | About 24,000 characters. Longer context is cut from the least useful end and the analysis notes it |
| The model's answer                                | 2,000 tokens by default (`SYPNIA_AI_MAX_OUTPUT_TOKENS`)                                            |
| Evidence items in an analysis                     | 1 to 6                                                                                             |
| The ready prompt                                  | 12,000 characters                                                                                  |

One analysis is therefore a few thousand tokens in and under two thousand out. What that costs depends on the model you chose; multiply by your provider's prices.

## Time

| What                              | Limit                                                                                                                                                                                                               |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| One model call                    | 60 seconds by default (`SYPNIA_AI_TIMEOUT_SECONDS`)                                                                                                                                                                 |
| Retries                           | Twice more, after 5 and 30 seconds. Then `failed`, and tried again when the problem grows                                                                                                                           |
| From first failure to an analysis | Usually within the 2 minutes in which the problem appears, so the alert carries the sentence. A slow model can take it to about 3 minutes; the alert does not wait past the 2 and goes out with the technical title |

## Weekly suggestions

| What                        | Limit                                                                   |
| --------------------------- | ----------------------------------------------------------------------- |
| Runs                        | One a week per project and environment                                  |
| Model calls in a run        | At most 25: one per page with findings, the pages with most views first |
| Suggestions kept from a run | At most 20                                                              |
| Counted as analyses?        | No. They have their own cap, above                                      |

The suggestions that come from fixed rules have no limit and need no model.

## Change the limits

On a self-hosted engine every number marked with a setting is yours to change, in the [configuration reference](https://telemetry.docs.sypnia.com/self-hosting/configuration). On Sypnia Cloud the limits are the plan's; see [Plans and limits](https://telemetry.docs.sypnia.com/cloud/plans-and-limits).
