In depth
Cost caps are the runtime's defence against the horror story of an unattended agent burning hundreds of dollars overnight. A turn_end hook checks session.cost_cents against your ceiling and gates further turns when it crosses. Pairs naturally with a notify hook to your ops channel so you know it fired.
Related concepts
HooksDeclarative event handlers that fire at specific points in an agent's lifecycle (turn_start, tool_end, etc).Turn capA runtime ceiling on how many loop iterations an agent can take before the runtime forces it to stop.Model routingSending different turn types to different models (cheap for exploration, premium for writing).
Read the deep dive
Hooks: 4 production patterns we ship today on Digitorn
Read article
Newsletter
Get the next post in your inbox.
Engineering notes from the Digitorn team. No marketing, no launch announcements, no "10 prompts that will change your life". Just the things we write that we'd want to read.