#5712·Aider

Add a Hook System for Extensible Automation

Author: akmalm07Created Sep 14, 2026Updated Sep 14, 2026

Add a hook system that lets users run custom commands or scripts at key points in the workflow. For example before/after an AI edit, before a commit, after tests, or when a command fails. This would make the tool easier to integrate with existing development workflows without requiring core changes for every use case. Suggested capabilities

  • Configurable lifecycle events, such as:
    • pre_edit / post_edit
    • pre_commit / post_commit
    • pre_test / post_test
    • on_error
  • Project-level configuration, with optional user-level defaults.
  • Hooks defined as shell commands or executable scripts.
  • Access to structured context through environment variables or JSON stdin (changed files, command result, exit code, etc.).
  • Clear output and failure behavior, including an option for a hook failure to block the next step. Example
hooks:
  post_edit:
    - command: npm run lint
    - command: npm test
      blocking: true

  pre_commit:
    - command: prettier --write $CHANGED_FILES

Acceptance criteria

  • Users can configure one or more commands for supported lifecycle events.
  • Hooks receive useful execution context.
  • Hook output and failures are visible and understandable.
  • Blocking vs. non-blocking behavior is configurable.
  • Documentation includes the event list, configuration schema, and examples.