Every workflow script the model authors is a potential attack surface. Chapter 10 introduced workflow scripts as agent-authored code: a string of Python that the runtime compiles and executes on each run. That script can contain arbitrary logic. It can loop forever. It can try to allocate a gigabyte of memory. If it finds a path to the host process, it can read the environment variables where the LiteLLM API keys live. Running that code in the same process as the runtime — even behind restricted builtins — is not sufficient without process-level isolation.
But isolation has costs. Every boundary you draw is a round trip, a serialization format, and a new class of failure mode. The question is not whether to isolate; it is which threats you are isolating against, what you are willing to pay, and where you draw the line. Chapter 9 drew one isolation boundary around tool execution — the `San