[来源关键摘录] Version-by-version reverse engineering documentation of Claude Code's hidden tracking, XOR-obfuscated domain blacklists, device fingerprinting, and steganographic markers.
[正文前段节选] Skip to content
Navigation Menu
Appearance settings
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.
You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
Repository navigation
tengu-decoded
NotificationsYou must be signed in to change notification settings
Star101 (101)You must be signed in to star a repository
Reverse-engineering Claude Code's internals — feature flags, telemetry, device fingerprinting, and infrastructure, version by version.
Code of conduct
Contributing
Report repository
BranchesTags
Open more actions menu
Latest commit
Folders and files
Last commit message
Last commit date
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
View all files
Repository files navigation
Tengu Decoded
Reverse-engineering Claude Code's internals -- feature flags, gated features, telemetry, device fingerprinting, and the infrastructure behind Anthropic's AI coding tool.
"Tengu" is Anthropic's internal codename for Claude Code. This repository documents what the
publicly distributed Claude Code binary actually does, version by version.
Earlier versions (v2.1.32) were examined with standard Unix tools (strings, grep). From
v2.1.169 the binary is a Bun-compiled standalone executable that embeds the application's
JavaScript as cleartext, so the analysis carves that bundle out of the binary and beautifies it
(~662k readable lines) — findings come from real function bodies, not isolated strings. Each version
directory ships the extracted bundle and the raw extraction output alongside the write-ups, so every
claim is reproducible.
This is a personal research archive — a deep, private teardown for understanding the tool, not a
published product.
Analyzed Versions
Linux x86-64
Complete (deep)
See versions/README.md for the full version index, and the
comparisons/ directory for cross-version diffs
(2.1.32 → 2.1.169,
2.1.169 → 2.1.197,
2.1.197 → 2.1.300).
Latest (v2.1.300): the first build whose packaging changed. The single CommonJS bundle became
code-split ESM: 2,651 files embedded in the binary's .bun section (2,395 lazily loaded chunks, a
24 KB entry loader, bundled skills, templates, native addons and fonts), on Bun v1.4.3. Extraction now
parses Bun's module table (extract.py). Against same-method
recounts of 2.1.197: 704 feature flags (251), 1,944 telemetry events (1,181), 84 built-in tools
(49), 1,018 env vars (526), 347 API path templates (177). Flags are now read through a class that
reports each value's source, with session-pinned reads. New provider plane anthropicGoogleCloud;
claude-opus-5-5 is the compiled default on first-party. The Haiku-based Bash prefix classifier is
gone (Bash safety checks are deterministic). Install identifiers go from 2 to 4, all random
(new: summonSidKey, never sent; remoteControlMachineId, sent to the remote-control bridge), plus a new
per-account ECDSA device key. See the overview, the new
embedded-assets report and the
2.1.197 → 2.1.300 comparison.
v2.1.197: a deep, bundle-extracted analysis (Bun v1.4.0, ~733k beautified lines).
Where 2.1.169 was a tectonic shift, 2.1.197 is a consolidation release — the same cloud
agent-fabric, renamed and re-gated, with new managed-resource families bolted on. Headline deltas vs
2.1.169: 243 feature flags (+25), 1086 → 1163 telemetry events, 49 built-in tools,
526 env vars, 164 API path templates; a new declarative model catalog with the fable
family (claude-fable-5, Mythos-class) and claude-sonnet-5; new cloud surfaces — credential
Vaults, memory stores, skill versioning, Claude Design MCP, and web-artifact frame
deploy. Notably, the Datadog telemetry token was not rotated this cycle. See the
overview and the 2.1.169 → 2.1.197 comparison.
Note on depth (v2.1.169): this analysis goes beyond strings. v2.1.169 ships as a
Bun v1.3.14 standalone executable, so the full 16.5 MB plaintext JS bundle was carved out of
the binary and beautified to ~662k readable lines — findings come from real function bodies. It also
adds a new device-fingerprinting deep-dive.
Key Findings (v2.1.169)
Now a Bun v1.3.14 compiled standalone binary (v2.1.32 was Node.js SEA) — JS source recoverable as plaintext
218 feature flags, 1086 telemetry events, ~46 built-in tools, 490 env vars (vs 48 / 239 / 17 / 54 in 2.1.32)
Transmitted device_id is a random 256-bit per-install token (crypto.randomBytes(32) → ~/.claude.json), not hardware-derived; the OS machine UUID is read but stripped to host.arch
Segment removed. First-party event logging (/api/event_logging/v2/batch) is the spine; Datadog US5 is an allow-listed mirror (off by default); GrowthBook + optional OpenTelemetry + Perfetto
Cloud backend
New managed-agents API: /v1/sessions, /v1/agents, /v1/environments, /v1/files; plus Remote-Control bridge over wss://bridge.claudeusercontent.com
Background-agent daemon (/background, /tasks, /fork), "kairos" loops & scheduling (/loop, /schedule, cron), and a VM-sandboxed Workflows engine
Server-side gate now defaults open (tengu_amber_flint false→true); still requires --agent-teams/env opt-in. Adds coordinator mode + shared team memory
The 14-category regex injection pipeline is gone — replaced by an LLM prefix-classifier + destructive-command regex + a two-stage auto-mode classifier; plus bubblewrap/seatbelt/WFP sandboxing
System Prompt
Composed by iT() with per-section caching (rT); modern models get a compact "# Harness" intro instead of the legacy 6-section layout
Anthropic, Bedrock, Vertex, Foundry, Mantle, Gateway (planes selected by Mq())
Default is claude-opus-4-8; "fast mode" is a speed:"fast" request flag; 1M context via [1m] suffix; Pro can now meter Opus against usage credits
~64 active + new hidden/easter-egg (/radio = Claude FM lo-fi, /heapdump, /bridge-kick)
Earlier findings for v2.1.32 live in versions/2.1.32/.
What's in each version directory
versions/<version>/
├── metadata.yaml # version, build, runtime, accessors, headline deltas
├── *.md # per-topic analysis reports
│ ├── *.yaml # structured, machine-readable findings
│ └── raw/ # raw extraction output (strings dumps, grep extracts) — provenance
└── bundle/ # (Bun builds) the carved + beautified JS source + extraction script
├── cli.beauty.js # beautified bundle (~662k lines) — the primary analysis source
├── cli.min.js # carved minified bundle (byte-for-byte from the binary)
├── carve.py # extraction script (byte offsets used)
└── ANALYSIS_CONTEXT.md # ground-truth notes shared across the analysis
Documentation
How analysis is performed (string extraction + bundle extraction/beautification)
Internal codenames (tengu, marble, copper, coral, grove, kairos, harbor, …)
Architecture Overview
How this repository is organized
How to Analyze
Step-by-step guide for analyzing a new version
Version 2.1.300 Reports
Build metadata, the ESM code-split packaging change, headline counts
Device Fingerprinting
Deep-dive: four install identifiers + device key, and exactly where each leaves the machine
Embedded Assets
New: the 2,651 files in the binary (chunks, skills, templates, .mjs toolkit, native addons)
Feature Flags
All 704 flags and the provenance-aware resolver class
Plan and Tier Gating
Subscription types, model access, usage credits
API Endpoints
347 path templates: inference, cloud backend, self-hosted runners, org admin, Google Cloud plane
1,944 events, the capped pre-sink queue, backends and controls
Composer, section builders, text diffed against 2.1.197
Tool Definitions
84 tools (Jt factory), schemas, permission modes
Security Model
Deterministic Bash checks (LLM prefix classifier removed), auto-mode classifier, sandboxing
Architecture
Code-split ESM, hooks worker, native addons, daemon, teams, bridge, mods
Model References
Model catalog, Claude 5.5 defaults, remote signed catalog
[...内容已截断,完整版请查看原文或 Wayback 快照]