Dynamic require() Ant-Only Escape Hatches

Description

Code pattern throughout the leaked source where dynamic require() calls are gated behind process.env.USER_TYPE === 'ant' so Anthropic-internal packages (not shipped to external users) are never loaded on external builds. During esbuild bundling these require calls can fail module resolution; strategy is to wrap/stub them rather than bundle them, since the flag path is dead for external users anyway.

Key claims

Relations

Sources

src-20260420-5444205c5d32