Skip to content

UX: --trust-hooks flag doesn't show the full merged hook list #596

@njbrake

Description

@njbrake

Describe the issue

When using aoe add --trust-hooks, the interactive hook approval prompt is skipped entirely. However, the hooks that actually execute are the merged result of repo hooks + global/profile hooks. The user has no visibility into what the final merged set of hooks looks like.

To reproduce

  1. Configure global hooks in ~/.config/agent-of-empires/config.toml:

    [hooks]
    on_create = ["echo global-hook"]
  2. Configure repo hooks in project/.agent-of-empires/config.toml:

    [hooks]
    on_create = ["echo repo-hook"]
  3. Run: aoe add ~/project -w feat/test -b -t "test" --trust-hooks

The user sees ✓ Repository hooks trusted and Running on_create hooks... but never sees which hooks are actually executing. The repo hooks replace global hooks per-field (not append), which may be surprising.

Expected behavior

When --trust-hooks is used, print the final merged hook list before execution so the user can see exactly what will run:

Running on_create hooks:
  echo repo-hook
✓ on_create hooks completed

This is a minor UX improvement. Global hooks are user-controlled so this is not a security issue, but transparency helps users debug unexpected hook behavior.

Affects

Both CLI (src/cli/add.rs) and potentially TUI paths. The TUI shows hooks in the trust dialog but doesn't show the merged result after approval.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions