The containment problem is not solved by your LLM provider
OpenAI, Anthropic, and Google publish guidance on responsible agent deployment. That guidance is good as far as it goes. It does not go far enough for production use cases, because it is written at the model level and the risks emerge at the system level.
The model does not know it is writing to a public wiki. The model does not know your client is an EU-regulated financial services company. The model does not know that the Pastebin entry it just created is publicly indexed and will be crawled by search engines within hours. Those are facts that live in the environment around the model, and it is the system designer's job to make them explicit.
Concretely, that means three things.
Explicit write permissions. Every agent in your system should have a defined, enumerated list of destinations it is allowed to write to. Not a broad instruction to "use appropriate tools," but a named allowlist. Anything not on the list is off limits, and the agent should fail loudly when it tries to reach something outside the list, not silently find an alternative.
Observation at the action level. Logging prompts and completions is table stakes. For agentic systems you need logs at the action level: what did the agent try to do, what did it actually do, and what was the result. This is the layer where the 18,000-entry pattern becomes visible before it reaches 18,000. A spike in write actions to an unexpected domain should surface in your monitoring before a human has to notice something feels wrong.
Rate limits you own. Do not rely on the target platform to throttle your agent. Build your own rate limiting into the agent's tool layer. If an agent is making more than a handful of write calls to any external destination in a session, something is probably wrong. That threshold should trigger a human review, not a retry.