|
A systematic reverse engineering analysis of both the native macOS binary and the npm package, uncovering undocumented systems, feature flags, environment variables, and hidden capabilities.
01
Undocumented subsystems discovered inside the Claude Code binary. These are fully-implemented features gated behind server-side flags.
Fail-closed safety for auto-mode. Blocks actions when classifier unavailable.
Idle detection. After 75 min + 100K tokens, shows dialog/hint.
Auto-brief + cron scheduling subsystem.
2-stage LLM (fast + thinking) decides permissions. Temperature=0, 4096 max tokens.
Background memory consolidation on idle. PID-locked.
"Penguin mode" state machine. Tracks cooldown with resetAt/reason.
Multi-agent collaboration via AsyncLocalStorage.
Session bundling/transfer between local CLI and cloud.
Remote multi-agent planning. 10-30 min Opus planning on web.
Cross-session persistent memory (separate from CLAUDE.md).
MCP channel push notifications with allowlists.
02
30 beta header strings sent with API requests. These unlock experimental API capabilities.
claude-code-20250219Activeinterleaved-thinking-2025-05-14Activecontext-1m-2025-08-07Activecontext-management-2025-06-27Activeoauth-2025-04-20Activeredact-thinking-2026-02-12Activestructured-outputs-2025-12-15Activeweb-search-2025-03-05Activeprompt-caching-scope-2026-01-05Activeeffort-2025-11-24Activetask-budgets-2026-03-13Activefast-mode-2026-02-01Activeafk-mode-2026-01-31Activeadvisor-tool-2026-03-01Activeadvanced-tool-use-2025-11-20Activetool-search-tool-2025-10-19Activebedrock-2023-05-31SDKvertex-2023-10-16SDKccr-byoc-2025-07-29SDKccr-triggers-2026-01-30SDKenvironments-2025-11-01SDKmcp-servers-2025-12-04SDKfiles-api-2025-04-14SDKmessage-batches-2024-09-24SDKtoken-counting-2024-11-01SDKskills-2025-10-02SDKexperiment-v2Docscompact-2026-01-12Docsstructured-outputs-2025-11-13Docsmcp-client-2025-11-20Docs03
Slash commands that exist in the codebase but are hidden, flag-gated, or hardcoded disabled.
/ultraplanRemote multi-agent planning
/filesContext file listing
/bridge-kickDebug bridge restart
/versionShow version info
/tagSession tagging
/think-backYear in Review
/thinkback-playAnimated review playback
/web-setupGitHub connection setup
/scheduleCron-based agent scheduling
/stickersOrder physical stickers!
/dreamManual memory consolidation
/add-dir/agent-teams/allowed-tools/api-docs/api-key/bridge-kick/bug/clear/compact/config/configure-mcp/cost/debug/diff/doctor/dream/dump/edit/explain/files/fix/forget/help/hooks/ide/ignore/init/install/kick/listen/login/logout/logs/ls/mcp/memory/model/new/notebook/open/outline/patch/permissions/plan/pr/profile/project/quit/read/refresh/release/review/run/schedule/search/send/settings/setup/share/shortcut/skill/spawn/status/stickers/summary/tag/task/terminal/think-back/thinkback-play/think/ultraplan/undo/version/vim/web-setup/worktree04
All 79 tengu_* flags extracted from cli.js. Prefixed with "tengu_" -- Anthropic's internal Statsig flag namespace.
tengu_iron_gate_closedHOTFail-closed safety when auto-mode classifier is unavailable
tengu_penguins_offHOTServer-side kill switch for fast mode with custom reason message
tengu_willow_modeHOTIdle session return behavior (dialog/hint after inactivity)
tengu_auto_background_agentsHOTEnables automatic background task spawning with 2min timeout
tengu_session_memoryHOTPersistent memory file across a session, survives compacts
tengu_kairos_briefHOTGates Brief tool and brief-only output mode
tengu_kairos_cronHOTGates cron/scheduled tasks and /loop command
tengu_onyx_ploverHOTAuto-dream background memory consolidation config
tengu_ultraplan_modelHOTWhich model to use for ultraplan generation
tengu_auto_mode_configHOTMaster config for Auto Mode: enabled state, model, classifier, allowModels
tengu_sage_compassHOTConfigures Advisor tool: enabled, model, canUserConfigure
tengu_amber_flintGates Agent Teams (multi-agent swarm) feature
tengu_amber_prismAppends correction preference instructions to system prompt
tengu_amber_quartz_disabledKill switch for Remote Control (CCR bridge) feature
tengu_amber_wrenConfigures file read size limits and token caps for tool output
tengu_attribution_headerControls whether attribution header is sent with API requests
tengu_bramble_lintelMin conversation turns before memory extraction triggers
tengu_bridge_system_initSends system/init message to Remote Control bridge on connect
tengu_ccr_bridgeMaster gate for Remote Control (CCR) bridge feature
tengu_chomp_inflectionEnables prompt suggestions feature (inline suggestions after input)
tengu_chrome_auto_enableAuto-enables Claude-in-Chrome MCP integration
tengu_cicada_nap_msCooldown period (ms) for startup prefetch operations
tengu_cobalt_frostEnables Nova 3 speech-to-text engine for voice streaming
tengu_cobalt_lanternEnables GitHub token sync and /web-setup for Remote Control
tengu_collage_kaleidoscopeUses native C module for clipboard image detection on macOS
tengu_compact_cache_prefixCache-sharing optimization for compact/summarization
tengu_compact_streaming_retryRetry logic with exponential backoff for streaming compact failures
tengu_copper_bridgeControls WebSocket bridge URL for Chrome MCP communication
tengu_coral_fernAdds 'Searching past context' instructions to system prompt
tengu_destructive_command_warningInline warnings for destructive shell commands (git reset, rm -rf)
tengu_disable_streaming_to_non_streaming_fallbackDisables fallback from streaming to non-streaming on error
tengu_fgtsFine-grained tool streaming (eager input streaming)
tengu_grey_woolLegacy model name remapping to current equivalents
tengu_harborMaster gate for Channels (plugins/extensions marketplace)
tengu_harbor_permissionsEnables permissions system for harbor/channels plugins
tengu_hawthorn_steepleTool output deduplication/replacement in messages
tengu_hawthorn_windowToken window size for tool output dedup (default 200K)
tengu_herring_clockTeam memory directory functionality (shared org memory)
tengu_immediate_model_commandMakes /model command execute immediately without picker UI
tengu_jade_anvil_4Reorders rate-limit menu to nudge toward paid options
tengu_kairos_cron_configConfiguration for cron/durable scheduled task subsystem
tengu_keybinding_customization_releaseEnables custom keybinding support in configuration
tengu_lapis_finchAuto plugin hint recommendations based on tool usage
tengu_lodestone_enabledAuto-registers claude-cli:// deep link protocol handler
tengu_marble_sandcastleRestricts fast mode to native binary (Bun) build only
tengu_miraculo_the_bardControls fast mode prefetch strategy (sync vs async)
tengu_moth_copseFilters memory messages from extraction prompts (anti-recursion)
tengu_paper_halyardFilters Project/Local CLAUDE.md from system prompt
tengu_passport_quailEnables memory extraction in non-interactive/SDK sessions
tengu_permission_explainerAI-generated risk explanations for tool permission prompts
tengu_pewter_ledgerPlan mode output style: trim/cut/cap verbosity levels
tengu_pid_based_version_lockingPID-based version file locking for concurrent instances
tengu_plan_mode_interview_phaseInterview/clarification phase before plan generation
tengu_plugin_official_mkt_git_fallbackGit clone fallback when GCS marketplace fetch fails
tengu_plum_vx3Lightweight model with disabled thinking for web search
tengu_quiet_fernGate value forwarded to VSCode extension experiments
tengu_quiet_hollowRedact-thinking API beta to hide thinking from responses
tengu_remote_backendRemote backend session mode with interactive REPL
tengu_satin_quollPer-tool output token limits and MCP tool output caps
tengu_slate_heronAuto tool output trimming based on session time gaps
tengu_slate_prismAgent progress summaries in SDK sessions
tengu_slate_thimbleAllows memory extraction in fully headless/SDK mode
tengu_slim_subagent_claudemdStrips CLAUDE.md from subagent prompts to reduce size
tengu_sm_compactSession-memory-aware compaction strategy
tengu_surreal_daliRemote Trigger (scheduled remote agent) and /schedule command
tengu_system_prompt_global_cacheGlobal cache control on system prompt for API cache hits
tengu_tern_alloySubagent fanout nudge prompt suggestion copy variant
tengu_thinkbackEnables /think-back and /thinkback-play Year in Review
tengu_tide_elmEffort-high nudge prompt suggestion copy variant
tengu_timber_lark/loop command nudge prompt suggestion copy variant
tengu_tool_pearDeferred tool loading and tool input schema stripping
tengu_tool_search_unsupported_modelsModel patterns that don't support tool search/deferred loading
tengu_trace_lanternDetailed beta tracing for diagnostics/debugging
tengu_turtle_carbonMaster gate for ultrathink/ultraplan extended thinking
tengu_vscode_cc_authGate for VSCode Claude Code authentication features
tengu_vscode_onboardingVSCode extension onboarding configuration
tengu_vscode_review_upsellVSCode extension review/upsell configuration
tengu_cobalt_frost_2Extended Nova 3 STT configuration variant
tengu_pebble_leaf_pruneSmarter pruning of orphaned transcript message branches
05
All 118 settings across 12 categories. Scoped to user (~/.claude/settings.json), project (.claude/settings.json), managed (enterprise), or local (.claude/settings.local.json).
modelDefault model for conversations
availableModelsList of models available in model picker
modelOverridesOverride model for specific contexts (subagent, compact, etc.)
advisorModelStronger model used by the Advisor tool for review
effortLevelThinking effort level: low, medium, high, or max
alwaysThinkingEnabledForce extended thinking on every request
fastModeEnable fast mode for quicker, lighter responses
fastModePerSessionOptInRequire per-session opt-in for fast mode
agentAgent behavior configuration (max turns, model, etc.)
permissions.allowAllowlist of tools/commands that run without asking
permissions.denyBlocklist of tools/commands that are always denied
permissions.askTools/commands that always require confirmation
permissions.defaultModeDefault permission mode: ask, auto, or deny
permissions.disableBypassPermissionsModePrevent users from using --dangerously-skip-permissions
permissions.disableAutoModePrevent auto-mode from being enabled
permissions.additionalDirectoriesExtra directories the agent can access beyond CWD
allowManagedPermissionRulesOnlyOnly allow permission rules from managed config
sandbox.enabledEnable sandboxed command execution
sandbox.failIfUnavailableFail if sandbox cannot be created (vs falling back)
sandbox.autoAllowBashIfSandboxedAuto-allow bash commands when sandboxed
sandbox.network.allowedDomainsDomains the sandbox can reach
sandbox.network.allowManagedDomainsOnlyOnly allow domains from managed config
sandbox.network.allowUnixSocketsSpecific Unix socket paths to allow
sandbox.network.allowAllUnixSocketsAllow all Unix socket connections
sandbox.network.allowLocalBindingAllow binding to localhost ports
sandbox.filesystem.allowWritePaths the sandbox can write to
sandbox.filesystem.denyWritePaths the sandbox cannot write to
outputStyleOutput formatting style: streaming, markdown, or plain
languageUI language / locale override
syntaxHighlightingDisabledDisable syntax highlighting in code blocks
spinnerTipsEnabledShow tips in the loading spinner
spinnerVerbsCustom verbs for the loading spinner animation
statusLineConfigure the status line display format
defaultViewDefault view mode on startup
voiceEnabledEnable voice input/output
prefersReducedMotionReduce animations and transitions
showThinkingSummariesShow AI thinking block summaries in output
terminalTitleFromRenameUpdate terminal title from /rename command
promptSuggestionEnabledEnable inline prompt suggestions after input
autoMemoryEnabledAutomatically extract and store memories from conversations
autoMemoryDirectoryDirectory for auto-extracted memory files
autoDreamEnabledBackground memory consolidation when idle
claudeMdExcludesGlob patterns to exclude from CLAUDE.md discovery
cleanupPeriodDaysDays before old sessions/logs are cleaned up
plansDirectoryDirectory for storing generated plans
enableAllProjectMcpServersAuto-enable all MCP servers defined in project config
enabledPluginsList of enabled marketplace plugins
pluginConfigsPer-plugin configuration objects
extraKnownMarketplacesAdditional marketplace URLs beyond the default
strictKnownMarketplacesOnly allow plugins from known marketplaces
channelsEnabledEnable the channels/extensions system
enabledMcpjsonServersMCP servers enabled from .mcp.json files
disabledMcpjsonServersMCP servers disabled from .mcp.json files
allowedMcpServersAllowlist of MCP server names that can run
deniedMcpServersBlocklist of MCP server names that are denied
attributionEnable attribution comments on generated code
prPR creation defaults (title prefix, label, etc.)
includeCoAuthoredByAdd Co-Authored-By line to git commits
includeGitInstructionsInclude git context instructions in system prompt
worktree.symlinkPathsSymlink paths to resolve in git worktree setups
hooksDefine pre/post hooks for tool execution events
disableAllHooksGlobally disable all hook execution
allowManagedHooksOnlyOnly allow hooks from managed configuration
allowedHttpHookUrlsAllowlist of URLs for HTTP hooks
httpHookAllowedEnvVarsEnv vars that HTTP hooks can access
apiKeyHelperExternal command to fetch API key dynamically
awsCredentialExportAWS credential export configuration for Bedrock
gcpAuthRefreshGCP auth refresh command for Vertex AI
forceLoginMethodForce a specific login method (oauth, api-key, etc.)
forceLoginOrgUUIDForce login to a specific organization UUID
sshConfigsSSH configuration for remote sessions
companyAnnouncementsDisplay company-wide announcements in the UI
pluginTrustMessageCustom trust message shown when enabling plugins
envExtra environment variables injected into shell sessions
respectGitignoreRespect .gitignore patterns in file operations
remoteRemote session configuration (URL, auth, etc.)
skipWebFetchPreflightSkip preflight checks before web fetch operations
fileSuggestionEnable file path suggestions in input
$schemaJSON Schema URL for config file validation
skipAutoPermissionPromptSkip the auto-mode permission confirmation prompt
useAutoModeDuringPlanUse auto-mode for planning phase tool calls
autoMode.allowTools/commands auto-mode can run without asking
autoMode.soft_denyTools auto-mode should avoid but can override
autoMode.environmentEnvironment config for auto-mode execution context
autoUpdatesChannelUpdate channel: stable, beta, or nightly
minimumVersionMinimum required version (forces update if older)
disableDeepLinkRegistrationPrevent auto-registration of claude-cli:// protocol
06
70 of the 280 discovered environment variables. Runtime overrides for Claude Code internals.
ANTHROPIC_MODELOverride the default model
ANTHROPIC_SMALL_FAST_MODELOverride the small/fast model for quick tasks
ANTHROPIC_BETASComma-separated beta flags to send with API requests
ANTHROPIC_DEFAULT_OPUS_MODELOverride the default Opus model identifier
ANTHROPIC_DEFAULT_SONNET_MODELOverride the default Sonnet model identifier
ANTHROPIC_DEFAULT_HAIKU_MODELOverride the default Haiku model identifier
ANTHROPIC_CUSTOM_MODEL_OPTIONAdd a custom model to the model picker
MAX_THINKING_TOKENSOverride max thinking budget
CLAUDE_CODE_MAX_OUTPUT_TOKENSOverride max output tokens
CLAUDE_CODE_EFFORT_LEVELSet thinking effort (low/medium/high)
CLAUDE_CODE_SUBAGENT_MODELModel for subagent spawning
ANTHROPIC_API_KEYAPI key for Anthropic API access
CLAUDE_CODE_OAUTH_TOKENOAuth token for Claude Code authentication
CLAUDE_CODE_API_KEY_FILE_DESCRIPTORFile descriptor to read API key from
CLAUDE_CODE_CUSTOM_OAUTH_URLCustom OAuth provider URL
ANTHROPIC_AUTH_TOKENAlternative auth token for API access
CLAUDE_CODE_DISABLE_ATTACHMENTSDisable file attachment support
CLAUDE_CODE_DISABLE_CLAUDE_MDSDisable CLAUDE.md file loading
CLAUDE_CODE_DISABLE_COMMAND_INJECTION_CHECKDisable command injection safety checks
CLAUDE_CODE_DISABLE_CRONDisable cron/scheduled task features
07
Undocumented command-line flags that unlock experimental modes.
--agent-teamsEnable multi-agent collaboration
--bareMinimal UI, no chrome
--coworkCo-working session mode
--spawnSpawn subagent process
--stagingUse staging API endpoints
--enable-auto-modeEnable autonomous execution
--chrome-native-hostChrome native messaging host
--computer-use-mcpComputer-use MCP server mode
--claude-in-chrome-mcpChrome extension MCP bridge
--sdk-urlOverride SDK endpoint URL
--fork-sessionFork from existing session
--no-session-persistenceDisable session state persistence
--init-onlyInitialize and exit immediately
--deep-link-originDeep link source tracking
08
Two complementary approaches were used to extract every hidden feature.
| Aspect | Native Binary Analysis | npm Package Analysis |
|---|---|---|
| Target | macOS arm64 Mach-O binary | @anthropic-ai/claude-code npm package |
| Tools | strings, otool, Ghidra, custom extractors | AST parsing, regex extraction, source maps |
| String Extraction | ~42K unique strings from __TEXT segment | Full JS source with readable identifiers |
| Advantage | Includes native-only symbols, C++ internals | Full logic, control flow, default values |
| Coverage | Surface-level: names & string constants | Deep: complete implementation details |