# Where Aider stores your chat history

> Aider writes chat history as Markdown in .aider.chat.history.md at the root of each git repo. Where it is, what is in it, and how to restore or clear it.

Source: https://groundedby.com/agents/aider (updated 2026-10-29)

Aider keeps the simplest history of any agent here: a Markdown file in each repository.

## Where the files are

| File | What it holds |
| --- | --- |
| `.aider.chat.history.md` | The chat, appended run after run |
| `.aider.input.history` | Your typed inputs, for the up-arrow |
| `--llm-history-file` (optional) | The raw exchange with the model |

Each run starts with a `# aider chat started at <time>` heading. Your prompts are lines starting `#### `, and tool and status output is quoted with `> `. There are no structured tool-call records and no session ids.

## Restore and clear

`aider --restore-chat-history` loads the previous chat back into context. `/save` and `/load` save the set of files in the chat, not the conversation. To clear history, delete the file.

Add this to `.gitignore` so the history never lands in a commit:

```text
.aider*
```

## Privacy notes

History stays in the repo folder. Aider's analytics are opt-in and exclude chat content.

The groundedby [evaluator](/evaluate) does not read Aider history yet.

## Questions

**Where is Aider's chat history?**

In each repository, at .aider.chat.history.md in the git root. Your typed inputs go to .aider.input.history next to it. Both paths can be changed with --chat-history-file and --input-history-file.

**Should I commit .aider.chat.history.md?**

Usually not. It contains everything said in the chat, including pasted output. Add .aider* to .gitignore.

## Sources

- [Aider source, command-line arguments](https://github.com/Aider-AI/aider/blob/main/aider/args.py)
- [Aider docs, options](https://aider.chat/docs/config/options.html)
