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
| Flag | What it gates |
|---|
PROACTIVE / KAIROS | Always-on assistant mode — Claude receives <tick> heartbeat prompts and acts proactively between user turns |
KAIROS_BRIEF | Brief command — ultra-concise output mode designed for the persistent KAIROS assistant |
BRIDGE_MODE | Remote control via claude.ai — JWT-authenticated WebSocket/SSE bridge for syncing sessions to the cloud |
DAEMON | Background daemon mode — runs a persistent Claurst process in the background |
VOICE_MODE | Voice input — speech-to-text integration for prompt entry |
WORKFLOW_SCRIPTS | Workflow automation — enables the WorkflowTool and WorkflowScripts command |
COORDINATOR_MODE | Multi-agent orchestration — transforms Claurst into a coordinator that spawns and directs parallel worker agents |
TRANSCRIPT_CLASSIFIER | AFK mode — ML-based automatic permission approval using a transcript classifier (afk-mode-2026-01-31 beta header) |
BUDDY | Companion pet system — Tamagotchi-style ASCII companion with species, stats, and Claude-generated personality |
NATIVE_CLIENT_ATTESTATION | Client attestation — Bun’s HTTP stack overwrites the cch=00000 placeholder in the billing header with a computed hash |
HISTORY_SNIP | History snipping — enables the SnipTool for extracting snippets from conversation history |
EXPERIMENTAL_SKILL_SEARCH | Skill discovery — experimental search over the skills/commands registry |
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:
# Build with coordinator mode enabled
cargo build --features coordinator-mode
# Build with multiple features
cargo build --features "coordinator-mode,bridge-mode"
# Build the release binary with voice mode
cargo build --release --features voice-mode
To permanently enable features during development, add them to Cargo.toml:
[features]
default = []
coordinator-mode = []
bridge-mode = []
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:
| Flag | Effect |
|---|
tengu_attribution_header | Kill-switch for the x-anthropic-billing-header |
tengu_hawthorn_window | Overrides MAX_TOOL_RESULTS_PER_MESSAGE_CHARS |
tengu_ultraplan_model | Configures the remote model used for ULTRAPLAN sessions |
tengu_penguins_off | Kill-switch for Fast Mode (internally “Penguin Mode”) |
tengu_scratch | Enables the shared scratchpad directory for coordinator workers |
GrowthBook client keys are environment-dependent:
| Environment | Key |
|---|
| External (prod) | sdk-zAZezfDKGoZuXXKe |
| Anthropic internal (prod) | sdk-xRVcrliHIlrg4og4 |
| Anthropic internal (dev) | sdk-yZQvlplybuXjYh6L |
Environment variable overrides
Several features can be toggled at runtime via environment variables, without recompiling:
| Variable | Effect |
|---|
CLAUDE_CODE_UNDERCOVER=1 | Forces Undercover Mode on — prevents internal information from appearing in commits and PRs |
CLAUDE_CODE_COORDINATOR_MODE=1 | Activates multi-agent coordinator mode |
CLAUDE_CODE_VERIFY_PLAN | Enables the VerifyPlanExecutionTool |
ANTHROPIC_API_KEY | API key (preferred over storing in settings) |
ANTHROPIC_BASE_URL | Override the API base URL for custom endpoints or proxies |
BRAVE_SEARCH_API_KEY | Enables Brave Search as the WebSearchTool backend |
# Run in coordinator mode without a feature-flag build
CLAUDE_CODE_COORDINATOR_MODE=1 claude
# Force undercover mode for a public repo session
CLAUDE_CODE_UNDERCOVER=1 claude
# Use a custom API endpoint
ANTHROPIC_BASE_URL=https://my-proxy.example.com claude
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:
// TypeScript (original)
if (feature('COORDINATOR_MODE')) {
// This entire block is eliminated from external builds
registerCoordinatorTools()
}
And via Cargo #[cfg] attributes in the Rust port:
// Rust
#[cfg(feature = "coordinator-mode")]
fn register_coordinator_tools(registry: &mut ToolRegistry) {
// Compiled in only when the feature is enabled
}
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.