dsh-fail-guard

Stops the agent after N consecutive failures on the same tool. Instead of another retry it pushes a four-part stop instruction: what was tried, the exact error text, the likely cause, and what the user must do. Detection reads real tool results (isError or a non-zero shell exit code) and mirrors them through agent.steer, so the agent sees it as an inbound message rather than a log line.

Overview

Stops the agent after N consecutive failures on the same tool. Instead of another retry it pushes a four-part stop instruction: what was tried, the exact error text, the likely cause, and what the user must do. Detection reads real tool results (isError or a non-zero shell exit code) and mirrors them through agent.steer, so the agent sees it as an inbound message rather than a log line.

Installation

Install from GitHub

dsh plugin --profile web add github:FenrirCait/dsh-fail-guard

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.