For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /guide/agent-hooks.md.

Agent hooks

An agent program can start a sync by itself: when a session starts, and each time the agent stops. Then the files you track are in step without you running korbo sync.

Set them up

korbo hooks install

This writes korbo's hooks into every agent program it finds on the machine. It keeps everything else in those files, replaces a korbo hook written earlier, and changes nothing when run again.

  • korbo hooks shows which programs were found and whether the hooks are set up.
  • korbo hooks remove takes korbo's hooks out again.
  • Name programs to limit either command, for example korbo hooks install codex.

The hooks call the korbo program at the path it was run from, so run korbo hooks install from ~/.korbo/bin/korbo.exe.

What each program gets

ProgramFileWhat you see
Claude Code~/.claude/settings.jsonA line in the session when something changed, a conflict occurred or the hub could not be reached.
Codex~/.codex/hooks.jsonThe same line, shown as a warning.
Antigravity~/.gemini/config/hooks.json, hook name korboThe line as a "System Message" when a session starts. The model reads it too.
OpenCodenone yetkorbo's plugin waits for OpenCode 2.

Codex runs a new or changed hook only after you trust it. Start codex in a terminal, open /hooks, and trust both korbo hooks. Trusted hooks run outside Codex's sandbox, so they can reach the hub.

Antigravity cannot show anything after a turn. A change synced after a turn is reported at the next session start, and a conflict is reported again until it is settled.

When nothing appears

korbo sync --hook prints nothing when nothing changed, so a quiet session is the normal case. It always exits with code 0, because a failing hook at the end of a turn would keep the agent working; every problem is reported in the line instead.

To see a line, change a tracked file, then start a new session.