Skip to content

Conversation

robbintt
Copy link

@robbintt robbintt commented Aug 27, 2025

Add handlers to Aider to improve extensibility and take pressure off the existing feature backlog.

These handlers are all hooks. I kept the more general term so it is more extensible.

Handlers are appropriate for many use cases:

  • Existing pre and post actions should be moved to handlers (see included autotest_handler.py handler)
  • MCP and other calls can be added to a pre-handler without extensive code changes
  • Potential for extension to any other desired entrypoint, such as tool calls analyzing the generation stream for early completion or cancellation

Example .aider.conf.yml section:

handlers:
- name: file-adder
  config:
    reflections: 6
    model: gemini/gemini-2.5-flash
- name: autotest
  config:
    test_cmd: "echo noop"
Screenshot 2025-08-27 at 08 51 18

Loaded handlers are visible at startup, otherwise the line is not shown:

Screenshot 2025-08-27 at 13 07 03

@robbintt robbintt marked this pull request as ready for review August 27, 2025 15:51
@robbintt
Copy link
Author

robbintt commented Aug 27, 2025

Example of missing handler:

Screenshot 2025-08-27 at 08 52 33

@tomjuggler
Copy link

I think this might be a great upgrade for Aider - as long as it is optional, why not?

@robbintt
Copy link
Author

robbintt commented Oct 1, 2025

I think this might be a great upgrade for Aider - as long as it is optional, why not?

Yes, it's a noop until configured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants