{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiapqjkamemg4xh3lmpq2hhqn2cqmj6gwh4ijz5gxyhrqbkhegqdem",
"uri": "at://did:plc:lk3jfj3zq4k4wxnk474axylu/app.bsky.feed.post/3mnuvxxnlsja2"
},
"path": "/t/has-anyone-actually-solved-runaway-agent-costs-looking-for-patterns-beyond-logging/1383094#post_5",
"publishedAt": "2026-06-09T18:59:32.000Z",
"site": "https://community.openai.com",
"textContent": "Exactly the gap — hooks fire but can’t stop. max_turns caps\niterations but doesn’t know anything about cost. The tool\npattern (Option 3) solves this: the agent asks permission\nbefore spending, the policy engine can deny it before the\ncharge fires. No hook needed, no post-hoc cleanup.\n\nI shipped this as pip install openai-agents-valta if you\nwant to see the implementation.",
"title": "Has anyone actually solved runaway agent costs? Looking for patterns beyond logging"
}