Reference
widgetful hook
The command that each agent hook runs. It sends the state of a session to the app.
You do not run this command yourself. The hooks of each agent run it.
widgetful hook --agent <id>
| Option | Value |
|---|---|
--agent | claude-code, codex or opencode. With no --agent, the input comes from Claude Code. |
What the command does
- It reads the hook input from standard input.
- It reads only three keys:
session_id,cwdandhook_event_name. - It finds the terminal app and the TTY of the session.
- It sends the session ID, the folder, the state and the terminal to the app on a local socket.
The command always exits with 0. It never stops or slows the agent, also when the app does not run.
Where it is
The command is in the app bundle, in Widgetful.app/Contents/Helpers/widgetful. The socket is ~/Library/Application Support/Widgetful/hook.sock. Only your user can read the folder.