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
| Control | Values / default | Environment equivalent |
|---|---|---|
--map-tokens VALUE | Suggested token count; default 1k in the map guide; 0 disables | AIDER_MAP_TOKENS |
--map-multiplier-no-files VALUE | Multiplies map tokens when no files are specified; default 2 | AIDER_MAP_MULTIPLIER_NO_FILES |
--map-refresh VALUE | auto (default), always, files, manual | AIDER_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
- Repository map, Aider-AI.
- Options reference: Repomap settings, Aider-AI.
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