Skip to content
Leashr
Tested

Limits by agent

What Leashr proves, partly proves or does not do on Claude Code, Codex, Cursor, Antigravity and Gemini CLI, with the proof for each case.

Measured results, losses included, are on the benchmarks page.

Read this before using another agentLeashr is built for Claude Code. On the other agents the hooks refuse, but two things are missing: a cost signal (so a spending cap cannot work) and an installer. Each cell below names its proof; a cell without proof says so.

Versions tested

AgentVersionHook configuration file
Claude Code2.1.310.claude/settings.json (written by init)
Codex0.171.0.codex/hooks.json (by hand)
Cursor2026.11.19.cursor/hooks.json (by hand)
Antigravity (agy)1.5.14.agents/hooks.json (by hand)
Gemini CLI0.70.0none, not a target

The captures of the three non-Claude agents were taken on 21/11/2026 on the real tools (Windows, PowerShell) and are replayed by tests. Codex, Cursor and Antigravity hooks are written by hand today; project hooks of Codex need trust (/hooks).

Claude Code 2.1.310

The reference agent. Everything below was observed in real sessions.

FunctionStateProof or cause
Rules (deny)Provenskills/lsh-rules/test/ (155), rules.js test (320)
ask (approval)PartialPrompt in an interactive session. claude -p depends on the agent's handling of a prompt it cannot show.
Spending capProvenskills/lsh-cap/test/cap.test.js, bench/data/cap-bench.json
Kill switchProvenskills/lsh-cap/test/cap.test.js
Audit journalProvenskills/lsh-audit/test/audit.test.js
Cost per missionProvenskills/lsh-cost/test/cost.test.js, bench/data/cost-compare.json
Install by lsh-initProvenskills/lsh-init/test/init.test.js

Codex 0.171.0

codex exec and the interactive TUI.

FunctionStateProof or cause
Rules (deny)PartialA refusal is a JSON deny with exit 0; exit 2 is not enforced. A hook that fails before its input is readable (unreadable input, timeout, node missing) is not refused: issues #52, #64. Proof of the JSON deny: skills/lsh-rules/test/payloads.test.js, mcp.test.js.
ask (approval)Not supportedask is not enforced in any mode. Leashr refuses a risky action instead and allows a read (ask policy). Proof: payloads.test.js.
Spending capPartialA cap already reached by Claude Code spend refuses Codex calls. Codex has no cost signal of its own: with a mission or day cap set, every tool call is refused (signal_missing). Interactive TUI not measured for cap.js. Issue #64. Proof: skills/lsh-cap/test/agents.test.js.
Kill switchProvenRefusal enforced for tool calls and prompts (codex exec). skills/lsh-cap/test/agents.test.js.
Audit journalProvenOne event per decision, replayed from captures. payloads.test.js.
Cost per missionNot supportedCodex exports tokens without cost under other event names; the collector does not parse them.
Install by lsh-initNot supportedlsh-init writes no .codex/hooks.json. Issue #64.

Cursor 2026.11.19

preToolUse hook, agent -p and interactive cursor-agent.

FunctionStateProof or cause
Rules (deny)ProvenRefusal by exit 2, proven (the call is blocked, the reason shown). Not covered: beforeShellExecution has another payload, a hook installed there would refuse every command as invalid_input. payloads.test.js.
ask (approval)Not supportedDocumented as accepted but not enforced for preToolUse (a read under an ask rule ran without a prompt). Ask policy applies.
Spending capPartialSame as Codex: refusals enforced, no cost signal, every tool call refused under a mission or day cap. Issue #64.
Kill switchPartialTool calls proven with agent -p. The prompt hook (beforeSubmitPrompt) is enforced interactively but not called by agent -p. agents.test.js.
Audit journalProvenReplayed from captures. payloads.test.js.
Cost per missionNot supportedCursor documents a cost estimate on Enterprise only; not parsed.
Install by lsh-initNot supportedlsh-init writes no .cursor/hooks.json. Issue #64.

Antigravity 1.5.14

agy -p and interactive sessions. Antigravity replaces Gemini CLI as a target.

