Least privilege, checked by a compiler A developer has built Staal, a programming language in which capabilities are encoded in function types, so agent code cannot send messages, write files, call APIs or move money unless the host application grants a bounded, unforgeable capability for that action. Capabilities can only be narrowed, are checked before every action, and are never passed to a model; the post illustrates the design with compiler errors, a run log, and a benchmark against plain Python, citing an April 2026 incident in which an AI coding agent deleted a production database in nine seconds after finding a root-scoped API token. TL;DR: In Staal, code can't send a message, write a file, call an API or move money unless it holds a capability for that action. Capabilities come only from the host app, can only be narrowed, are checked before every action, and are never handed to a model. Below: how that works, real compiler errors, a real run's log, and a benchmark against plain Python. Nine seconds On April 24, 2026, an AI coding agent deleted a company's production database in nine seconds. It was doing routine maintenance in staging for PocketOS, which builds software for car rental businesses. It hit a credential mismatch, searched the filesystem, and found an API token in an unrelated file. The token had been created to manage custom domains, but it was root-scoped: it could perform any operation the hosting provider's API offered. One call later, the production volume was gone, along with every backup stored inside it. The model made a bad call, but that isn't the interesting part. The task needed to fix a configuration in staging. The token could delete production. Nothing between the agent and the API knew what the task was, so nothing could say that's too much power for this. It's a pattern. In July, researchers showed that an instruction left in a public GitHub issue could steer an agentic workflow into leaking private repository data. In Gravitee's survey of 750 organisations this year, excessive permissions was the most consistently reported failure: agents with more access than their task needs, often through shared service accounts and inherited credentials. Models will keep being wrong, and keep being talked into things. What decides the damage is how much the agent was able to do. The payment networks already know the answer Where agents touch money, the industry has stopped handing them general-purpose credentials. Stripe's agentic commerce tokens are scoped to one merchant, one session and one amount range, and usable once. Mastercard's Agent Pay makes an agent present a signed record of what it was asked to do, and the network stops a transaction that goes beyond it. That's capability security, an idea that's decades old: instead of asking who are you and what may you do?, hand out unforgeable tokens that each carry one bounded power. The payment networks are building it into their rails one network at a time. Staal builds it into the language, for every action an agent's code takes. Authority as a value A capability is part of a function's type, and the type says how far it reaches: fn remind patients: List