AgentTested hands-on log Tool: AgentCostGuard slug: agent-cost-guard date: 2026-12-01 score: 8/10 tier: A cost_usd: 0 account: none purchase: none What was tested Whether agent-cost-guard 0.6.2, installed from PyPI, stops identical tool calls and stops a session that crosses a dollar cap. The token counts were supplied by this test. The library priced them with its own table. No model API was called. What was not tested The $7 Pro pack was not bought. mcp-proxy was not wrapped around a live server. Claude Code hooks were not installed. examples/benchmark_loop.py was not run. No provider bill was created. Machine Linux, Python 3.12.3. Package agent-cost-guard 0.6.2 from PyPI. The CLI is agent-cost-guard. Commands $ agent-cost-guard --version exit 0 wall_s 0.052 agent-cost-guard 0.6.2 $ agent-cost-guard estimate gpt-4o-mini --input-tokens 800 --output-tokens 200 exit 0 wall_s 0.051 gpt-4o-mini: $0.000240 USD (in=800, out=200, cached=0) $ agent-cost-guard doctor exit 0 wall_s 0.048 AgentCostGuard Doctor v0.6.2 (Python 3.12.3, 32 models) Status: ACTION_NEEDED MCP configs checked: 0 | unprotected stdio servers: 0 Claude Code Pre/PostToolUse hooks active: False Past sessions scanned: 0 | spend=$0.0000 | loops=0 | potential_savings=$0.0000 How Three SessionGuard sessions in Python, importing GuardConfig and SessionGuard. Loop session agenttested-loop-2026-12-01. max_cost_usd 1.00, repeat_tool_threshold 3. Each turn recorded gpt-4o-mini, 800 input tokens, 200 output tokens, tool web_fetch, args {"url": "https://example.com/status"}. Budget session agenttested-budget-2026-12-01. max_cost_usd 0.05, repeat_tool_threshold 8. Each turn recorded gpt-4o-mini, 8000 input tokens, 2000 output tokens, tool web_fetch, with a different url each step. Policy session agenttested-policy-2026-12-01. blocked_tools ("drop_database",). One turn called that tool. Results The estimate CLI and estimate_cost_usd both priced one 800/200 gpt-4o-mini turn at $0.00024. Loop step 1 status ok, step_usd 0.00024, cumulative 0.00024, signature web_fetch#d69f1c702898. Loop step 2 status ok, step_usd 0.00024, cumulative 0.00048, same signature. Loop blocked at step 3. Error: Loop detected: 'web_fetch' called 3 consecutive times with identical arguments (web_fetch#d69f1c702898). Loop summary: steps 3, total tokens 2000, total_cost_usd 0.00048. The blocked turn added $0. JSONL log has 3 lines. Budget steps 1 through 20 were ok at $0.0024 each. Cumulative after step 20 was $0.048. Budget blocked at step 21. Error: Cost $0.0504 > cap $0.0500. Last status blocked_budget_usd. Summary total_cost_usd 0.0504, remaining_budget_usd 0.0, steps 21, tokens 210000. JSONL log has 21 lines. Policy blocked drop_database before any spend. Summary total_cost_usd 0.0, steps 1, tokens 0. doctor exited 0. This machine has no MCP config and no Claude Code hooks, so the status was ACTION_NEEDED. cost_usd 0. No network call to a model vendor was made. Verdict 8/10, tier A, for a local install that stopped the third identical tool call and stopped a $0.05 session at $0.0504. The cap is applied after the turn is added, so the recorded total sat $0.0004 over the cap. The dollars are the library's price table, not a live invoice.