tool-coach

Reviewed at commit 0e4c0dd New version, not yet reviewed

Stops the model from repeating a tool call that just failed with the same input, until a file or command has changed something.

Made by
Kerem Gok
What we checked

Refuses a tool call that is repeated unchanged right after it failed, and tells Claude the earlier error so it changes the input. The refusal lasts until a file edit or command has changed something or you send a new prompt. Bash is never blocked. It makes no network calls, reads no files and only stores an on/off switch.

Review details

Static review of the source at the pinned commit; not run. Hooks: session.start (registers /tool-coach with on and off), command.run for /tool-coach, turn.start (clears the failure records) and tool.call. In tool.call it builds a key from agent, tool name and input, and if the same call failed before and no successful Edit, Write, NotebookEdit or Bash has run since, it returns a deny whose text contains the first 300 characters of the earlier error; otherwise it runs the call unchanged and records the error text of a failed call in memory. Bash is exempt from the refusal. A notice goes to the shared sidebar or $.ui.log. It stores only the enabled flag in $.store. Failure records live in memory and are dropped on every new prompt. No fetch, no $.process, no $.fs, no environment access, no model calls. The two other files (eslint.config.js, Makefile) are not loaded by the hooks and were not read.

What it uses
  • Reads your prompts: no
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: no
  • Runs programs on your machine: no
  • Calls the model (uses tokens): no
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes
Hooked events
Made this mod? Add a badge to your README

modsforClaude badge for tool-coach

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/tool-coach.svg)](https://modsforclaude.com/mods/tool-coach/)

← All mods