
Read Aider AI Pair-Programmer Chat History (2026 Guide)
Find, read, and export Aider chat history from your repo. File paths, grep tricks, archive workflow, and reading long sessions on mobile.
Aider is one of the quietest workhorses in the AI pair-programming space. It lives inside your terminal, edits files against your git repo, and keeps a running transcript of every suggestion it made. The problem is that the transcript lives in a small set of local files that most people never open. Once a session scrolls off screen, the context is gone unless you know where to look. Finding it later takes about two minutes once you know the paths, and about two hours if you do not. This guide walks through where Aider stashes its history, how to read it comfortably, and how to turn weeks of sessions into something searchable.
The reason this matters is that Aider sessions are not throwaway chats. They contain the exact diff reasoning behind code that is now in production. Reopening an old session can save you from re-explaining a refactor to a teammate or debugging a regression you already solved three weeks ago. It also helps with onboarding, because a new engineer can read through the archive instead of pinging senior staff for context. If you use other CLI tools too, our Codex CLI history guide and Claude Code archive walkthrough cover the same workflow for the sibling tools.
Where Aider stores your chat history
Aider writes two main log files into the repository root the moment you launch it. The first is .aider.chat.history.md, a human-readable markdown log of every user prompt, assistant reply, and diff emitted during the session. The second is .aider.input.history, a plain-text file that records only the lines you typed, in the style of a shell history. Both files are append-only, so every session in a given repo ends up concatenated into the same two files over time. For most readers this is a feature, because it means one file holds every decision ever made against the codebase.
There is also .aider.llm.history, which captures the raw API calls sent to the underlying model. Most readers will never need to open this one directly because it is formatted for debugging rather than reading. If you want full fidelity, point your reader at the first file and treat the other two as supporting evidence. The Aider documentation on chat history confirms these paths and notes that the files are gitignored by default. You can override any of the three locations with command-line flags if your team prefers a shared archive directory.
How to read a long Aider log comfortably
Markdown viewers in editors render Aider logs well enough for single-session browsing. The friction shows up once a project is a few months in and the file crosses twenty or thirty thousand lines. At that point most editors start to stutter, syntax highlighting falls over, and jumping between prompts becomes painful. This is where a dedicated markdown reader earns its keep, because the reader is tuned for exactly this shape of content.
Prism MD opens .aider.chat.history.md as a scrollable, outlined document with jump-to-heading navigation, fast search, and proper code-block rendering. Every Aider prompt is written as a bolded speaker label followed by a block quote, so the reader produces a clean outline you can click through. Syntax highlighting inside fenced diffs survives even when the file is over a hundred thousand lines. For extra ergonomics on long-form content, see our notes on optimal line length for AI markdown. Reading on a phone during a commute also becomes viable, which turns dead time into light code review.
Searching and exporting past sessions
Grep is still the right first tool for a developer. Running rg "fix the migration" .aider.chat.history.md surfaces every session where that phrase appeared, along with surrounding context. Pair it with rg --before-context 20 --after-context 40 to pull the full question and the resulting diff. If you want to extract a single session, Aider marks each run with a timestamped # aider chat started at ... heading, which gives you a reliable split point.
For deeper mining it helps to export sessions into separate files. A small shell loop that splits on the start-of-session heading, pipes each chunk into its own dated markdown file, and drops them into a ~/aider-archive folder is usually all you need. Once the sessions are discrete files, any markdown reader can index them. You can then treat the archive the way you would treat a research notebook, searching across projects and years. Pairing this with a tagging convention in commit messages makes cross-referencing code and reasoning trivial.
Keeping Aider history useful over time
A raw log is only useful if it stays readable. Three habits make that possible across a long-running repository, and each one takes under a minute per week. The payoff compounds as the log grows, because the structure you impose early keeps future searches sharp. Treat these as a lightweight hygiene routine, not a formal process:
- Commit your
.aider.chat.history.mdfile on milestone days so that git blame tells you which session introduced which block of reasoning. - Rotate the log monthly by moving it into an
aider-archive/YYYY-MM.mdfile and letting Aider start a fresh one. - Strip API keys and local paths before any file leaves the machine, since Aider sometimes echoes shell context into the transcript.
Treating the log as a first-class artifact also pairs well with cross-tool workflows. Many developers hop between Aider, Copilot, and a hosted assistant during a single feature. Our guide on reading GitHub Copilot chat history covers the companion piece for the editor-side tool. Together the two archives give you a complete trail from pair-programmed diff to final merged PR, which is often enough to reconstruct a decision a year later.
FAQ
Can I disable Aider chat history entirely?
Yes, and the mechanism is a pair of boolean flags. Pass --no-chat-history-file and --no-input-history-file when launching Aider, or set the equivalent options in your .aider.conf.yml. Most teams leave history on, because the cost of storing a few megabytes of markdown is lower than the cost of losing context. If regulated data is a concern, a better path is to rotate aggressively and encrypt the archive folder rather than disabling logging outright.
Does Aider store history per-repo or globally?
Both files live inside the current repository root by default, so every project gets its own history. You can override the location with --chat-history-file PATH if you prefer a central archive. A common pattern is to keep per-repo logs for working context and a central archive for long-term search. The central archive is also easier to back up as a single folder.
How do I share a single session with a teammate?
Split the log at the nearest # aider chat started at heading, save the chunk as its own .md file, scrub secrets, and send it through whatever channel you normally use. The file opens cleanly in any markdown reader, including Prism MD on mobile. If the session is long, add a short summary at the top so the recipient knows what to look for. Teammates tend to read these faster when the opening frames the problem in one paragraph.
Is the log safe to commit to a public repo?
Review it first, because Aider can include file contents, environment hints, or model output that reflects private code. For open-source projects the safer default is to keep the history files gitignored and archive them privately. If you want public artifacts, export only the specific sessions that illustrate a decision and scrub them by hand. That approach gives you shareable write-ups without leaking the rest of the archive.
Read every Aider session on any device
Free to start — no credit card.
Related reading
Ready to read your own AI documents?
Open ChatGPT, Claude, Gemini, or any markdown file in the reader built for the way models write.
- ✓Renders code, math & Mermaid out of the box
- ✓Works offline once you've opened a doc
- ✓Free forever for personal reading


