widgetful

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>
OptionValue
--agentclaude-code, codex or opencode. With no --agent, the input comes from Claude Code.

What the command does

  1. It reads the hook input from standard input.
  2. It reads only three keys: session_id, cwd and hook_event_name.
  3. It finds the terminal app and the TTY of the session.
  4. 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.