> ## 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.

# Cursor

> Send Midway notifications from Cursor hooks

Add a project-level `.cursor/hooks.json` file. Cursor's `stop` hook runs when the agent loop ends:

```json theme={null}
{
  "version": 1,
  "hooks": {
    "stop": [
      {
        "command": "midway send-text -m \"Cursor agent finished\""
      }
    ]
  }
}
```

Cursor does not currently provide a general hook event for notifying when the agent needs input. Its shell and MCP hooks run before operations, not when the agent is waiting for a response.


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