Skip to content

Support for Global Hooks (~/.kiro/hooks/) #5440

@msayed-treezor

Description

@msayed-treezor

Feature Description

Currently, Kiro supports global configuration for Steering and MCP, but not for Hooks. This creates an inconsistency in the configuration model.

Feature Global (~/.kiro/) Workspace (.kiro/)
Steering ✅ ~/.kiro/steering/ ✅ .kiro/steering/
MCP ✅ ~/.kiro/settings/mcp.json ✅ .kiro/settings/mcp.json
Hooks ❌ Not supported ✅ .kiro/hooks/

I'd like Kiro to also support hooks defined in ~/.kiro/hooks/ that would apply across all workspaces, similar to how global steering works.

The expected behavior would be:

  • Hooks in ~/.kiro/hooks/ apply to all workspaces
  • Workspace hooks in .kiro/hooks/ can override or extend global hooks
  • Same priority model as steering (workspace takes precedence over global)

Use Case

I have personal automation hooks that I want to apply across ALL my projects:

  1. Session logging hook - Automatically saves context when I type "Save" (promptSubmit trigger)
  2. Security scan hook - Scans for credentials before agent stops (agentStop trigger)
  3. Code style enforcement - Runs linting on file save for my preferred languages

Currently, I have to manually copy these hooks to every new workspace I create. With 15+ active projects, this becomes tedious and error-prone. When I update a hook, I need to update it in every single workspace.

With global hooks support, I could define these once in ~/.kiro/hooks/ and have them work everywhere, just like my global steering rules do today.

Additional Context

Evidence that global hooks are not currently supported:

  1. Changelog v0.5 (https://kiro.dev/changelog/ide/0-5/)
    Lists "Global Steering Rules" as a new feature, but makes no mention of global hooks support.

  2. Multi-root Workspaces Documentation (https://kiro.dev/docs/editor/multi-root-workspaces/)
    States: "For single-root workspaces, Kiro stores and retrieves artifacts such as specs, steering files, hooks, etc. from the .kiro subfolder under that single root"
    → Hooks are explicitly tied to workspace, not user home.

  3. CLI Configuration Documentation (https://kiro.dev/docs/cli/chat/configuration/)
    Shows configuration scope table with MCP and Steering having both Global and Project scope, but Hooks are not listed in the global scope options.

  4. Steering Documentation (https://kiro.dev/docs/steering/)
    Explicitly mentions: "Global steering files reside in your home directory under ~/.kiro/steering/"
    → No equivalent statement exists for hooks.

Suggested implementation:

  • Add support for ~/.kiro/hooks/ directory
  • Apply same merge/override logic as steering (workspace > global)
  • Display global hooks in the Agent Hooks panel with a "Global" badge

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions