Appendix C: Feature Flag Reference

Feature flags are the core mechanism for implementing compile-time dead code elimination in Claude Code. All flags are injected as boolean values by the compiler during the bundling phase: when a flag is false, the code branch it guards is removed entirely, thereby reducing artifact size and protecting unreleased features.

Type Definitions:

  • Compile-time: The flag is evaluated during the Bun bundling phase; code branches that resolve to false are completely absent from the output artifact.
  • Compile-time + Runtime Gating: The flag is true at compile time, but additional runtime conditions (such as environment variables or server-side configuration) must also be satisfied to truly activate the feature.

How to Use This Reference:

  • Navigate to the target flag using the C.1 - C.12 category sections
  • The “Impact Scope” column describes the specific capabilities enabled when the flag is activated
  • The “Dependencies” column describes prerequisite relationships between flags
  • The “Tool Enablement Conditions Reference” table in Appendix B lists the specific tools enabled by each flag and can be used for cross-referencing

C.1 Core Interaction Mode Flags

Core interaction mode flags control the primary operating modes of Claude Code. These flags define how the system interacts with users, IDEs, or other systems.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
PROACTIVECompile-timeProactive mode. When enabled, the agent can proactively offer suggestions and automatically execute background tasks during user idle periodsEnables SleepTool, proactive suggestion logic, background task triggersNo prerequisitesChapter 5
KAIROSCompile-time + Runtime GatingAssistant mode (formerly Harbor). IDE-oriented channel-based collaboration, including channel messaging, session recovery, and the complete feature setEnables channel communication, session recovery, SleepTool, SendUserFileTool, PushNotificationTool, and the full feature setNo prerequisites, though some sub-features require their own sub-flagsChapter 6
KAIROS_BRIEFCompile-timeKAIROS lightweight subset. Only enables basic capabilities such as session recovery, without the full channel functionalitySession recovery and basic interaction onlyDepends on KAIROS contextChapter 6
KAIROS_CHANNELSCompile-time + Runtime GatingChannel functionality toggle independent of the full KAIROS feature set, allowing channel messaging alone to be enabledSending, receiving, and routing of channel messagesCan be enabled independently of the full KAIROS feature setChapter 6
KAIROS_DREAMCompile-timeKAIROS Dream mode, used for loading additional skill setsLoading and registration of Dream-specific skill setsDepends on KAIROSChapter 6
KAIROS_GITHUB_WEBHOOKSCompile-timeGitHub Webhook integration. Receives GitHub event pushes in KAIROS modeSubscribePRTool, GitHub event listening and routingDepends on KAIROSChapter 6
KAIROS_PUSH_NOTIFICATIONCompile-timeKAIROS push notification capabilityNotification logic for PushNotificationToolDepends on KAIROSChapter 6
BRIDGE_MODECompile-time + Runtime GatingIDE bridge mode. When enabled, the REPL communicates with the IDE (e.g., VS Code) via a bridging protocol, supporting permission callback pipelinesIDE bidirectional communication, JWT authentication, permission callbacks, state synchronizationRequires an IDE pluginChapter 7
COORDINATOR_MODECompile-time + Runtime GatingCoordinator mode. Acts as a coordinator in multi-agent scenarios, distributing tasks and aggregating resultsAgentTool, TaskStopTool, SendMessageTool coordinator extensionsNo prerequisitesChapter 8
VOICE_MODECompile-timeVoice mode. Enables voice input/output, push-to-talk key bindings, and voice integration modulesVoice input capture, speech synthesis output, PTT key bindingsRequires microphone and speaker hardware supportChapter 12
DAEMONCompile-timeBackground daemon mode. Allows Claude Code to run long-term as a daemon processDaemon startup logic, persistent services, scheduled task frameworkNo prerequisitesChapter 11
BUDDYCompile-timeCompanion Sprite. Displays an interactive animated character in the REPL interface, providing emotional feedbackBuddy component rendering, animation state machine, interaction event handlingNo prerequisitesChapter 12

KAIROS Flag Family Relationship Diagram:

flowchart TD
    KAIROS["KAIROS<br/>Master Flag"] --> KB["KAIROS_BRIEF<br/>Lightweight Subset"]
    KAIROS --> KC["KAIROS_CHANNELS<br/>Channel Communication<br/>Can Be Enabled Independently"]
    KAIROS --> KD["KAIROS_DREAM<br/>Dream Skill Set"]
    KAIROS --> KG["KAIROS_GITHUB_WEBHOOKS<br/>GitHub Integration"]
    KAIROS --> KP["KAIROS_PUSH_NOTIFICATION<br/>Push Notifications"]

    classDef main fill:#4a90d9,stroke:#2c5f8a,color:#fff
    classDef sub fill:#7eb8da,stroke:#4a90d9,color:#fff

    class KAIROS main
    class KB,KC,KD,KG,KP sub

C.2 Agent and Subtask Flags

This group of flags controls the agent’s task decomposition, scheduling, and automated execution capabilities.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
FORK_SUBAGENTCompile-timeFork sub-agent. Allows creating independent sub-agents via a fork mechanism within a conversation to handle subtasksAgentTool fork capability, sub-agent context isolationNo prerequisitesChapter 8
AGENT_TRIGGERSCompile-timeAgent triggers. Enables scheduled task dispatch (cron) and periodic background agent executionCronCreateTool, CronDeleteTool, CronListToolDepends on DAEMON or a long-running environmentChapter 9
AGENT_TRIGGERS_REMOTECompile-timeRemote agent triggers. Supports execution of remotely hosted scheduled triggersRemoteTriggerTool, remote trigger communication protocolDepends on AGENT_TRIGGERSChapter 9
ULTRAPLANCompile-timeUltra-planning mode. Provides an interactive planning dialog that allows users to review and modify execution plans for complex tasksEnhanced planning interface for EnterPlanModeTool/ExitPlanModeV2ToolNo prerequisitesChapter 5
VERIFICATION_AGENTCompile-timeVerification agent. Automatically initiates a verification process after task completionPost-task automatic verification logic, verification result reportsNo prerequisitesChapter 8
BUILTIN_EXPLORE_PLAN_AGENTSCompile-timeBuilt-in explore-plan agents. Provides pre-installed exploration and planning sub-agentsExploreAgent, PlanAgent, and other built-in agent definitionsDepends on FORK_SUBAGENTChapter 8
AGENT_MEMORY_SNAPSHOTCompile-timeAgent memory snapshot. Supports snapshotting and restoring agent stateSnapshot creation, serialized storage, restore loading logicNo prerequisitesChapter 10
WORKFLOW_SCRIPTSCompile-timeWorkflow scripts. Enables local workflow task processors, supporting automated script orchestrationWorkflowTool, workflow script parsing and execution engineNo prerequisitesChapter 9
TEMPLATESCompile-timeTemplate system. Enables the Job Classifier for identifying and routing different types of user requestsJob Classifier, request type identification, routing dispatchNo prerequisitesChapter 9

Agent Flag Dependency Relationships:

flowchart TD
    FS["FORK_SUBAGENT"] --> BE["BUILTIN_EXPLORE_PLAN_AGENTS<br/>Requires fork capability"]
    AT["AGENT_TRIGGERS"] --> AR["AGENT_TRIGGERS_REMOTE<br/>Requires local trigger foundation"]

    classDef root fill:#4a90d9,stroke:#2c5f8a,color:#fff
    classDef child fill:#7eb8da,stroke:#4a90d9,color:#fff

    class FS,AT root
    class BE,AR child

C.3 Context Management and Compression Flags

Context management flags control how Claude Code handles the token limits of the context window. Together, these flags form a multi-layered compression strategy system, ranging from preventive lightweight compression to emergency aggressive pruning.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
REACTIVE_COMPACTCompile-time + Runtime GatingReactive compression. Automatically triggers context compression when tokens approach the threshold, rather than waiting for user confirmationAutomatic compression trigger logic, threshold detectorNo prerequisitesChapter 4
CONTEXT_COLLAPSECompile-timeContext collapse. Provides a more aggressive context reduction strategy than traditional compression, including a dedicated collapse UI and recovery mechanismCtxInspectTool, collapse UI component, content recovery logicNo prerequisitesChapter 4
CACHED_MICROCOMPACTCompile-timeCached micro-compaction. Maintains prompt cache boundaries during micro-compaction, avoiding the overhead of cache invalidationMicro-compaction cache boundary markers, cache-aware compression strategyDepends on Prompt Cache API supportChapter 4
HISTORY_SNIPCompile-timeHistory pruning (Snip Compact). Intelligently prunes processed conversation history, retaining key information while significantly reducing token usageSnipTool, history message pruning algorithmNo prerequisitesChapter 4
COMPACTION_REMINDERSCompile-timeCompression reminders. Displays reminder messages to the user during the compression processPre- and post-compression user notification UIDepends on compression operationsChapter 4
PROMPT_CACHE_BREAK_DETECTIONCompile-timePrompt cache break detection. Detects and reports prompt cache boundary breaks during compression operationsCache breakpoint detection logic, break report generationDepends on compression operationsChapter 4
TOKEN_BUDGETCompile-timeToken budget manager. Tracks and visualizes token usage budgets, providing budget overrun warningsToken usage tracking, budget warning UI, usage statisticsNo prerequisitesChapter 4
COMMIT_ATTRIBUTIONCompile-timeCommit attribution. Adds pre- and post-compression context attribution markers to code commits after compressionCompression context to commit message mapping logicDepends on compression operationsChapter 4

Compression Flag Strategy Matrix:

flowchart LR
    subgraph CompressionIntensity["Compression Intensity (Light to Heavy)"]
        direction LR
        MC["micro-compact<br/>CACHED_MICROCOMPACT<br/>Light - Cache-Friendly"] --> RC["reactive compact<br/>REACTIVE_COMPACT<br/>Medium - Auto-Triggered"]
        RC --> HS["history snip<br/>HISTORY_SNIP<br/>Medium-Heavy - Continuous Pruning"]
        HS --> CC["context collapse<br/>CONTEXT_COLLAPSE<br/>Extreme - Emergency Reduction"]
    end

    classDef light fill:#c8e6c9,stroke:#4caf50,color:#333
    classDef medium fill:#fff9c4,stroke:#fbc02d,color:#333
    classDef heavy fill:#ffccbc,stroke:#e64a19,color:#333
    classDef extreme fill:#ef5350,stroke:#b71c1c,color:#fff

    class MC light
    class RC medium
    class HS heavy
    class CC extreme
Compression StrategyCorresponding FlagCompression IntensityCache-FriendlyApplicable Scenario
micro-compactCACHED_MICROCOMPACTLightHighPreventive compression when approaching the threshold
reactive compactREACTIVE_COMPACTMediumMediumAutomatically triggered standard compression
history snipHISTORY_SNIPMedium-HeavyLowIntelligent pruning of history messages
context collapseCONTEXT_COLLAPSEExtremeLowAggressive reduction in emergency situations

Recommended Configuration: Enabling REACTIVE_COMPACT + CACHED_MICROCOMPACT + TOKEN_BUDGET together provides the best context management experience, offering both preventive protection and budget visualization.

C.4 Permission and Security Flags

Permission and security flags control the agent’s autonomous execution boundaries and security auditing capabilities. Together, these flags define the Claude Code trust model.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
TRANSCRIPT_CLASSIFIERCompile-timeTranscript classifier. Automatically determines the permission mode (including auto mode) based on conversation content, replacing purely manual permission switchingPermission mode automatic inference, auto mode decision logicNo prerequisitesChapter 3
BASH_CLASSIFIERCompile-timeBash classifier. Performs security classification on Bash commands; high-confidence safe commands can be automatically approvedBash command security assessment, read-only command auto-approvalNo prerequisitesChapter 3
HARD_FAILCompile-timeHard fail mode. Terminates directly on critical errors rather than degrading gracefullyError handling strategy, critical fault termination logicNo prerequisitesChapter 3
NATIVE_CLIENT_ATTESTATIONCompile-timeNative client attestation. Enables platform-native client identity verification mechanismsClient identity verification, platform security integrationRequires platform security framework supportChapter 3
ANTI_DISTILLATION_CCCompile-timeAnti-distillation protection. Prevents model outputs from being used for model distillation attacksOutput watermarking, distillation detection logicNo prerequisitesChapter 3

Security Flag Combination Recommendations:

Security LevelRecommended CombinationDescription
Maximum Security (Enterprise Environment)TRANSCRIPT_CLASSIFIER + BASH_CLASSIFIER + HARD_FAIL + NATIVE_CLIENT_ATTESTATION + ANTI_DISTILLATION_CCAll security features enabled
Standard SecurityTRANSCRIPT_CLASSIFIER + BASH_CLASSIFIERAutomated classification assistance, reduced manual intervention
Development DebuggingHARD_FAIL onlyQuickly surface errors for easier debugging

C.5 Tool and Skill Flags

Tool and skill flags control the extensibility of available tools in Claude Code and tool behaviors.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
MONITOR_TOOLCompile-timeMonitor tool. Provides monitoring capability when the Bash tool executes background tasksMonitorTool, background task output monitoringNo prerequisitesChapter 7
WEB_BROWSER_TOOLCompile-timeWeb browser tool. Enables the built-in browser panel, supporting web browsing and content extractionWebBrowserTool, browser panel UINo prerequisitesChapter 7
MCP_SKILLSCompile-timeMCP skill discovery. Allows dynamic discovery and loading of skills from MCP serversMCP skill discovery protocol, dynamic skill registrationDepends on MCP connectionChapter 7
EXPERIMENTAL_SKILL_SEARCHCompile-timeExperimental skill search. Enables semantic-based skill indexing and search capabilitiesSemantic skill indexing, skill search engineNo prerequisitesChapter 7
SKILL_IMPROVEMENTCompile-timeSkill improvement. Supports automatic optimization and iteration of installed skillsSkill auto-optimization logic, iterative improvement engineDepends on skill systemChapter 7
RUN_SKILL_GENERATORCompile-timeSkill generator runner. Supports dynamic generation of new skillsSkill generation tool, dynamic skill creation workflowDepends on skill systemChapter 7
BUILDING_CLAUDE_APPSCompile-timeClaude app building mode. Loads a dedicated skill set for building Claude applicationsClaude Apps dedicated skill set, application templatesDepends on skill systemChapter 7
REVIEW_ARTIFACTCompile-timeReview artifact. Loads code review-related skillsCode review skill set, review templatesDepends on skill systemChapter 7
HOOK_PROMPTSCompile-timeHook prompts. Allows hooks to inject custom prompts into the conversation flowHook prompt injection mechanism, dynamic prompt extensionDepends on hook systemChapter 9
CONNECTOR_TEXTCompile-timeConnector text blocks. Supports rendering special connector text block types within the message streamConnector text renderer, special text block typesNo prerequisitesChapter 7
UDS_INBOXCompile-timeUnix Domain Socket inbox. Receives messages from other processes via UDSListPeersTool, UDS message listenerRequires UDS system supportChapter 7
MCP_RICH_OUTPUTCompile-timeMCP rich output. Allows MCP tools to return structured rich media contentMCP output format extension, rich media renderingDepends on MCP connectionChapter 7
TREE_SITTER_BASHCompile-timeTree-sitter Bash parsing. Uses Tree-sitter for precise AST parsing of Bash commandsBash command AST parser, precise security analysisNo prerequisitesChapter 3
TREE_SITTER_BASH_SHADOWCompile-time + Runtime GatingTree-sitter Bash shadow mode. Runs Tree-sitter in parallel alongside the existing parser for result comparison and verificationParallel parsing comparison, result consistency verificationDepends on TREE_SITTER_BASHChapter 3

Skill Flag Relationship Diagram:

flowchart TD
    Skill["Skill System<br/>Foundation"] --> MCPS["MCP_SKILLS<br/>Discover Skills from MCP"]
    Skill --> ESS["EXPERIMENTAL_SKILL_SEARCH<br/>Semantic Skill Search"]
    Skill --> SI["SKILL_IMPROVEMENT<br/>Automatic Skill Optimization"]
    Skill --> RSG["RUN_SKILL_GENERATOR<br/>Dynamic Skill Generation"]
    Skill --> BCA["BUILDING_CLAUDE_APPS<br/>Claude Apps Dedicated Skills"]
    Skill --> RA["REVIEW_ARTIFACT<br/>Review Dedicated Skills"]

    classDef root fill:#4a90d9,stroke:#2c5f8a,color:#fff
    classDef sub fill:#7eb8da,stroke:#4a90d9,color:#fff

    class Skill root
    class MCPS,ESS,SI,RSG,BCA,RA sub

C.6 Session and Persistence Flags

Session and persistence flags control the lifecycle management and state persistence capabilities of Claude Code sessions.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
BG_SESSIONSCompile-timeBackground sessions. Supports maintaining independent session instances in the background, allowing long-running tasks to execute detached from the foregroundBackground session manager, session serialization and recoveryNo prerequisitesChapter 11
AWAY_SUMMARYCompile-timeAway summary. Automatically generates a conversation summary covering the period when the user was away, displayed upon their returnAway detection, summary generation, return displayDepends on session persistenceChapter 11
FILE_PERSISTENCECompile-timeFile persistence. Enables session-level file persistence trackingFile change tracking, state consistency during session recoveryNo prerequisitesChapter 11
NEW_INITCompile-timeNew initialization flow. Uses an improved session initialization logicSession initialization flow, startup optimizationNo prerequisitesChapter 11

Recommended Configuration: For scenarios requiring long-running tasks, it is recommended to enable BG_SESSIONS + AWAY_SUMMARY + FILE_PERSISTENCE together to ensure tasks can reliably execute in the background and seamlessly resume when the user returns.

C.7 Memory and Knowledge Management Flags

Memory and knowledge management flags control Claude Code’s cross-session knowledge storage, retrieval, and sharing capabilities.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
TEAMMEMCompile-time + Runtime GatingTeam memory. Enables a team-level shared memory file system, supporting read/write and synchronization of a team knowledge baseTeam memory file read/write, knowledge base synchronization mechanismNo prerequisitesChapter 10
EXTRACT_MEMORIESCompile-timeMemory extraction. Automatically extracts reusable knowledge fragments from conversations at session end and writes them to memory filesAutomatic knowledge extraction, memory file writingDepends on memory systemChapter 10
LODESTONECompile-timeLodestone. Enables enhanced memory retrieval and matching mechanismsMemory relevance scoring, enhanced retrieval algorithmDepends on memory systemChapter 10
MEMORY_SHAPE_TELEMETRYCompile-timeMemory shape telemetry. Collects anonymous telemetry data on memory file shape and usage patternsMemory file statistical analysis, anonymous telemetry reportingDepends on memory systemChapter 10

Memory Flag Enhancement Path: Enabling LODESTONE improves the relevance accuracy of memory retrieval; combined with EXTRACT_MEMORIES, knowledge can be automatically distilled from conversations. In a team environment, additionally enabling TEAMMEM enables team-level knowledge sharing.

C.8 Remote and Connectivity Flags

Remote and connectivity flags control Claude Code’s connectivity capabilities across different network environments and deployment scenarios.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
SSH_REMOTECompile-timeSSH remote mode. Supports connecting to remote machines via SSH to run Claude CodeSSH connection management, remote environment adaptationRequires SSH infrastructureChapter 11
DIRECT_CONNECTCompile-timeDirect connect mode. Supports bypassing proxies to connect directly to the Anthropic APIProxy bypass logic, direct connection network configurationNo prerequisitesChapter 11
CHICAGO_MCPCompile-timeChicago MCP. Enables a specific MCP server configuration and Computer Use integrationComputer Use toolset, dedicated MCP configurationDepends on MCP integrationChapter 7
CCR_AUTO_CONNECTCompile-timeCCR auto-connect. Automatically establishes a connection to the CCR (Claude Code Remote) serviceCCR service auto-discovery, connection establishmentDepends on CCR serviceChapter 11
CCR_MIRRORCompile-timeCCR mirror. Supports bidirectional mirroring of session state between local and remoteSession state bidirectional synchronization, conflict resolutionDepends on CCR serviceChapter 11
CCR_REMOTE_SETUPCompile-timeCCR remote setup. Enables a one-click remote environment configuration flowRemote environment auto-configuration, dependency installationDepends on CCR serviceChapter 11
SELF_HOSTED_RUNNERCompile-timeSelf-hosted runner. Supports running agents on self-hosted infrastructureSelf-hosted execution environment, infrastructure adaptationNo prerequisitesChapter 11
BYOC_ENVIRONMENT_RUNNERCompile-timeBYOC environment runner. Supports agent execution in “Bring Your Own Cloud” environmentsBYOC environment integration, multi-cloud adaptationNo prerequisitesChapter 11

Remote Deployment Scenarios and Flag Combinations:

Deployment ScenarioRecommended Flag Combination
Local developmentNo remote flags needed
SSH remote developmentSSH_REMOTE
CCR cloud developmentCCR_AUTO_CONNECT + CCR_MIRROR + CCR_REMOTE_SETUP
Self-hosted serverSELF_HOSTED_RUNNER + DIRECT_CONNECT
BYOC enterprise environmentBYOC_ENVIRONMENT_RUNNER + DIRECT_CONNECT

C.9 UI and Interface Flags

UI and interface flags control the visual presentation and interaction capabilities of the Claude Code terminal interface.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
MESSAGE_ACTIONSCompile-time + Runtime GatingMessage actions. Enables contextual action buttons on messages (e.g., copy, regenerate, etc.)Message action button UI, context menusNo prerequisitesChapter 12
TERMINAL_PANELCompile-time + Runtime GatingTerminal panel. Enables an independent terminal panel in full-screen layout (shortcut Meta+J)TerminalCaptureTool, terminal panel component, full-screen layoutDepends on full-screen terminal environmentChapter 12
QUICK_SEARCHCompile-timeQuick search. Enables in-conversation quick search functionalitySearch UI, conversation content indexingNo prerequisitesChapter 12
HISTORY_PICKERCompile-timeHistory picker. Provides a visual conversation history browsing and switching interfaceHistory browsing UI, session switcherNo prerequisitesChapter 12
AUTO_THEMECompile-time + Runtime GatingAuto theme. Automatically switches between light and dark themes based on system preferencesTheme detection, auto-switching logicRequires system theme API supportChapter 12
STREAMLINED_OUTPUTCompile-timeStreamlined output. Reduces redundant visual elements in the interface, providing a more compact output styleCompact output rendering, visual element reductionNo prerequisitesChapter 12
NATIVE_CLIPBOARD_IMAGECompile-timeNative clipboard image. Supports pasting images directly from the system clipboard into conversationsClipboard image reading, image format conversionRequires platform clipboard API supportChapter 12

C.10 Settings Synchronization Flags

Settings synchronization flags control the bidirectional synchronization of user configurations between local and cloud storage.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
UPLOAD_USER_SETTINGSCompile-timeUpload user settings. Syncs local user settings to the cloudLocal-to-cloud configuration upload, conflict detectionRequires cloud serviceChapter 10
DOWNLOAD_USER_SETTINGSCompile-time + Runtime GatingDownload user settings. Pulls and applies user settings from the cloud to the local environmentCloud-to-local configuration download, configuration mergingDepends on UPLOAD_USER_SETTINGSChapter 10

Note: Settings synchronization typically requires both flags to be enabled together for complete bidirectional sync. UPLOAD_USER_SETTINGS is responsible for pushing local changes to the cloud, while DOWNLOAD_USER_SETTINGS is responsible for pulling existing configurations in a new environment.

C.11 Telemetry and Diagnostic Flags

Telemetry and diagnostic flags control Claude Code’s runtime data collection, performance profiling, and debugging capabilities. These flags are primarily used for internal quality assurance and performance optimization.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
COWORKER_TYPE_TELEMETRYCompile-timeCoworker type telemetry. Collects and reports type information about coworkers (e.g., IDE, terminal)Collaboration environment detection, anonymous type reportingNo prerequisitesChapter 13
ENHANCED_TELEMETRY_BETACompile-timeEnhanced telemetry Beta. Enables extended anonymous usage telemetry data collectionExtended telemetry data collection, anonymous statisticsNo prerequisitesChapter 13
PERFETTO_TRACINGCompile-timePerfetto tracing. Integrates the Chrome Perfetto tracing framework for performance profiling and timeline visualizationPerfetto tracing integration, performance data exportNo prerequisitesChapter 13
SHOT_STATSCompile-timeShot statistics. Collects and displays detailed statistics for each API callAPI call statistics, latency analysisNo prerequisitesChapter 13
SLOW_OPERATION_LOGGINGCompile-timeSlow operation logging. Records operations whose execution time exceeds a threshold to assist with performance diagnosticsSlow operation detection, threshold alerts, performance loggingNo prerequisitesChapter 13
ABLATION_BASELINECompile-timeAblation baseline. Serves as the baseline control group in A/B experiments for evaluating the impact of new featuresA/B experiment framework, baseline data collectionNo prerequisitesChapter 13

Diagnostic Flag Combination Recommendations:

Diagnostic PurposeRecommended Combination
Performance profilingPERFETTO_TRACING + SHOT_STATS + SLOW_OPERATION_LOGGING
Usage statisticsCOWORKER_TYPE_TELEMETRY + ENHANCED_TELEMETRY_BETA
A/B experimentsABLATION_BASELINE + target flags to be tested

C.12 Infrastructure and Build Flags

Infrastructure and build flags control low-level technical behavior and build configuration. These flags typically do not require direct user attention, but are important in specific deployment and debugging scenarios.

Feature FlagTypeDescriptionImpact ScopeDependenciesRelated Chapter
UNATTENDED_RETRYCompile-timeUnattended retry. Automatically retries on API call failures without user interventionAPI retry logic, backoff strategy, maximum retry countNo prerequisitesChapter 13
IS_LIBC_GLIBCCompile-timeDetects whether the target platform’s libc is the glibc implementation, used for binary compatibility determinationCompatibility selection during binary distributionNo prerequisitesAppendix
IS_LIBC_MUSLCompile-timeDetects whether the target platform’s libc is the musl implementation (e.g., Alpine Linux), used for binary compatibility determinationCompatibility selection during binary distributionNo prerequisitesAppendix
POWERSHELL_AUTO_MODECompile-timePowerShell auto mode. Provides dedicated automated permission configuration for Windows PowerShell environmentsPowerShell environment permission auto-configurationWindows environments onlyAppendix
ALLOW_TEST_VERSIONSCompile-timeAllow test versions. Accepts pre-release/test version numbers during version checksVersion check logic, pre-release version acceptanceNo prerequisitesAppendix
SKIP_DETECTION_WHEN_AUTOUPDATES_DISABLEDCompile-timeSkip detection when auto-updates are disabled. When auto-updates have been explicitly disabled, skips version detection logic to reduce startup latencyVersion detection skip, startup optimizationNo prerequisitesAppendix
DUMP_SYSTEM_PROMPTCompile-timeDump system prompt. When enabled, outputs the complete system prompt to a log or file for debugging purposesSystem prompt export, debug loggingNo prerequisitesAppendix
OVERFLOW_TEST_TOOLCompile-timeOverflow test tool. Provides a dedicated test tool for verifying context overflow handling logicOverflowTestTool, overflow scenario simulationTesting environments onlyAppendix
ULTRATHINKCompile-timeDeep thinking mode. Enables Extended Thinking capabilityExtended Thinking API calls, thinking token processingNo prerequisitesChapter 5
TORCHCompile-timeTorch mode. Experimental enhanced reasoning capabilityEnhanced reasoning engine, experimental reasoning strategiesNo prerequisitesChapter 5

Debugging Tip: When troubleshooting abnormal system behavior, DUMP_SYSTEM_PROMPT is one of the most effective diagnostic tools available. It can export the complete system prompt sent to the model, making it easy to inspect whether instructions are assembled correctly.


C.13 Flag Usage Statistics

CategoryCount
Core Interaction Modes12
Agent and Subtasks9
Context Management and Compression8
Permission and Security5
Tools and Skills14
Session and Persistence4
Memory and Knowledge Management4
Remote and Connectivity8
UI and Interface7
Settings Synchronization2
Telemetry and Diagnostics6
Infrastructure and Build10
Total89

Note: The flag list above is compiled from system architecture analysis and may change with version iterations. The specific activation method for each feature flag is determined by the build configuration, and some flags also require runtime gating conditions (such as specific activation detection functions) to truly activate the corresponding features.


C.14 Common Configuration Scenario Recommendations

The following lists several typical usage scenarios and their recommended feature flag combinations to help readers configure based on their actual needs:

flowchart TD
    Start{"Choose Your Scenario"}
    Start -->|Daily Development| S1["Scenario 1: Standard Mode<br/>BASH_CLASSIFIER<br/>TRANSCRIPT_CLASSIFIER<br/>REACTIVE_COMPACT<br/>TOKEN_BUDGET"]
    Start -->|IDE Collaboration| S2["Scenario 2: IDE Integration<br/>BRIDGE_MODE<br/>KAIROS + KAIROS_CHANNELS<br/>BASH_CLASSIFIER<br/>REACTIVE_COMPACT"]
    Start -->|Multi-Agent| S3["Scenario 3: Multi-Agent Collaboration<br/>COORDINATOR_MODE<br/>FORK_SUBAGENT<br/>BUILTIN_EXPLORE_PLAN_AGENTS<br/>VERIFICATION_AGENT"]
    Start -->|CI/CD| S4["Scenario 4: Automated CI/CD<br/>DAEMON<br/>AGENT_TRIGGERS<br/>UNATTENDED_RETRY<br/>HARD_FAIL"]
    Start -->|Enterprise Security| S5["Scenario 5: Security Audit<br/>HARD_FAIL<br/>TRANSCRIPT_CLASSIFIER<br/>BASH_CLASSIFIER<br/>NATIVE_CLIENT_ATTESTATION"]
    Start -->|Performance Tuning| S6["Scenario 6: Performance Debugging<br/>PERFETTO_TRACING<br/>SHOT_STATS<br/>SLOW_OPERATION_LOGGING<br/>DUMP_SYSTEM_PROMPT"]

    classDef decision fill:#ffeb3b,stroke:#f9a825,color:#333
    classDef scene fill:#4a90d9,stroke:#2c5f8a,color:#fff

    class Start decision
    class S1,S2,S3,S4,S5,S6 scene

Scenario 1: Daily Development (Standard Mode)

Suitable for everyday use by most developers, providing a balanced set of features and security.

Core Flags: BASH_CLASSIFIER + TRANSCRIPT_CLASSIFIER + REACTIVE_COMPACT + TOKEN_BUDGET

Scenario 2: IDE Integration Development

Suitable for scenarios where Claude Code is used via plugins in VS Code or JetBrains.

Core Flags: BRIDGE_MODE + KAIROS + KAIROS_CHANNELS + BASH_CLASSIFIER + REACTIVE_COMPACT

Scenario 3: Multi-Agent Collaboration

Suitable for complex scenarios requiring task distribution and coordination among multiple agents.

Core Flags: COORDINATOR_MODE + FORK_SUBAGENT + BUILTIN_EXPLORE_PLAN_AGENTS + VERIFICATION_AGENT + AGENT_MEMORY_SNAPSHOT

Scenario 4: Automated CI/CD Integration

Suitable for unattended execution in CI/CD pipelines.

Core Flags: DAEMON + AGENT_TRIGGERS + UNATTENDED_RETRY + HARD_FAIL + WORKFLOW_SCRIPTS

Scenario 5: Security Audit Mode

Suitable for enterprise environments with stringent security requirements.

Core Flags: HARD_FAIL + TRANSCRIPT_CLASSIFIER + BASH_CLASSIFIER + NATIVE_CLIENT_ATTESTATION + ANTI_DISTILLATION_CC + ULTRAPLAN

Scenario 6: Performance Debugging and Optimization

Suitable for troubleshooting performance issues or optimizing system behavior.

Core Flags: PERFETTO_TRACING + SHOT_STATS + SLOW_OPERATION_LOGGING + DUMP_SYSTEM_PROMPT + PROMPT_CACHE_BREAK_DETECTION


C.15 Global Flag Dependency Relationship Diagram

The following diagram illustrates the primary dependency relationships and grouping structure among feature flags:

flowchart TD
    subgraph InteractionModeLayer["Interaction Mode Layer"]
        PROACTIVE
        KAIROS --> KAIROS_BRIEF
        KAIROS --> KAIROS_CHANNELS
        KAIROS --> KAIROS_DREAM
        KAIROS --> KAIROS_GITHUB_WEBHOOKS
        KAIROS --> KAIROS_PUSH_NOTIFICATION
        BRIDGE_MODE
        COORDINATOR_MODE
        VOICE_MODE
        DAEMON
        BUDDY
    end

    subgraph AgentLayer["Agent Layer"]
        FORK_SUBAGENT --> BUILTIN_EXPLORE_PLAN_AGENTS
        AGENT_TRIGGERS --> AGENT_TRIGGERS_REMOTE
        ULTRAPLAN
        VERIFICATION_AGENT
        AGENT_MEMORY_SNAPSHOT
        WORKFLOW_SCRIPTS
        TEMPLATES
    end

    subgraph ContextManagementLayer["Context Management Layer"]
        REACTIVE_COMPACT
        CONTEXT_COLLAPSE
        CACHED_MICROCOMPACT
        HISTORY_SNIP
        COMPACTION_REMINDERS
        PROMPT_CACHE_BREAK_DETECTION
        TOKEN_BUDGET
        COMMIT_ATTRIBUTION
    end

    subgraph SecurityLayer["Security Layer"]
        TRANSCRIPT_CLASSIFIER
        BASH_CLASSIFIER
        HARD_FAIL
        NATIVE_CLIENT_ATTESTATION
        ANTI_DISTILLATION_CC
    end

    subgraph ToolAndSkillLayer["Tool and Skill Layer"]
        TREE_SITTER_BASH --> TREE_SITTER_BASH_SHADOW
        MONITOR_TOOL
        WEB_BROWSER_TOOL
        MCP_SKILLS
        MCP_RICH_OUTPUT
        SkillSystem["Skill System"] --> EXPERIMENTAL_SKILL_SEARCH
        SkillSystem --> SKILL_IMPROVEMENT
        SkillSystem --> RUN_SKILL_GENERATOR
        SkillSystem --> BUILDING_CLAUDE_APPS
        SkillSystem --> REVIEW_ARTIFACT
        HOOK_PROMPTS
        CONNECTOR_TEXT
        UDS_INBOX
    end

    subgraph RemoteAndConnectivityLayer["Remote and Connectivity Layer"]
        SSH_REMOTE
        DIRECT_CONNECT
        CCR_AUTO_CONNECT --> CCR_MIRROR
        CCR_REMOTE_SETUP
        SELF_HOSTED_RUNNER
        BYOC_ENVIRONMENT_RUNNER
    end

    subgraph InfrastructureLayer["Infrastructure Layer"]
        UNATTENDED_RETRY
        ULTRATHINK
        TORCH
        IS_LIBC_GLIBC
        IS_LIBC_MUSL
        POWERSHELL_AUTO_MODE
        DUMP_SYSTEM_PROMPT
    end

    classDef layer1 fill:#4a90d9,stroke:#2c5f8a,color:#fff
    classDef layer2 fill:#8fbc8f,stroke:#5a8a5a,color:#fff
    classDef layer3 fill:#ff9800,stroke:#e65100,color:#fff
    classDef layer4 fill:#ef5350,stroke:#c62828,color:#fff
    classDef layer5 fill:#ce93d8,stroke:#7b1fa2,color:#fff
    classDef layer6 fill:#7eb8da,stroke:#4a90d9,color:#fff
    classDef layer7 fill:#a0a0a0,stroke:#666,color:#fff

    class PROACTIVE,KAIROS,KAIROS_BRIEF,KAIROS_CHANNELS,KAIROS_DREAM,KAIROS_GITHUB_WEBHOOKS,KAIROS_PUSH_NOTIFICATION,BRIDGE_MODE,COORDINATOR_MODE,VOICE_MODE,DAEMON,BUDDY layer1
    class FORK_SUBAGENT,BUILTIN_EXPLORE_PLAN_AGENTS,AGENT_TRIGGERS,AGENT_TRIGGERS_REMOTE,ULTRAPLAN,VERIFICATION_AGENT,AGENT_MEMORY_SNAPSHOT,WORKFLOW_SCRIPTS,TEMPLATES layer2
    class REACTIVE_COMPACT,CONTEXT_COLLAPSE,CACHED_MICROCOMPACT,HISTORY_SNIP,COMPACTION_REMINDERS,PROMPT_CACHE_BREAK_DETECTION,TOKEN_BUDGET,COMMIT_ATTRIBUTION layer3
    class TRANSCRIPT_CLASSIFIER,BASH_CLASSIFIER,HARD_FAIL,NATIVE_CLIENT_ATTESTATION,ANTI_DISTILLATION_CC layer4
    class TREE_SITTER_BASH,TREE_SITTER_BASH_SHADOW,MONITOR_TOOL,WEB_BROWSER_TOOL,MCP_SKILLS,MCP_RICH_OUTPUT,EXPERIMENTAL_SKILL_SEARCH,SKILL_IMPROVEMENT,RUN_SKILL_GENERATOR,BUILDING_CLAUDE_APPS,REVIEW_ARTIFACT,HOOK_PROMPTS,CONNECTOR_TEXT,UDS_INBOX layer5
    class SSH_REMOTE,DIRECT_CONNECT,CCR_AUTO_CONNECT,CCR_MIRROR,CCR_REMOTE_SETUP,SELF_HOSTED_RUNNER,BYOC_ENVIRONMENT_RUNNER layer6
    class UNATTENDED_RETRY,ULTRATHINK,TORCH,IS_LIBC_GLIBC,IS_LIBC_MUSL,POWERSHELL_AUTO_MODE,DUMP_SYSTEM_PROMPT layer7