Dev.to
8/4/2026

Your agent's audit log is a story, not evidence
Short summary
The author introduces obstat, a Python library that writes authorization decisions to disk (fsynced) before an AI agent's tool body executes, ensuring the audit log is durable evidence rather than a post-hoc story. The library chains records via hashes for tamper detection, fingerprints arguments to avoid storing credentials, and scopes authorization per-resource. Real-world deployment revealed gaps in tool surface coverage and argument collision, both now addressed.
- •obstat writes fsynced audit records before tool execution, not after, so missing records are meaningful evidence
- •Records are hash-chained for tamper detection; arguments are fingerprinted not stored to protect credentials
- •Author found real gaps deploying it on personal email: agent bypassed gate via unlogged tool, and argument name collision with email subject header
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



