Sparehand

Docs › Coding tools' hooks: what was checked, where and when

Coding tools' hooks: what was checked, where and when

sparehand agent install TOOL connects a coding tool through its own hook where it has one (AI coding agents is the guide). Each tool has its own file, input and answer, and they change. This page records what the connection in lib/agent-tools.mjs and lib/agent-hook.mjs relies on, the page it was read from and the day, so the next check is a matter of opening the same pages. sparehand agent status prints the version and date from here.

Last full check: 2026-11-10.

The tools

"Changes" means the hook hands back a new command, so the heavy check runs as sparehand run --or-local … without the model doing anything. "Redirects" means the tool's hook can only refuse a command (or changing one would also approve it): the hook refuses the heavy command once and gives the model the Sparehand command to run instead. "Note" means there is no hook to use, and the connection depends on the model following a note in its instructions.

ToolConnectionFile Sparehand writesChecked against
Claude Codehook, changes~/.claude/settings.json (hooks.PreToolUse)2.1.317, documentation
Gemini CLIhook, changes; plus a note~/.gemini/settings.json (hooks.BeforeTool), ~/.gemini/GEMINI.md0.46.0, documentation; the settings file loads in 0.46.0
Cursorhook, changes~/.cursor/hooks.json (hooks.preToolUse)3.16.17, documentation
Codex CLIhook, redirects; plus a note~/.codex/hooks.json (hooks.PreToolUse), ~/.codex/AGENTS.md0.162.0-alpha, documentation and its hook schema; Codex 0.162.0-alpha lists the installed hook without warnings
GitHub Copilot CLIhook, changes; plus a note~/.copilot/hooks/sparehand.json, ~/.copilot/copilot-instructions.mddocumentation only
GitHub Copilot coding agent (on GitHub)not connectednone: it reads hooks only from .github/hooks/ on the repository's default branchdocumentation only
Windsurf (Devin Local, Devin CLI)hook, changes; plus a note~/.config/devin/config.json (hooks.PreToolUse), ~/.codeium/windsurf/memories/global_rules.mddocumentation only
OpenCodehook (a plugin), changes; plus a note~/.config/opencode/plugins/sparehand.js, ~/.config/opencode/AGENTS.md2.2.7 and 1.18, documentation and source
Kirohook, redirects (CLI only); plus a note~/.kiro/hooks/sparehand.json, ~/.kiro/steering/sparehand.mdCLI 3 and IDE 1.0, documentation only
Clinenote~/Documents/Cline/Rules/sparehand.mddocumentation only

"Documentation only" means the tool wasn't installed on the computer where this was checked, so nothing confirmed that the program accepts the file. None of the hooks was watched changing a command inside a signed-in session of its tool on that day; sparehand agent test TOOL shows what the installed hook answers, which is the half Sparehand controls.

What each hook relies on

Claude Code

Gemini CLI

Cursor

Codex CLI

GitHub Copilot CLI and coding agent

Windsurf

OpenCode

Kiro

Cline

Checking again

  1. Open each source above and compare the entry, the input and the answer with what is written here. lib/agent-tools.mjs (HOOKS) holds the entries, lib/agent-hook.mjs (FORMATS) the inputs and answers.
  2. With a tool installed, connect it in a throwaway home folder (HOME=/tmp/try sparehand agent install TOOL) and start the tool there: it should load the file without a warning. For Codex, its hook listing shows how it read the file.
  3. sparehand agent test all shows what every installed hook answers.
  4. Update the versions and dates in TOOLS (lib/agent-tools.mjs) and on this page.