Stop the step before it runs.

Your agent asks before each model or tool call; fuses on cost, loops, errors or success odds can answer stop.

Start free
Prompt for your coding agent
Wire Traza Guard and Steer into this project, so a fuse can refuse a looping agent its next step and a person can nudge, approve or stop it between steps.

1. If this project runs Claude Code: clone the open engine (https://github.com/toshish/traza) outside this repository and, from this project's root, run:
   python3 <path to the engine checkout>/examples/claude-code/install.py --url https://api.trazadb.com
   It merges a PreToolUse hook into .claude/settings.json that asks POST /v1/fuses/check before each tool call: a stop or a block nudge denies the call, advice is added as context. Show me the settings change, and tell me to export TRAZA_TOKEN, a Traza Cloud read key, in the shell Claude Code runs in. Never write a key into a file.
2. For any other agent loop, call the check before each step, with the run id its spans carry as session.id:
   POST https://api.trazadb.com/v1/fuses/check  {"run": "<run id>", "next": {"tool": "<tool name>"}}   ("next": {} before a model call)
   with the header "Authorization: Bearer $TRAZA_API_KEY". Hand every entry of "nudges" in the answer to the agent as a note queued in Traza, and end the run when "verdict" is "stop".
3. Give me a policy to create with a full key, so a looping run is stopped rather than warned:
   curl -s https://api.trazadb.com/v1/fuses/policies -H "Authorization: Bearer $TRAZA_FULL_KEY" -d '{"name": "<agent>", "match": {"service": "<service.name>"}, "limits": {"max_repeats": 5, "max_steps": 400}, "action": "stop"}'
4. Set gen_ai.agent.name on each agent's spans, so Traza can count hand-off cycles between agents.
5. A run shows in Mission Control once its spans reach Traza. Other agents export OpenTelemetry to https://api.trazadb.com. For Claude Code, tell me to install traza-server from https://github.com/toshish/traza/releases and the forwarder with pip, then run both beside Claude Code with a Traza Cloud ingest key:
   pip install "git+https://github.com/toshish/traza.git#subdirectory=sdk/python"
   traza forward --listen 127.0.0.1:8089 --upstream https://api.trazadb.com
   traza-server import claude-code --watch --url http://127.0.0.1:8089 --token "$TRAZA_INGEST_KEY"

Docs: https://www.trazadb.com/docs/guard/, https://www.trazadb.com/docs/steer/ and https://www.trazadb.com/docs/coding-agents/

ci-fix-4821 max_repeats 5

  1. npm test 1 failed , ran 3.8 seconds
  2. npm test 1 failed , ran 3.6 seconds ×2 (repeat 2 of 5)
  3. npm test 1 failed , ran 3.5 seconds ×3 (repeat 3 of 5)
  4. npm test 1 failed , ran 3.7 seconds ×4 · warn (repeat 4 of 5)
  5. npm test 1 failed , ran 3.5 seconds ×5 · stop (repeat 5 of 5)
  6. npm test check: stop, never ran

10 limits, one policy per run.

Cost, tokens, steps, model and tool calls, wall time, repeats, error streaks, hand-off cycles and success odds: one line each.

Ask before the step, not after the bill.

Claude Code gets the check through one install script; any other agent asks with one HTTP call before each step.

python3 examples/claude-code/install.py \
  --url https://api.trazadb.com
export TRAZA_TOKEN=tzk_…   # a read key

Every live run, in one view.

Mission Control on Traza Cloud lists each run’s step, spend, guard verdict and how earlier runs on the same path ended.

Mission Controlsorted by risk

Mission Control lists live runs sorted by risk; 4 are shown. The figure replays ci-fix-4821 (Claude Code 2.1.303, headless in GitHub Actions) from step 8: the acknowledgement of step 11 says warn (max_repeats 5 at 80%), the acknowledgement of step 13 says stop (max_repeats 5 reached: tool:Bash#ae9526dcc4225266 repeated 5 times in the last 20 steps), and the run moves to the top of the grid; the pre-call check before its next call, tool:Bash, answers stop.

Live runs as the grid ends, sorted by risk
RunStepSpendGuardForesight
ci-fix-4821 about to: tool:Bash $0.075 stop: max_repeats 5 reached: tool:Bash#ae9526dcc4225266 repeated 5 times in the last 20 steps novel, new: tool:Bash
deep-research-0412 about to: tool:WebFetch $0.48 warn: max_cost_usd 0.55 at 86%: $0.4774 spent insufficient_history
live-ci-doomed-0 about to: tool:Bash $0.013 continue likely_failure, 7.5% · 40 runs
live-ci-healthy-0 about to: llm $0.040 continue on_track, 90% · 50 runs

Approve, kill or nudge from your phone.

On Traza Cloud, stops and warnings reach your phone or Slack, and a nudge reaches the agent at its next check.

Traza Cloud now

Stopped: ci-fix-4821

your-org/ci-fix · max_repeats 5 reached: tool:Bash#ae9526dcc4225266 repeated 5 times in the last 20 steps

ApproveOpen

Put a fuse before your next run.

Start free on Traza Cloud, or run the open engine yourself.