Skip to content

v0.11.0 — Live Session Monitoring with Circuit Breakers

Choose a tag to compare

@Siddhant-K-code Siddhant-K-code released this 06 Apr 17:44
· 140 commits to main since this release

Live session monitoring with circuit breakers

agent-strace watch <session-id>

Tails a live session's event stream and fires alerts when configured thresholds are exceeded.

# Watch with defaults
agent-strace watch

# Custom thresholds
agent-strace watch --max-retries 3 --max-cost 5 --max-duration 600

# Kill the agent process on violation
agent-strace watch --max-retries 3 --on-violation kill

# Config file
agent-strace watch --config .agent-watch.json

Watchers

Watcher Trigger Default
RetryWatcher Same command runs more than N times 5
CostWatcher Estimated cost exceeds budget $10
DurationWatcher Session exceeds time limit 30 minutes
LoopWatcher Same event sequence repeats N times 3x
ScopeWatcher File write denied by .agent-scope.json policy any violation

Each violation fires exactly once per session - no alert spam.


Alert actions

  • terminal - print to stderr (default, always active)
  • file - append to .agent-traces/alerts.log
  • webhook - POST JSON to a URL (Slack, PagerDuty, etc.)
  • kill - send SIGTERM to the agent process

Config (.agent-watch.json)

{
  "watchers": {
    "retry":    { "max": 3 },
    "cost":     { "max_dollars": 5.0 },
    "duration": { "max_minutes": 15 },
    "loop":     { "sequence_length": 3, "max_repeats": 3 }
  },
  "webhook": {
    "url": "https://hooks.slack.com/services/..."
  }
}

Zero new dependencies

21 new tests.