aider icon indicating copy to clipboard operation
aider copied to clipboard

Feature: Add /session command for chat session and file management

Open vk4s opened this issue 4 months ago • 3 comments

Description:

This pull request introduces a new command, /session, to provide robust chat session management within Aider. This feature allows users to save, load, list, view, and delete their chat sessions, making it much easier to manage long-running tasks and switch between different contexts without losing work.

Key Features:

  • /session save <name>: Saves the current chat history and the list of both editable and read-only files to a named session.
  • /session load <name>: Clears the current chat and restores a previously saved session, including all files and chat history.
  • /session list: Displays all saved sessions.
  • /session view <name>: Shows a detailed summary of a saved session, including its metadata, file lists, and a preview of the chat history.
  • /session delete <name>: Permanently removes a saved session.

All session data is stored locally in the .aider/sessions/ directory within the project's git repository, ensuring that sessions are tied to the project they belong to.

This feature was implemented in a test-driven manner, with a new test file tests/test_session.py ensuring the reliability of all subcommands.


Documentation:

in /help

image

In-chat commands list:

image

Usage section for session command:

image

vk4s avatar Jul 12 '25 21:07 vk4s

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jul 12 '25 21:07 CLAassistant

Hi maintainers,

This is my first contribution. I've implemented a new /session command to allow users to save, load, list, view, and delete their `chat sessions.

I find this feature very useful, much like using sessions in tmux. It allows me to save my work on a complex task, switch contexts, and then come back later to restart exactly where I left off.

This pull request includes:

  • The new /session command with save, load, list, view, and delete subcommands.
  • A new test file (tests/test_session.py) with comprehensive tests for the new functionality.
  • All existing tests continue to pass.

Please let me know if you have any feedback or if there's anything I need to change.

Best, V

vk4s avatar Jul 12 '25 21:07 vk4s

Very good idea

ant31 avatar Oct 09 '25 11:10 ant31

Hi @paul-gauthier, Sorry to bother you, but is there any chance this could be merged? We use aider in our organize and this is a needed feature for our monorepos to work on difference features and continue with a specific set of files and description.

Thanks.

vk4s avatar Nov 16 '25 05:11 vk4s