Expose hooks configuration through the CLI and SDK

Resolved 💬 5 comments Opened Jul 25, 2025 by johnlindquist Closed Aug 4, 2025

My scenario is to have a custom mode/agent that is forced into using the "container-use" mcp. Currently, I have to add the following to every single project, but I'm much prefer to create a zsh alias that would trigger this mode/agent.

{
  "hooks": {
    "UserPromptSubmit": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "echo \"Remember to always use the mcp__container-use__environment tools!\""
          }
        ]
      }
    ],
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "bun run /Users/johnlindquist/dev/claude-agents/hooks/cc-stop.ts"
          }
        ]
      }
    ]
  }
}

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