Quality & production
Runtime control patterns
Choose controls for deadlines, context growth, approvals, caching, background work, and runtime observation.
Add a control when you can name the behavior it changes and how to verify it. These patterns assume you already have a working Agent. Use complete projects for initial setup.
Test this with a deliberately slow local fixture and verify the caller handles the unsuccessful outcome. Cancellation requests that work stop; it cannot retract an external effect already accepted by a service. For connection-owned work, use the transport’s disconnect lifecycle.
Output tokens, tool rounds, request deadline, concurrency, and aggregate harness budgets constrain different things. Pick values from the task and observed behavior; these example values are not universal service defaults. Close the Agent after its runs settle.