| ask | auto | plan | full |
|---|---|---|---|
| asked | asked | refused | asked |
The tool
cloud { action: "buy_space" }, and that alone. Reading the storages, the space left and the model catalogue are read; the other cloud writes are storage.
What makes it its own category
Every other spend in a run is a consequence of work asked for: a turn, a search, a capture, a generated image. Buying space is a purchase — a monthly commitment in credits, taken immediately and not given back by stopping the run.
An add-on is charged in full at purchase and renews every period. Even a run that then hits its budget has made the purchase. That is precisely why the mode cannot open it.
What to look at
onPermission: async ({ category, args }) => {
if (category !== "money") return "once";
// args carries which add-on and how many gigabytes
console.log("about to buy", args.request ?? args);
return "deny"; // most applications should simply never allow this
}def on_permission(request):
if request["category"] != "money":
return "once"
# args carries which add-on and how many gigabytes
print("about to buy", request["args"])
return "deny" # most applications should simply never allow thisFor most applications the right answer is a flat refusal: buying space is an account decision, and the person who should make it is rarely the one watching an agent run.
The alternative the agent has
When a storage is full, a write fails with quota_exceeded and the agent is told to say so — free space, or add space in Cloud. Refusing the purchase leaves it with an answer to give, not a dead end.