> ## Documentation Index
> Fetch the complete documentation index at: https://midway.hazyio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code

> Send Midway notifications from Claude Code hooks

Add these hooks to `.claude/settings.json` for a project or `~/.claude/settings.json` for your user. `Stop` runs when Claude finishes a response; the filtered `Notification` hook runs when Claude needs input.

```json theme={null}
{
  "hooks": {
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "midway send-text -m \"Claude Code finished\""
          }
        ]
      }
    ],
    "Notification": [
      {
        "matcher": "agent_needs_input",
        "hooks": [
          {
            "type": "command",
            "command": "midway send-text -m \"Claude Code needs input\""
          }
        ]
      }
    ]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.