Because agent sessions can track cumulative dollar spend, users can cap a session's spending and require explicit approval before it spends more, preventing runaway costs.
Matei describes capping per-session agent spend (e.g., $5) with an approval prompt before going over, after one of his own debugging sessions burned $500 in tokens reading log files. ✦ AI generated
Matei Zaharia · Latent Space · 2026-06-24 · original ↗
plays this moment only · 20:42 — 22:12
I've had, like, I ask an agent to debug something, and it spent $500 because it decided to read a lot of log files and burn a lot of tokens. but I can literally say, "Okay, launch a agent to do this and cap it to spending $5." Like, ask me for permission if it needs more.
verbatim transcript · starts at 20:42
Swyx [00:20:42]: Yeah.
Matei Zaharia [00:20:42]: So yeah, but these are the cool things. I think the contextual or stateful part, and then the way it can be libraries, and that was another reason to make it open source because others will write libraries and, like, we and our customers can use them. And the final thing, because it’s stateful, one of the states we track is how much you spent in that session. So I can. I’ve had, like, I ask an agent to debug something, and it spent $500 because it decided to read a lot of log files and burn a lot of tokens. but I can literally say, “Okay, launch a agent to do this and cap it to spending $5.” Like, ask me for permission if it needs more. And because we’re counting that within that session, it’ll pop up and tell me, “Okay, you spent five, $5. Do you wanna go on?”
Reynold Xin [00:21:27]: So important context here. Matei spent the last five years, a lot of his time was architecting Unity Catalog at Databricks
Matei Zaharia [00:21:34]: Yeah