Hooks not firing¶
A peer never registers, or stops appearing in list_peers after a session restart. Almost always a hook configuration problem.
Quick check¶
If a runtime is detected but its hooks are marked missing, run repowire setup again. Re-running is idempotent and will rewrite the hook entries.
Per-runtime diagnostics¶
Claude Code¶
- Open
~/.claude/settings.json. Thehookskey should contain entries forSessionStart,UserPromptSubmit,Notification,Stop,StopFailure, andSessionEnd, each pointing atrepowire hook .... - Confirm
repowireis onPATHfor the shell Claude Code was launched from. Hooks shell out, so a missingrepowireinPATHsilently no-ops. - Start Claude Code in a tmux pane. After your first prompt, run
repowire peer listin another shell. Peer should appear within a few seconds.
Codex¶
- Confirm
~/.codex/config.tomlcontains[features] hooks = true. If it still has the deprecatedcodex_hookskey, re-runrepowire setupto migrate it away; current Codex versions warn when that legacy key is present. - Codex fires
SessionStartafter the first user interaction. If your peer never registers, the agent may not have received a first turn — trynotify_peer(peer, "ping")or send a message manually. - If you used
spawn_peerwithout amessage, the seed turn may have been swallowed. Re-send vianotify_peer.
Gemini CLI¶
- Open
~/.gemini/settings.json. Thehookskey should containSessionStart,BeforeAgent, andAfterAgententries pointing atrepowire hook .... - Gemini surfaces hook stderr — if the hook is failing, you'll see it in the Gemini output directly.
- The
AfterAgenthook must return{"decision": "allow"}to let the agent continue. Repowire emits this by default; if you've patched the hook, make sure that field is still there.
OpenCode¶
OpenCode does not use shell hooks. It uses a TypeScript plugin at ~/.opencode/plugin/repowire.ts (or .opencode/plugin/ for local installs). If the peer never appears:
- Confirm the plugin file exists and is non-empty.
- Check OpenCode's log for plugin load errors.
- Re-run
repowire setupto rewrite the plugin file.
Daemon must be running¶
All hooks shell out to the daemon over HTTP. If the daemon is down, hooks succeed (they do not block agent startup) but no peer state changes. See Daemon unreachable.
After upgrading repowire¶
Hooks call the installed repowire binary. If you upgraded via a tool that swapped binaries in place (uv tool upgrade, pipx upgrade), existing hooks still point at the same path and continue to work. If you reinstalled to a different location, re-run repowire setup so the hook entries pick up the new path.