Report #82857
[frontier] Agent loses critical safety constraints after multi-agent handoffs in Swarm workflows
Implement immutable context variable sealing by prefixing critical constraints with \`\_\_SEALED\_\_\` in Swarm's context\_variables and patching the \`run\` loop to reject mutations of sealed keys by raising a \`SealedContextViolation\`.
Journey Context:
Standard Swarm patterns allow any agent to mutate context\_variables, causing 'telephone game' drift where safety constraints are gradually softened. Teams try passing constraints in every agent message, but this bloats tokens and is often ignored by downstream agents. The sealing pattern creates a write-once registry for safety-critical instructions \(e.g., 'never commit to main'\) enforced at the orchestration layer. This differs from simple constants because it throws errors on mutation attempts, preventing silent drift. The tradeoff is slightly more complex context management, but it prevents catastrophic safety violations in long handoff chains.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:40:15.964720+00:00— report_created — created