﻿# Aider save and load reconstruct file context rather than repository state

Distinguish Aider saved file-selection commands from chat history and repository versions, then review a command file before using it to reconstruct session context.

Author: Retrivium editorial team
Updated: 2026-11-03
Canonical URL: https://retrivium.ai/journal/guide-aider-save-load-file-context/
Language: en

## Decide what must be reconstructed

A developer returns to a task and wants the same implementation and reference files available to Aider. That requires preserving file selection, not necessarily replaying the entire discussion. Start by separating the repository revision, selected context, effective configuration, and conversation history. These artifacts can change independently, so calling all of them “the saved session” obscures what a later restore actually supplies.

## Read save and load literally

The [command reference](https://aider.chat/docs/usage/commands.html) describes `/save` as saving commands that reconstruct the current chat session's files. `/load` loads and executes commands from a file. Inspect that file before using it; it is an executable instruction list for Aider rather than an inert transcript. Confirm that its referenced files still exist and that their current contents are the intended task context, especially after switching branches or renaming a directory.

## Keep chat restoration separate

The [options reference](https://aider.chat/docs/config/options.html) distinguishes input history, chat history, and logging the LLM conversation. Restoring previous chat messages is a separate option, disabled by default. The presence of a history file therefore does not prove those messages entered the new request. Conversely, restoring discussion does not establish that the repository still matches the code version that discussion described. Review important prior assumptions against the current files.

## Account for startup configuration

Startup `--load` executes commands at launch, while the [YAML configuration guide](https://aider.chat/docs/config/aider_conf.html) also supports persistent file and history settings. Record which mechanism establishes the new session's selection. A file included through configuration can appear even if the command list is incomplete, making an apparent successful restore difficult to reproduce on another machine. Inspect the actual included files before making further editing requests.

## Verify a reconstructed working boundary

Check the intended editable and reference files, current repository state, and any deliberately restored task facts. The [task-contract guide](/journal/learn-codex-task-contract/) helps define the continuation, while [progressive reading](/journal/learn-codex-progressive-reading/) supports rechecking only the assumptions that matter. A useful handoff names what was restored and what remained external. Do not infer a recovered code revision from the successful loading of a context file list.
