bun:bundle feature flag system for dead code elimination at build time. Code inside an inactive feature flag is completely removed from the compiled binary — it is never shipped to users and does not increase bundle size.
How it works
VOICE_MODE is disabled at build time, the entire if block — including the require() — is stripped before the binary is produced. The feature simply does not exist in that build.
This is distinct from runtime feature flags (e.g., GrowthBook A/B experiments).
bun:bundle flags are resolved at compile time and cannot be toggled at runtime.Flag reference
| Flag | Feature |
|---|---|
PROACTIVE | Proactive agent mode — enables autonomous, unprompted agent actions |
KAIROS | Kairos subsystem |
BRIDGE_MODE | IDE bridge integration (VS Code, JetBrains) |
DAEMON | Background daemon mode |
VOICE_MODE | Voice input/output |
AGENT_TRIGGERS | Triggered agent actions (event-driven execution) |
MONITOR_TOOL | Monitoring tool |
COORDINATOR_MODE | Multi-agent coordinator for parallel workloads |
WORKFLOW_SCRIPTS | Workflow automation scripts |
Anthropic-internal gates
Some features are gated at runtime for Anthropic employees only:Effect on binary size
Stripping inactive features viabun:bundle flags results in meaningfully smaller binaries for standard distributions. For example:
- A build without
BRIDGE_MODEexcludes all bridge protocol code, JWT utilities, and IDE session management. - A build without
VOICE_MODEexcludes the voice service, speech-to-text streaming, and voice hooks.