CLI reference
clawmetry proxy#
A local proxy that sits in front of your model calls and enforces limits. Optional — observation does not need it — but it is the only place a budget can actually block rather than merely alert.
clawmetry proxy startSubcommands#
proxy start#
| Flag | Default | Effect |
|---|---|---|
--port | 4100 | Port to listen on |
--host | 127.0.0.1 | Bind address |
--daily-budget USD | — | Daily spend limit |
--monthly-budget USD | — | Monthly spend limit |
--no-loop-detection | Disable loop detection | |
--log-requests | Log every proxied request | |
--foreground | Run in the foreground |
clawmetry proxy start --daily-budget 25 --monthly-budget 400proxy stop#
clawmetry proxy stopproxy status#
clawmetry proxy status
clawmetry proxy status --jsonproxy config#
Read or change the configuration without restarting.
| Flag | Values | Effect |
|---|---|---|
--daily-budget USD | Set the daily budget | |
--monthly-budget USD | Set the monthly budget | |
--action | block, warn, downgrade | What happens at the limit |
--loop-detection | on, off | Toggle loop detection |
clawmetry proxy config --daily-budget 50 --action warn
clawmetry proxy config --action block
clawmetry proxy config --loop-detection onBudget actions#
| Action | Behaviour at the limit |
|---|---|
warn | Let the call through, record and surface it |
block | Refuse the call |
downgrade | Route to a cheaper model instead of refusing |
Start on warn. Moving to block before you trust the numbers is how people
end up with a broken agent and no idea why. downgrade is the humane middle:
the work continues, more cheaply, and the dashboard tells you it happened.
Pointing agents at it#
The proxy is a standard HTTP proxy for provider endpoints. Configure the runtime to use it as its base URL — the mechanism differs per runtime and per SDK, but it is the same base-URL override you would use for any gateway.
Why OpenClaw's pause needs it#
OpenClaw has no pause primitive. ClawMetry's pause for an OpenClaw session is a
flag file that only the proxy enforces. With no proxy running, a "pause" on
an OpenClaw session changes nothing, and the Guard tab reports advisory_only
rather than claiming the agent was held.
If pausing OpenClaw agents matters to you, run the proxy.
Loop detection#
The proxy detects repeated identical calls in-flight, which is earlier than the transcript-based detectors can see them. The two are complementary: the proxy catches a tight loop before it costs much, the detectors catch the slower shapes — busy-but-not-progressing, repeated tool failures — that only appear over a window.
| Variable | Effect |
|---|---|
CLAWMETRY_PROXY_DAILY_USD | Daily budget |
CLAWMETRY_PROXY_MONTHLY_USD | Monthly budget |
CLAWMETRY_PROXY_AUTO_ROUTE | Automatic model routing |
→ Enforcement proxy for the design, and Budgets and limits for how it fits with alerts.