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

Routing Claude API traffic to control costs after Max subscription change
Anthropic's Max subscription no longer covers third-party tool usage, forcing OpenClaw users to API billing. A routing proxy directs simple tasks to Claude Sonnet ($3/M input, $15/M output) and complex ones to Opus ($5/M input, $25/M output), cutting costs without quality loss.

Local Tool Visualizes Claude Code Session Data
A Python script reads Claude Code session data stored locally in ~/.claude/ and generates a scroll-driven visualization with D3.js charts showing daily activity, project breakdown, tool usage, and coding rhythm heatmaps.

Rails-AI-Context Gem Provides Claude Code with Complete Rails App Model via MCP
The rails-ai-context gem auto-introspects Rails applications and exposes 39 tools via MCP, allowing Claude Code to query specific app details like schema with encrypted columns, model associations, routes, Stimulus wiring, and Turbo mappings instead of reading entire files.

Attesor: AI-Powered Reverse Engineering of Rosetta 2 for Linux VM
Attesor is a GitHub project that uses AI to reverse-engineer Apple's Rosetta 2 binary translation technology, aiming to document its architecture and potentially enable x86_64-to-ARM64 translation on Linux virtual machines.