Files
claude-code-source-code/docs/zh/02-隐藏功能与模型代号.md
sanbuphy de14c0ace8 Add source code analysis docs: telemetry, codenames, undercover mode, remote control, roadmap
5 bilingual (EN/ZH) analysis documents covering:
- Telemetry & privacy (opt-out-free data collection)
- Hidden features & model codenames (Tengu, Capybara, Fennec, Numbat)
- Undercover mode (AI attribution stripping in open-source)
- Remote control & killswitches (managed settings, feature flags)
- Future roadmap (Numbat model, KAIROS autonomous mode, voice input)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 19:41:11 +08:00

3.1 KiB
Raw Blame History

隐藏功能与模型代号

基于 Claude Code v2.1.88 反编译源码分析

模型代号体系

Anthropic 使用动物名称作为内部模型代号。这些代号被严格保护,防止泄露到外部构建中。

已知代号

代号 角色 证据
Tengu(天狗) 产品/遥测前缀,也可能是模型 所有 250+ 分析事件和 feature flag 使用 tengu_* 前缀
Capybara(水豚) Sonnet 系列模型,当前版本 v8 capybara-v2-fast[1m]v8 行为问题的 prompt 补丁
Fennec(耳廓狐) Opus 4.6 的前代 迁移: fennec-latestopus
Numbat(袋食蚁兽) 下一代模型 注释: "Remove this section when we launch numbat"

代号保护机制

Undercover 模式明确列出了受保护的代号:

// src/utils/undercover.ts:48-49
NEVER include in commit messages or PR descriptions:
- Internal model codenames (animal names like Capybara, Tengu, etc.)
- Unreleased model version numbers (e.g., opus-4-7, sonnet-4-8)

构建系统使用 scripts/excluded-strings.txt 扫描泄露的代号。Buddy 系统的物种通过 String.fromCharCode() 编码以避免触发金丝雀检查:

// src/buddy/types.ts:10-13
// One species name collides with a model-codename canary in excluded-strings.txt.
// 运行时构造值,保持字面量不出现在构建产物中

那个冲突的物种就是 capybara — 既是宠物物种又是模型代号。

Capybara v8 的行为问题

源码揭示了 Capybara v8 的具体行为问题:

  1. 停止序列误触发 (~10% 概率) — prompt 尾部出现 <functions>
  2. 空 tool_result 导致零输出 — 需要注入 marker workaround
  3. 过度写注释 — 需要专门的反注释 prompt 补丁
  4. 高虚假声明率: v8 为 29-30%,而 v4 为 16.7%
  5. 验证不足 — 需要 "thoroughness counterweight" 补丁

Feature Flag 命名约定

所有 feature flag 使用 tengu_ 前缀 + 随机词对以掩盖用途:

Flag 用途
tengu_onyx_plover Auto Dream后台记忆整理
tengu_coral_fern memdir 功能
tengu_herring_clock 团队内存
tengu_frond_boric 分析 kill switch
tengu_amber_quartz_disabled 语音模式 kill switch
tengu_amber_flint 代理团队

内外部用户的差异

Anthropic 员工 (USER_TYPE === 'ant') 获得显著更好的待遇:

维度 外部用户 内部用户 (ant)
输出风格 "尽量简洁" "倾向于更多解释"
虚假声明缓解 专门的 Capybara v8 补丁
数值长度锚定 "工具间 ≤25 词,最终回复 ≤100 词"
验证代理 非简单改动必须启用
主动性 "发现用户误解要指出"

隐藏命令

命令 状态 描述
/btw 活跃 顺带提问,不打断主对话
/stickers 活跃 订购 Claude Code 贴纸
/thinkback 活跃 2025 年度回顾
/good-claude 占位 隐藏的 stub 命令
/bughunter 占位 隐藏的 stub 命令