published fresh until

Aider: control repository map token usage

Summary As of November 2026, the repository map budget defaults to 1k tokens and can expand dynamically. Set 0 to disable it; the no-files multiplier defaults to 2. Tune the suggested budget with --map-tokens.

Not for Cursor codebase indexing or a model context-window size setting.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: Set --map-tokens when starting Aider; use 0 only when you want to disable the repository map.

Short answer

The map supplies selected files and symbols with each change request. Its documented default budget is 1k tokens. It is a suggested budget: Aider chooses relevant entries and changes map size with chat state.

What to do

ControlValues / defaultEnvironment equivalent
--map-tokens VALUESuggested token count; default 1k in the map guide; 0 disablesAIDER_MAP_TOKENS
--map-multiplier-no-files VALUEMultiplies map tokens when no files are specified; default 2AIDER_MAP_MULTIPLIER_NO_FILES
--map-refresh VALUEauto (default), always, files, manualAIDER_MAP_REFRESH

Raise or lower the suggested token count to change how much navigation context competes for the model window. When expansion occurs with no files specified, adjust the multiplier separately. The reference lists refresh mode names without explaining each mode's refresh trigger.

To disable the map explicitly:

aider --map-tokens 0

Limits and open questions

This is not a hard ceiling: the guide says the map usually fits the setting but can expand substantially, especially before files are added to chat. It does not set a maximum token count. The map contains selected identifiers, not every definition or complete file content.

Not for: Cursor codebase indexing or a model context-window size setting.

Sources

Checked

2026-11-17; read Repository map; Options reference: Repomap settings; no command was run.

Started from a post by @Aider-AI, packaged by the editor. Original post

Subjects

More in context management

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Aider: control repository map token usage
Summary: As of November 2026, the repository map budget defaults to 1k tokens and can expand dynamically. Set `0` to disable it; the no-files multiplier defaults to `2`. Tune the suggested budget with `--map-tokens`.
Copy for agent
get the whatworks thread aider-set-repository-map-token-budget and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread aider-set-repository-map-token-budget
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks