Skip to main content
Use agent lifecycle hooks to call midway send-text when an agent finishes or needs approval. Choose your agent’s guide: Before enabling a hook:
  • Make sure midway is on the hook process’s PATH.
  • Make sure the hook’s working directory contains midway.yaml, or pass a config path with --config before send-text.
  • Configure notification destinations in Midway. See configuration and the notification guides.
For example, to select a config explicitly:
Hooks execute commands with your user permissions. Only add hook commands you trust. A completion event can fire more than once per session, so notifications may be sent for each completed turn rather than only when you close the agent.