Agents and hooks
Reins supports eighteen coding agents. Seventeen can ask you for approval from the phone; Codex reports its finished turns, so you can watch it and take over in the terminal, but it cannot be asked.
How wiring works
reins install-hooks (which reins setup runs for you) adds a hook, plugin or
extension to each agent's own config, pointing at the reins binary by its absolute path. When the
agent is about to use a tool, the hook asks the daemon, the daemon asks your phone, and the answer goes back.
If there is no daemon, no phone, or no answer, the hook returns nothing and the agent prompts you as usual.
- Claude Code, Codex, OpenCode and Pi are always written. The other agents are wired when they look installed, and named when they are skipped.
- Wire one regardless with
--agent NAME; preview any change with--dry-run. - Re-running is safe. Restart a running agent afterwards so it reloads its config.
reins doctorshows which agents on this machine are wired;reins agentslists what this build supports.
reins install-hooks --agent cursor --dry-run Supported agents
| Agent | --agent | File | Approvals |
|---|---|---|---|
| Claude Code Live chat transcript too. | claude-code | ~/.claude/settings.json | Yes |
| Codex Finished turns only (notify). | codex | ~/.codex/config.toml | No |
| OpenCode | opencode | ~/.config/opencode/plugins/reins.js | Yes |
| Pi | pi | ~/.pi/agent/extensions/reins.ts | Yes |
| Cursor | cursor | ~/.cursor/hooks.json | Yes |
| Qwen Code | qwen-code | ~/.qwen/settings.json | Yes |
| Qoder | qoder | ~/.qoder/settings.json | Yes |
| Factory Droid | factory-droid | ~/.factory/settings.json | Yes |
| Kimi Code | kimi-code | ~/.kimi/config.toml | Yes |
| GitHub Copilot CLI | copilot | ~/.copilot/hooks/reins.json | Yes |
| Amp | amp | ~/.config/amp/plugins/reins.ts | Yes |
| Grok Build | grok-build | ~/.grok/hooks/reins.json | Yes |
| Antigravity | antigravity | ~/.gemini/config/hooks.json | Yes |
| Hermes | hermes | ~/.hermes/config.yaml | Yes |
| jcode | jcode | ~/.jcode/config.toml | Yes |
| Devin Runs Claude Code's hooks. | devin | ~/.claude/settings.json | Yes |
| OMP | omp | ~/.omp/agent/hooks/pre/reins.ts | Yes |
| OmO Runs inside OpenCode. | omo | ~/.config/opencode/plugins/reins.js | Yes |
Claude Code
install-hooks merges these entries into ~/.claude/settings.json and leaves your
other hooks alone. Only PreToolUse blocks; the rest run in the background. PreToolUse waits up to 180
seconds, long enough for a push to wake a sleeping phone.
| Hook | Why |
|---|---|
SessionStart | An agent appears when it starts. |
PreToolUse | Approvals and questions reach the phone, and block until you answer (up to 180 seconds). |
UserPromptSubmit | What you typed shows up in the chat view. |
PermissionDenied | A blocked agent says so, even where nobody can be asked. |
PostToolUseFailure | An agent stuck failing the same tool is visible. |
Stop | An agent that finished its turn reads as idle. |
StopFailure | A turn that died is not mistaken for a quiet one. |
SessionEnd | A finished agent leaves the list. |
Notification | An agent waiting on you says so. |
Approvals ride on PreToolUse because it fires everywhere.
--approvals permission-request saves a process per tool call, but Claude Code never raises that
event for headless claude -p runs, so approvals there would silently stop.
The live chat transcript, with tool calls and diffs, is Claude Code only: the daemon reads it from ~/.claude/projects.
Codex, Devin and OmO
Codex
Codex's only hook is notify, which it runs after each turn. Reins adds one line to
~/.codex/config.toml so finished turns reach the phone. There is no hook before a command, so Codex
cannot be asked for approval. Codex runs a single notify program: if you already have one, install-hooks stops
and tells you rather than replacing it.
Devin
Devin runs the hooks installed for Claude Code, so --agent devin wires Claude Code.
OmO
OmO runs inside OpenCode, whose plugin reports its sessions as OmO's, so --agent omo wires OpenCode.
Replying and questions
Approvals and the live feed work in any terminal. Typing a reply from the phone goes into the terminal the agent
runs in, which needs the agent inside herdr, tmux or zellij. Answering a question card needs herdr. To keep
approvals and remove typing entirely, start the daemon with reins serve --allow-chat-send=false.