Skip to main content
Claurst inherits the feature-gating architecture of the original Claude Code TypeScript codebase. Features are toggled at compile time using Bun’s 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

These flags control features that are internal to Anthropic’s production builds. Standard Claurst builds do not enable them. Attempting to enable internal-only flags in a community build will produce compilation errors or missing dependencies.

Building with features enabled (Rust)

The Claurst Rust workspace uses Cargo features. To enable a feature for a local build:
To permanently enable features during development, add them to 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 the tengu_ 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:
And via Cargo #[cfg] attributes in the Rust port:

USER_TYPE gating

Beyond compile-time feature flags, some behavior is gated on USER_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 ConfigTool and TungstenTool (internal-only tools)
  • Debug prompt dumping to ~/.config/claude/dump-prompts/
  • The /security-review slash command
These features are present in the source but are not accessible in standard builds regardless of environment variables.