process.env.USER_TYPE Build-Time Branch

Description

Dead-code-eliminated branch gate. Internal Anthropic builds set USER_TYPE='ant' which unlocks internal-only code paths; external builds replace process.env.USER_TYPE with the literal string 'external' at build time via esbuild's define, causing those branches to be tree-shaken. The invariant: external bundles must not contain any live USER_TYPE==='ant' branch.

Key claims

Relations

Sources

src-20260420-c54143c229a1