TrustLog Dynamics: Python Daemon Uses Bond Math to Kill Rogue AI Agents

TrustLog Dynamics is an open-source Python daemon that monitors AI agent API costs in real time and terminates rogue processes using detection methods borrowed from quantitative finance. The tool addresses the problem of AI agents spending money continuously without oversight, drawing inspiration from trading floor circuit breakers.
Detection Methods
The daemon uses two specific detection algorithms:
- Convexity detection (
d²C/dt² > 0) — borrowed from fixed-income risk management. When cumulative cost accelerates over time (snowballing), the daemon kills the agent at the inflection point. - Zero-variance detection (
σ² < ε) — borrowed from statistical process control. When rolling cost variance drops to near zero, indicating the agent is stuck in a mechanical loop, the daemon severs the connection.
Testing Results
The developer tested TrustLog Dynamics live against two AI models:
- Claude 4.6 Sonnet (context window explosion) — caught and terminated
- Gemini 3.1 Pro (retry loop) — caught and terminated
Both interceptions were recorded on video: Claude intercept and Gemini intercept.
Installation and Deployment
The tool requires three commands to install and runs as a systemd daemon. It's released under MIT license with source code available at GitHub.
The developer positions this as a financial governance layer for AI agents, inspired by NVIDIA's NemoClaw for network security and Jensen Huang's recent comments about OpenClaw strategies. The approach uses mathematics that has been protecting capital markets for decades.
📖 Read the full source: r/LocalLLaMA
👀 See Also

Reducing Multi-Modal Agent Latency by Omitting Screenshot History
A developer found that omitting previous screenshots from multi-modal agent requests and replacing base64 image data with "[image omitted]" strings significantly reduces latency while maintaining performance. The experiment was conducted using Claude and documented on GitHub.

Slack Plugin for Claude Code: Connect to Slack for Context and Updates
Slack has released a new plugin for Claude Code that enables connection to Slack for search, messaging, and document creation. The plugin allows Claude Code to access Slack context to unblock technical problems and post updates.

GAN Skill for Claude Code: Adversarial AI Tool for Idea Refinement
A Claude Code skill called /gan uses adversarial AI roles to critique and improve ideas through alternating Discriminator and Generator phases, with features like intensity modes, multi-language output, and forced role selection developed through self-iteration.

Specsmaxxing: Fighting AI Psychosis with YAML Specs and ACAI
Acai.sh introduces Specsmaxxing: a method to combat AI agents losing context by writing requirements in YAML and using numbered Acceptance Criteria for AI (ACAI) that agents reference in code.