feature() bundler function (TypeScript) or Cargo features (Rust port), and at runtime via GrowthBook and environment variable overrides.
Compile-time feature flags
The bundler constant-folds feature checks and eliminates dead branches. This means a feature that is not enabled produces zero code in the output binary — not a disabled path, but no code at all.Known feature flags
Building with features enabled (Rust)
The Claurst Rust workspace uses Cargo features. To enable a feature for a local build:Cargo.toml:
Cargo.toml
Feature names in
Cargo.toml use kebab-case (coordinator-mode), while the original TypeScript source uses UPPER_SNAKE_CASE (COORDINATOR_MODE). They refer to the same concepts.Runtime feature flags (GrowthBook)
Claurst uses GrowthBook for runtime feature gating and A/B testing. Runtime flags are fetched at startup and cached aggressively — many checks use stale values intentionally to avoid blocking the main loop. All GrowthBook feature flags in Claude Code use thetengu_ prefix (Tengu is the internal project codename).
Examples of tengu_ prefixed runtime flags:
GrowthBook client keys are environment-dependent:
Environment variable overrides
Several features can be toggled at runtime via environment variables, without recompiling:Dead-code elimination
Features gated behind a compile-time flag produce zero footprint in builds where they are disabled. There is no runtime check, no disabled code path, and no binary size overhead from unused features. This is done via Bun’s constant-folding for TypeScript:#[cfg] attributes in the Rust port:
USER_TYPE gating
Beyond compile-time feature flags, some behavior is gated onUSER_TYPE === 'ant' — meaning the user is an Anthropic employee. This gates:
- Access to staging API endpoints (
api-staging.anthropic.com) - Internal beta headers (
cli-internal-2026-02-09) - The
ConfigToolandTungstenTool(internal-only tools) - Debug prompt dumping to
~/.config/claude/dump-prompts/ - The
/security-reviewslash command