FunctionStateProof or cause
Rules (deny)ProvenRefusal by exit 2, proven (call blocked, reason shown); MCP calls judged as mcp__<server>__<tool>. payloads.test.js, mcp.test.js. Tools other than the five captured (list, search) are not covered.
ask (approval)PartialShown only in an interactive prompting mode (--mode accept-edits), which the hook cannot detect; in agy -p and auto mode the call runs. Ask policy applies.
Spending capPartialSame as Codex: no cost signal of its own. Interactive session not measured for cap.js. Issue #64.
Kill switchProvenagy -p: tool call refused by exit 2, prompt stopped by a PreInvocation answer (turn ends, agy exit 3). agents.test.js.
Audit journalProvenReplayed from captures. payloads.test.js.
Cost per missionNot supportedAntigravity gives JSON usage in headless mode, not OpenTelemetry; not parsed.
Install by lsh-initNot supportedlsh-init writes no .agents/hooks.json. Issue #64.

Gemini CLI 0.70.0

Not a target: it refuses individual accounts and Antigravity replaces it.

FunctionStateProof or cause
Rules (deny)Not provenThe hook knows Gemini tool names (run_shell_command, read_file...) from its documentation, never captured on a running Gemini CLI. Measured before that mapping: 0 of 28 dangerous cases blocked (bench/AGENTS-COMPARE.md).
ask (approval)Not provenNo capture.
Spending capNot supportedNo cost signal: model.maxSessionTurns limits turns, not spend.
Kill switchNot provenNo capture.
Audit journalNot provenNo capture.
Cost per missionNot supportedOpenTelemetry gives tokens, no cost; not parsed.
Install by lsh-initNot supportedNo hook configuration written.

Operating systems

Every run on a real agent happened on Windows 11. CI runs the skill tests on Linux, never on macOS.

SystemStateProof or cause
Windows 11ProvenReal sessions of Claude Code 2.1.310, Codex, Cursor and Antigravity (captures of 21/11/2026), node --test in each skills/lsh-* folder, rules.js test (320 cases, 28/11/2026).
Linux (Ubuntu)PartialThe quality job of .github/workflows/ci.yml (runs-on: ubuntu-latest) runs node --test in each skills/lsh-* and rules.js test on every PR; green on main on 24/11/2026. Replayed on 28/11/2026 in a node:24 container (Debian 12, Node v24.22.3, x86_64): the skill tests, rules.js test (320/320), validate-skills, spec-lint, repo-guard, docs-limits, pr-risk, wire-format and lsh-review-sim pass (2 lsh-init tests and 1 lsh-review-sim test skipped on Linux). Not proven: a real agent session, the rules bench (bench/), a cap of several dollars, concurrent sessions.
macOSNot provenNo macOS job in CI, no known run. The test that would prove it: runs-on: macos-latest in the quality job matrix (issue #101).

Not proven: the test that would prove it

Each line is announced as “not proven” or “partial” above. Until the test exists and passes, it stays that way.

CaseTest or command that would prove it
Gemini CLI: rules, ask, kill switch, auditCapture the payloads of a signed-in Gemini CLI 0.70.0, add them to skills/lsh-rules/test/fixtures/payloads/ and replay them in skills/lsh-rules/test/payloads.test.js (same method as Codex, Cursor and Antigravity). Measure without capture: bench/scripts/agents-compare.js.
Codex: a hook that fails before its input is readable (timeout, no node)A codex exec session with a broken hook, and a case added to skills/lsh-rules/test/payloads.test.js that expects the refusal (issues #52, #64).
Cap on Codex in the interactive TUI and on Antigravity in an interactive sessionInteractive cap.js captures in skills/lsh-cap/test/fixtures/ replayed by skills/lsh-cap/test/agents.test.js (issue #64).
Cursor: beforeShellExecution; Antigravity: tools beyond the five capturedOne real capture per hook or tool, added to the payloads.test.js fixtures.
Claude Code ask with claude -pA claude -p session with an ask rule, observed then replayed; today only the interactive session is observed.
Cap of several dollars, real concurrent sessionsbench/data/cap-bench.json observes a cap of a few thousandths of a dollar in real sessions; skills/lsh-cap/test/cap.test.js simulates 16 concurrent statuslines of one session. Missing: a real session with a cap of several dollars and two simultaneous sessions.
Linux and macOS: real agent session, rules benchReplay bench/ on Linux and macOS (issue #101).

Decisions pending

  • Caps outside Claude Code (issue #64): block everything, warn, or estimate cost per agent. Awaiting a product decision; until then the behavior is the refusal described above.
  • Adapters beyond the refusal and hook installation for Codex, Cursor and Antigravity: planned for a later version (issue #112), no code yet.
  • Remaining holes on Codex: a hook that fails before its input is readable (issues #52, #64); shell bypasses (issue #47).