Home › Test reports › Agent Spend Guard

v1.0.049/49 tests passedProduct pageRaw TEST-REPORT.md

This is the TEST-REPORT.md shipped inside the download, shown unedited. "Tested by SkillHammer" is SkillHammer's own claim, backed by this report. It is not a third-party certification.

Buy on Gumroad – US$39Instant download · 30-day refund · Product page

TEST REPORT: Agent Spend Guard v1.0.0

Run by bash tests/run_all.sh; full output in tests/logs/run-20261030.txt. Started 2026-10-30 09:04:19 GMT, finished 09:04:22 GMT (from date at run time). Box: Linux, Python 3.13.5.

Result: 4/4 steps passed, FAILED STEPS: 0. 42/42 tests: 26 guard (one of them holds 41 nested-agent subtests), 8 installer, 6 usage report, 2 skill.

What is real and what is mocked

1. Guard: tests/test_guard.py (26/26)

2. Installer: tests/test_installer.py (8/8)

Fresh install of both tools; keeps existing settings and is idempotent; policy edits survive reinstall; --uninstall removes only our hooks; --dry-run writes nothing; invalid JSON stops the install; warns on Cursor CLI approvalMode: unrestricted; installed commands really run from a shell.

3. Usage report: tests/test_report.py (6/6)

Deduplication by message.id and totals; per-session rows; --days filter; SPIKE / FAN-OUT / LOOP / UNATTENDED flags; budget suggestion, text and CSV output; missing transcript folder.

4. Skill: tests/test_skill.py (2/2)

Frontmatter and references valid; ASCII file names; no key-shaped strings.

Failures seen during development (fixed before the logged run)

  1. NESTED-AGENT missed npx -y @anthropic-ai/claude-code -p and (cd x && agent "do"). Fixed by mapping claude-code to claude and splitting segments on parentheses.
  2. NESTED-AGENT missed a Windows path (C:\Tools\claude.exe) on Linux. Fixed by splitting on both slash types.
  3. One budget test expected no warning at 900/1,000; that was wrong (90% is past the 80% warning), so the test was corrected, not the code.
  4. --uninstall left an empty {"version":1,"hooks":{}} in .cursor/hooks.json; now removed.

Nothing was published, deployed or sent.

Real-app verification 2026-10-30

Re-run by bash tests/run_all.sh. Full output is in tests/logs/run-20261030-realapp.txt; it started at 12:00:17 GMT and finished at 12:00:24 GMT.

Result: 5/5 steps passed, FAILED STEPS: 0. 49/49 tests: - 27 guard tests. The nested-agent test now has 57 subtests. - 8 installer, 6 usage report, 2 skill. - 6 inside the real Claude Code CLI (new file tests/test_real_claude.py).

Installed

Claude Code: real runs, PASS

Bugs found and fixed

  1. The safe-subcommand lists didn't match the real CLIs.
  2. Checked against claude --help 2.1.314 and cursor-agent --help 2026.10.22.
  3. agent ls was treated as safe, but it resumes a session; it is now guarded.
  4. Added as safe:
    • claude: auth, logs, stop, kill, rm, upgrade, plugins, auto-mode, import.
    • cursor-agent: status, whoami, login, logout, models, --list-models, about, team, create-chat, mcp, plugin, bedrock, shell-integration commands.
  5. Kept as spawning (guarded): claude --bg, agents, attach, respawn, ultrareview; cursor-agent persist, worker, resume, generate-rule.
  6. New subtests cover each of these.
  7. New fan-out path not covered. Claude Code 2.1.314 has a Workflow tool that runs multi-agent workflows.
  8. New rule WORKFLOW-FANOUT: policy fanout_tools: ["Workflow"] and fanout_tool_level: "ask" (it can be set to deny or off).
  9. Tested in the unit suite and in the real CLI.
  10. Docs claimed Cursor has no subagent hooks. It does (subagentStart/subagentStop). The README, LISTING and SKILL now say this version uses Cursor's shell and MCP hooks only.

Cursor: static check PASS, live run BLOCKED

Re-run 2026-11-02 (promoted from drafts/2026-10-30 to products/)

bash tests/run_all.sh from products/agent-spend-guard/; full output in tests/logs/run-20261102.txt (file written 2026-11-02 07:13:54 GMT). Result: FAILED STEPS: 0, 49/49 tests: 27 guard, 8 installer, 6 usage report, 2 skill, 6 real Claude Code CLI hook runs (model replaced by a local mock; no Anthropic account used). Unchanged limits: no live Cursor run (blocked earlier, see above); no paid model calls.

Pre-launch re-run 2026-11-02

bash tests/run_all.sh; full output in tests/logs/run-20261102-prelaunch.txt (2026-11-02, about 08:00 GMT). FAILED STEPS: 0, 49/49 tests (27 guard, 8 installer, 6 usage report, 2 skill, 6 real Claude Code CLI hook runs with the model replaced by a local mock). Counts unchanged. Still no live Cursor run.