# Roo Code Rate Limits: Token Exhaustion, Provider Quotas, and MCP Workspaces

Roo Code rate limit refers to API rate limits (HTTP 429) hit when Roo Code's multi-step agent modes issue rapid sequential tool calls and large context window re-evaluations. Autonomous agent loops re-reading entire directory trees quickly exhaust RPM and TPM quotas across model providers. Connecting Roo Code to remote Fast.io MCP workspaces lets agents query indexed file context on demand instead of stuffing repositories into active prompt history.

Source: https://fast.io/resources/roo-code-rate-limit/
Author: [Tom Langridge](https://fast.io/authors/tom-langridge/)
Last reviewed: 2026-09-24

## Why Roo Code Hits API Rate Limits and Provider Quotas

According to [Anthropic's documentation for Claude](https://support.claude.com/en/articles/8241126-upload-files-to-claude), chat uploads accept up to 20 files at up to 500MB each, while Claude Projects allows unlimited files at up to 30MB each, provided the total content fits within the context window. When software engineering teams accumulate large repositories, architectural specifications, and API documentation that exceed those project limits, developers frequently move their workflows into autonomous coding extensions like Roo Code. Running an agent directly against a local codebase replaces one boundary with another: API rate limits and token exhaustion.

Roo Code rate limit refers to API rate limits (HTTP 429) hit when Roo Code's multi-step agent modes issue rapid sequential tool calls and large context window re-evaluations. Unlike a standard chat assistant that takes a single user prompt and produces one isolated answer, Roo Code operates through multi-turn agentic loops. In code execution, architect planning, and automated debugging modes, the extension examines directory hierarchies, opens implementation files, runs terminal tests, and applies surgical code edits. Developers can inspect the agent architecture directly in the [Roo Code repository on GitHub](https://github.com/RooCodeInc/Roo-Code).

Autonomous agent loops can execute 30+ model calls in a single refactoring task. Each intermediate step produces an API request back to your configured model provider. These continuous requests interact with two distinct rate limit controls:

* **Requests Per Minute (RPM):** The total number of individual HTTP calls transmitted to the provider within a rolling 60-second window. Rapid sequential tool executions easily trigger RPM throttling when steps complete in a few hundred milliseconds.
* **Tokens Per Minute (TPM):** The total volume of input and output tokens evaluated within a rolling 60-second window. Every request re-sends the cumulative conversation history, current system prompt, active tool specifications, and all prior tool results.

Re-reading whole project trees inflates TPM usage toward provider caps. During multi-step tasks, the entire conversation history is re-transmitted on every single turn. If an active session accumulates 60,000 tokens of file contents and debug traces, executing four tool steps in a single minute sends 240,000 input tokens to the provider within that 60-second window. That sudden burst quickly exceeds the rate ceilings of entry-level and intermediate provider tiers.

The table below illustrates how primary model providers structure their rate-limiting mechanics and where autonomous coding agents hit throughput walls:

| Model Provider | Primary Rate Controls | Quota Mechanism | Common Failure Trigger in Roo Code |
|---|---|---|---|
| **Anthropic Claude API** | Input TPM, Output TPM, RPM | Token bucket replenishment across Start, Build, and Scale tiers | Multi-turn loops re-evaluating large context windows in rapid succession |
| **OpenAI Platform** | TPM and RPM | Tiered usage allowances based on cumulative payment history | Wide directory scans or test outputs sent across multiple turns |
| **Google Gemini API** | RPM, TPM, Requests Per Day | Per-project quotas separated by free and pay-as-you-go tiers | High-frequency tool iterations exhausting per-minute request allowances |
| **OpenRouter** | Upstream provider pass-through and credits | Upstream provider rate pass-through with concurrency limits | Rapid parallel tool execution during repository indexing |

When a provider returns an HTTP 429 status code, Roo Code halts execution or attempts an automated backoff retry. If the underlying cause is accumulated context rather than a momentary request burst, backoff retries fail because the payload remains too large for the provider's token bucket.

## How to Avoid Roo Code Rate Limits: Three Immediate Strategies

When running Roo Code on complex repositories, developers can prevent rate limit exceptions by applying targeted configuration changes. The three immediate strategies to avoid rate limits when running Roo Code on large projects are:

1. **Configure Per-Profile Request Delays:** Add a minimum wait time between sequential API calls in Roo Code Advanced Settings to stay below provider RPM thresholds.
2. **Scope File Scans with `.rooignore`:** Exclude build outputs, package caches, minified bundles, and generated assets to prevent ballooning TPM consumption.
3. **Decouple Reference Knowledge via External MCP Workspaces:** Offload large documentation sets, API schemas, and historical codebases to indexed remote workspaces that return concise search snippets rather than full documents.

### 1. Configure Per-Profile Request Delays in Roo Code Settings

By default, Roo Code fires subsequent API requests immediately after a tool finishes running in your local environment. When a command executes in less than a second, several requests hit your provider within seconds, exhausting short-term token-bucket burst capacity.

Roo Code includes a dedicated rate-limiting control inside each API Configuration Profile. To access and tune this setting:

* Open the Roo Code panel in VS Code and click the Settings gear icon.
* Select the active **API Configuration Profile** for your current provider.
* Scroll to **Advanced Settings** and locate the **Rate Limit Delay** slider.
* Increase the delay from `0` to a value between `3` and `7` seconds.

Setting a 5-second delay forces Roo Code to pause between sequential model invocations. This spacing smooths request bursts over time, allowing your provider's token bucket to replenish between turns without triggering an HTTP 429 response.

### 2. Restrict Directory Traversals with `.rooignore`

Autonomous agents frequently attempt to explore your project structure by issuing broad directory listings or recursive grep searches. If your workspace contains third-party dependencies, generated build artifacts, or large data files, a single command can pull tens of thousands of unneeded tokens into active context.

Create a `.rooignore` file in the root of your project directory to restrict which files Roo Code can read and index:

```text
node_modules/
vendor/
.pnpm-store/
dist/
build/
.next/
.turbo/
out/
target/
.git/
.env
.env.*
*.lock
package-lock.json
coverage/
*.log
.cache/
*.min.js
*.map
```

Filtering these paths prevents Roo Code from ingesting dependency lockfiles, minified JavaScript, or build caches. A single lockfile can easily consume 40,000 tokens; excluding it preserves valuable per-minute token headroom.

### 3. Decouple Static Reference Documents from Active Context

The most common cause of sustained TPM exhaustion is prompt stuffing: pasting API documentation, SDK manuals, design systems, and database schemas directly into prompt instructions or project rules. Once loaded, those static reference documents are re-sent on every subsequent tool turn. Moving those assets to an indexed workspace ensures Roo Code accesses only the relevant paragraphs when needed. Teams can learn more about configuring remote storage on the [storage for AI agents](/storage-for-agents/) overview page.

## The Large-Corpus Trap: Why Switching Models Fails at Scale

Most guides addressing Roo Code rate limits suggest switching to an alternative model provider or selecting a model with an expanded context window. Developers are frequently advised to move from Claude 3.5 Sonnet to Google Gemini 1.5 Pro, or route their requests through OpenRouter to tap higher concurrency tiers. While changing providers can temporarily dodge a depleted per-minute bucket, it addresses a symptom rather than the underlying architectural defect.

Relying on massive context windows to solve rate limits creates three major operational bottlenecks:

First, expanded context windows still enforce strict Tokens Per Minute caps. While models like Google Gemini 1.5 Pro or Claude with 1,000,000 tokens accept massive single prompts, provider rate limiters evaluate input volume per minute. If you send a 300,000-token prompt into an agent loop, you can execute at most one or two turns per minute before triggering an HTTP 429 error. The larger your active context becomes, the fewer tool calls you can make in any given time window.

Second, attention degradation and context poisoning reduce agent precision. When an agent context is packed with hundreds of thousands of tokens of reference manuals, SDK documentation, and third-party API guides, the model's retrieval precision declines. Subtle syntax rules and edge-case configurations become obscured by surrounding tokens. The agent frequently hallucinates parameters or combines conflicting conventions from different library versions. Roo Code's documentation on context poisoning highlights that accumulating irrelevant data in the active context window degrades reasoning output over time.

Third, financial cost and turn latency multiply with every step. Consider a practical refactoring scenario:

* An agent session holds 120,000 tokens of codebase context, library manuals, and test logs.
* A refactoring task requires 30 sequential tool executions (reading files, testing edits, inspecting errors).
* The task consumes 3,600,000 cumulative input tokens over its execution lifecycle.
* Each turn requires 15 to 40 seconds of transmission and inference latency, stretching a short coding job into a protracted, expensive wait.

Prompt caching provides meaningful discounts for static prompt prefixes, but iterative agent loops constantly produce new terminal output, modified file diffs, and updated tool calls. These changes frequently invalidate cache segments or force partial re-computations, causing API bills and token rates to climb.

The core problem is not provider capacity. The problem is treating the language model's active context window as a file repository.

## How to Offload Project Knowledge to Fast.io MCP Workspaces

The architectural fix for Roo Code token exhaustion is separating persistent project knowledge from active conversational context. Instead of storing reference manuals, API specifications, and architectural documentation in the local project directory or pasting them into prompt instructions, teams can place that corpus into a dedicated workspace using [Fast.io workspaces](/product/workspaces/).

Fast.io provides intelligent workspaces designed for autonomous agents and developer teams. When files are uploaded or imported from external cloud sources such as Google Drive, OneDrive, Box, or Dropbox, Fast.io's Intelligence Mode indexes them for hybrid search. This index combines semantic vector retrieval with full-text keyword indexing. Instead of feeding whole files into Roo Code's context, the agent connects via the Model Context Protocol (MCP) and queries exact information as needed. Technical documentation for setting up agent connections is available in the [agent onboarding guidelines](https://fast.io/llms.txt) and the [storage for AI agents](/storage-for-agents/) documentation.

### Connecting Roo Code to Fast.io MCP

Roo Code connects to external MCP servers through its configuration file. In VS Code, MCP servers are declared in `cline_mcp_settings.json` located within the extension's global configuration directory.

Fast.io hosts a remote MCP server accessible over Streamable HTTP. To integrate Fast.io with Roo Code, add the server definition to `cline_mcp_settings.json`:

```json
{
  "mcpServers": {
    "fastio": {
      "url": "https://mcp.fast.io/mcp/key",
      "headers": {
        "Authorization": "Bearer YOUR_FASTIO_API_KEY"
      }
    }
  }
}
```

This configuration registers a consolidated MCP toolset directly within Roo Code. The extension discovers the available tools without requiring local Node.js packages or custom runtime scripts.

### On-Demand Context Retrieval in Practice

When connected, Roo Code can query workspace knowledge using natural language search queries through the consolidated `storage` tool using the `search` action:

```json
{
  "server_name": "fastio",
  "tool_name": "storage",
  "arguments": {
    "action": "search",
    "query": "authentication header format and token refresh endpoint"
  }
}
```

Instead of ingesting an entire 80-page API documentation document (consuming roughly 25,000 tokens), Roo Code receives a 350-token excerpt containing the exact endpoint structure, headers, and payload schema.

This approach delivers three decisive benefits for rate limit management:

* **Drastic TPM Reduction:** Active context remains lean (typically between 5,000 and 15,000 tokens), keeping per-minute token volume well below provider rate ceilings.
* **Consistent Latency:** Responses return in 2 to 4 seconds rather than 30+ seconds, allowing the agent to complete tasks quickly.
* **Preserved Reasoning:** The model focuses its attention on the code being modified rather than sorting through thousands of lines of peripheral documentation.

The table below summarizes subscription options for development teams deploying shared agent workspaces:

| Fast.io Subscription Tier | Monthly Pricing | Platform Features |
|---|---|---|
| **Starter** | $9.99/mo | Remote MCP server access, per-file version history, activity feed |
| **Business** | $49.99/mo | Expanded team capacity, Intelligence indexing, custom shares |
| **Enterprise** | $199.99/mo | High-concurrency agent workflows, extended audit trails |

Monthly plans start with a trial of up to 30 days (credit card required); annual plans have no trial. Paid organization tiers include Starter, Business, and Enterprise, with full pricing details on the [Fast.io pricing page](/pricing/). Credits meter AI work, while workspace storage and team seats are included with each subscription plan.

## Operational Workflows for High-Throughput Agentic Coding

In addition to offloading static documentation to an MCP workspace, developers can structure their daily coding workflows to maintain high throughput and avoid hitting provider quotas.

### 1. Mode Specialization: Plan Before Executing

Roo Code supports custom operating modes, including Architect, Code, and Ask modes. Running an agent directly in Code mode on an ambiguous prompt leads to exploratory trial-and-error loops, where the agent repeatedly runs directory scans, reads arbitrary files, and tests broken assumptions.

To optimize token usage:

* Start complex tasks in **Architect mode** to draft an implementation plan and identify the exact files requiring edits.
* Review the proposed steps and ensure the agent knows the precise scope before writing code.
* Switch to **Code mode** to execute the scoped modifications sequentially.

Separating architectural discovery from code modification cuts unnecessary exploratory tool turns in half, directly preserving both RPM and TPM budgets.

### 2. Modular Tasks and Git Checkpoints

Never assign an entire multi-system refactoring task to a single continuous Roo Code session. As conversation history grows past 50,000 tokens, every minor syntax fix becomes an expensive, slow API call.

Adopt a checkpoint-and-commit cadence:

* Scope each task to a single logical component, function, or test suite.
* Once Roo Code successfully completes the module and tests pass, commit the code to git.
* Click the **New Task** icon in Roo Code to reset the conversation context to zero.
* Reference the newly committed changes or query the Fast.io MCP workspace for the next phase.

Resetting the session clears the accumulated message history, dropping your input token payload back to the baseline system prompt size.

### 3. Tree-Sitter AST File Folding Awareness

Roo Code employs tree-sitter to parse the abstract syntax tree of viewed files, folding function implementations while preserving class interfaces, type signatures, and exported contracts. This feature helps prevent inspected code from dominating conversational history.

To maximize the effectiveness of AST folding, keep individual source files focused on single responsibilities. When files exceed 2,000 lines, even folded representations consume significant context. Modular codebases with clear interface boundaries naturally consume fewer tokens during agent inspections.

By combining local request delays, disciplined task boundaries, and persistent Fast.io MCP workspaces, development teams can run autonomous coding agents continuously without confronting HTTP 429 rate limit errors or runaway API costs.

## Frequently asked questions

### How do I fix rate limits in Roo Code?

To fix rate limits in Roo Code, open the extension settings, navigate to your active API Configuration Profile, and increase the Rate Limit Delay slider under Advanced Settings to between 3 and 7 seconds. Next, add a .rooignore file in your workspace root to exclude large folders like node_modules and dist. Finally, offload large documentation files and reference specs to an indexed Fast.io MCP workspace so the agent retrieves targeted context rather than stuffing full documents into prompt memory.

### Why does Roo Code hit 429 errors?

Roo Code hits HTTP 429 errors because autonomous agent modes execute rapid sequential tool calls while re-transmitting the entire conversation history on every turn. In multi-step tasks requiring dozens of model calls, bursty tool completions exhaust provider Requests Per Minute quotas, while accumulated context re-evaluations exhaust Tokens Per Minute caps.

### How can I reduce token usage in Roo Code?

You can reduce token usage in Roo Code by creating a comprehensive .rooignore file to prevent the agent from reading build caches and lockfiles, breaking large refactoring jobs into smaller tasks that reset context between git commits, and using Architect mode to plan changes before executing code. Moving static documentation and reference guides to an external MCP workspace also prevents thousands of tokens from being re-sent on every turn.

### Does switching to a model with a larger context window prevent rate limits?

No, switching to a larger context window does not prevent rate limits. While models with 1,000,000-token windows can ingest massive payloads, provider rate limiters still enforce Tokens Per Minute caps. Sending huge prompts through autonomous loops exhausts your per-minute token quota in fewer turns, increases response latency, and inflates API costs.

### How does using an MCP workspace reduce Roo Code API costs?

An MCP workspace reduces Roo Code API costs by indexing documentation and reference files externally. Instead of pasting 50,000 tokens of reference material into active conversation context, Roo Code queries the MCP server and receives only a 300-token relevant excerpt. Because input tokens are billed on every single turn, keeping active context lean yields major cumulative cost reductions across long coding sessions.

## Sources

- [Claude Help Center: Upload files to Claude](https://support.claude.com/en/articles/8241126-upload-files-to-claude) — Claude Projects accepts files up to 30MB each with unlimited file count within the context window, while chat accepts up to 20 files at 500MB each.

## About Fast.io

Fast.io provides shared workspaces where people and AI agents work on the same files, with built-in semantic search and citation-backed chat over what they hold. Agents reach it through a remote MCP server at https://mcp.fast.io/mcp, a REST API at https://api.fast.io/current/, and a command line client published on npm as @vividengine/fastio-cli.
