Recipe

Tell Kilobat when an agent waits or is done

Without hooks, Kilobat sees an agent only by its traffic and CPU. Hooks tell it the project, and when a run waits for you or is done.

Free in the app and the CLIChecked: 29 October 2026

In the app

  1. Open Settings and find Awake & agents.

  2. Turn on Keep the Mac awake while AI agents work.

  3. Look at the session strip in the popover. Each agent run shows as a chip with its state.

With the CLI

  1. For Claude Code, add a command hook to ~/.claude/settings.json under SessionStart, UserPromptSubmit, Notification, Stop, StopFailure and SessionEnd.

    kilobat agent-event --agent claude --stdin-json
  2. For Codex, add this line to ~/.codex/config.toml. It reports done only.

    notify = ["kilobat", "agent-event", "done", "--agent", "codex", "--json-arg"]
  3. For Cline, install the Kilobat plugin.

    cline plugin install https://kilobat.app/agents/cline/kilobat.ts
  4. Test a hook by hand. --verbose says what happened.

    kilobat agent-event start --agent claude --verbose
  5. Read the recorded runs.

    kilobat sessions --days 1

Through MCP

Connect the MCP server once with claude mcp add kilobat -- kilobat mcp. For other clients, see the docs. Then an agent can call these tools. Tools that change settings tell the agent to ask you first.

Tool and argumentsWhat it does
list_sessions
{"days": 1}
Runs with project, state (working, waitingForYou, done, stalled, networkFailed or failed) and the data used.

Good to know

  • kilobat agent-event prints nothing and always exits 0, so it cannot break the agent.
  • If the app is not running, the events wait in a small file that the app reads when it opens.
  • Kilobat reads session IDs, folders and short status text. It never reads prompts or replies.
  • Merge these hooks with the hooks that you already have.

Sources

Sources checked on 29 October 2026. Man pages are the ones installed with macOS; open one with man <name> in Terminal.