Multi-Agent Safety: Designing Recipient Allowlists and Human-in-the-Loop Approval Holds in TypeScript A developer outlined a TypeScript approach for constraining autonomous agents' outbound actions using deterministic "safety envelopes" rather than prompt instructions. The design pairs a RecipientAllowlistGate, which checks email recipients against exact addresses and allowed corporate domains before any network call, with an ApprovalHoldRegistry that stages external or sensitive actions as pending tickets for human approval instead of dispatching them or failing outright. The writeup argues that prompt-level instructions are not a security boundary because models can be jailbroken or misread context. As autonomous agents transition from read-only coding assistants to proactive systems that deploy code, run marketing workflows, and message stakeholders, security and guardrail design become critical. Giving an LLM direct access to an unconstrained outbound action e.g., sending an email, refunding a charge, or deleting a cloud resource without deterministic safeguards is an accident waiting to happen. Prompt engineering alone "Please make sure not to email anyone outside the company" is not a security boundary. Models can be jailbroken, misinterpret context, or suffer from semantic drift. Let's look at how to build deterministic Safety Envelopes : Recipient Allowlists and Approval Holds . In production systems, your safety guardrails must exist in code outside the LLM context window: Agent Reasoner ── Tool Request ── Deterministic Gate ── Real World API │ Violates Allowlist? │ ▼ Hold for Approval Here is a TypeScript utility that verifies target recipients against exact matches, wildcard patterns, and corporate domains before any network packet is dispatched: export class RecipientAllowlistGate { private allowedDomains: Set