Claude Code Leak Phân Tích – Multi-Agent, Undercover Mode, Models Sắp Ra Mắt

Nội dung

Phân tích chi tiết source code Claude Code bị leak: hệ thống multi-agent, Undercover Mode, các model sắp ra mắt và feature gating nội bộ.

Tóm tắt nhanh

  • Claude Code có hệ thống multi-agent orchestration với Coordinator Mode
  • Undercover Mode ngăn AI reveal thông tin nội bộ trong public repos
  • Các model sắp ra mắt: Capybara, Opus 4.7, Sonnet 4.8 được tìm thấy trong code
  • Feature gating system phân biệt bản internal và external
  • Fast Mode được gọi nội bộ là “Penguin Mode”
Claude Code internal features analysis
Phân tích các tính năng nội bộ của Claude Code

Trong phần trước, chúng ta đã tìm hiểu về sự việc leak source code Claude Code qua npm sourcemap và các tính năng như Buddy Tamagotchi, KAIROS, ULTRAPLAN. Trong phần này, mình sẽ đi sâu hơn vào hệ thống multi-agent, Undercover Mode và các model sắp ra mắt.

Nếu bạn quan tâm đến bảo mật website, hãy xem thêm bài OWASP Top 10 2026 để hiểu về các lỗ hổng bảo mật phổ biến nhất hiện nay.

Multi-Agent Orchestration – Coordinator Mode

Claude Code có một hệ thống orchestration multi-agent hoàn chỉnh được kích hoạt qua CLAUDE_CODE_COORDINATOR_MODE=1. Khi enable, Claude Code biến từ một agent đơn lẻ thành một “coordinator” có khả năng spawn, điều phối và quản lý nhiều worker agents song song.

System này hoạt động theo 4 phases rõ ràng:

Sơ đồ 4 phases của multi-agent orchestration
4 phases của Coordinator Mode
  1. Research: Workers chạy song song để investigate codebase, tìm files, hiểu vấn đề
  2. Synthesis: Coordinator đọc findings, hiểu vấn đề, craft specs
  3. Implementation: Workers thực hiện changes theo spec, commit
  4. Verification: Workers test changes có hoạt động không

System prompt explicitly dạy về parallelism: “Parallelism is your superpower. Workers are async. Launch independent workers concurrently whenever possible — don’t serialize work that can run simultaneously.”

Workers communicate qua XML messages <task-notification>. Có một shared scratchpad directory (gated behind tengu_scratch) cho cross-worker durable knowledge sharing.

Agent Teams/Swarm Capabilities

System còn có khả năng Agent Teams/Swarm với:

  • In-process teammates dùng AsyncLocalStorage cho context isolation
  • Process-based teammates dùng tmux/iTerm2 panes
  • Team memory synchronization
  • Color assignments cho visual distinction

Tất cả bị gate behind feature flag tengu_amber_flint.

Undercover Mode – “Đừng Để Lộ Tin”

Đây là một trong những phát hiện thú vị nhất từ góc nhìn chiến lược doanh nghiệp.

Khi nhân viên Anthropic (identified by USER_TYPE === 'ant') sử dụng Claude Code trên repositories public/open-source, Undercover Mode sẽ ngăn AI vô tình reveal thông tin nội bộ trong commits và PRs.

Undercover Mode system prompt example
Undercover Mode ngăn leak thông tin nội bộ

Khi active, nó inject vào system prompt:

UNDERCOVER MODE - CRITICAL

You are operating UNDERCOVER in a PUBLIC/OPEN-SOURCE repository. Your commit
messages, PR titles, and PR bodies MUST NOT contain ANY Anthropic-internal
information. Do not blow your cover.

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)
* Internal repo or project names
* Internal tooling, Slack channels, or short links (e.g., go/cc, #claude-code-…)
* The phrase "Claude Code" or any mention that you are an AI
* Co-Authored-By lines or any other attribution

Activation logic:

  • CLAUDE_CODE_UNDERCOVER=1 forces ON (trong cả internal repos)
  • Nếu không có cờ này, nó tự động active TRỪ KHI repo remote match internal allowlist
  • Không có force-OFF — “if we’re not confident we’re in an internal repo, we stay undercover”

Điều này confirm:

  1. Nhân viên Anthropic tích cực dùng Claude Code để contribute vào open-source — và AI được dạy để hide rằng nó là AI
  2. Internal model codenames là tên động vật — Capybara, Tengu, etc.
  3. “Tengu” xuất hiện hàng trăm lần như prefix cho feature flags và analytics events — gần như chắc chắn đây là internal codename cho Claude Code

Tất cả bị dead-code-eliminated từ external builds. Nhưng sourcemap không quan tâm đến dead code elimination.

Các Model Sắp Ra Mắt: Capybara, Opus 4.7, Sonnet 4.8

Codebase chứa references đến các model chưa được public announce của Anthropic:

  • Claude “Capybara” — Model family mới đã ở version 2, có variant capybara-v2-fast với 1M context window
  • Capybara có cả tier “fast” và regular thinking
  • Opus 4.7Sonnet 4.8 đã được reference trong code
Capybara model family concept
Capybara – model family mới của Anthropic

Production Engineering Around Capybara

Code reveal rằng Anthropic đã observe một production failure mode thực: Capybara có thể stop generation sớm khi prompt shape resembles một turn boundary sau tool results. Thay vì đợi model fix, họ đã mitigate bằng prompt-shape surgery:

  1. Force safe boundary marker (Tool loaded.) để prevent ambiguous turn boundaries
  2. Relocate risky sibling blocks có thể trigger premature stops
  3. Smoosh reminder text vào tool results để maintain generation flow
  4. Add non-empty markers cho empty tool outputs để tránh confuse model

Tất cả được wrap với kill-switchable gates (tengu_* prefixed flags) để rollout có thể staged và reverted nhanh.

Comments trong code bao gồm concrete A/B test evidence (không phải hand-wavy), thường means area này là launch-critical và được closely monitored. Comments như “un-gate once validated on external via A/B” confirm rằng ant/internal users là canary lanes trước khi rollout rộng hơn.

Feature Gating – Internal vs External Builds

Đây là một trong những phần kiến trúc thú vị nhất của codebase.

Claude Code dùng compile-time feature flags qua Bun’s feature() function từ bun:bundle. Bundler constant-foldsdead-code-eliminates các branches bị gate từ external builds.

Feature flags system diagram
Hệ thống feature gating trong Claude Code

Complete list của known flags:

Cờ (Flag)Tính năng được kiểm soát
PROACTIVE / KAIROSAlways-on assistant mode
KAIROS_BRIEFBrief command
BRIDGE_MODERemote control via claude.ai
DAEMONBackground daemon mode
VOICE_MODEVoice input
WORKFLOW_SCRIPTSWorkflow automation
COORDINATOR_MODEMulti-agent orchestration
TRANSCRIPT_CLASSIFIERAFK mode (ML auto-approval)
BUDDYCompanion pet system
NATIVE_CLIENT_ATTESTATIONClient attestation
HISTORY_SNIPHistory snipping
EXPERIMENTAL_SKILL_SEARCHSkill discovery

Thêm vào đó, USER_TYPE === ‘ant’ gates các features nội bộ:

  • Staging API access (claude-ai.staging.ant.dev)
  • Internal beta headers
  • Undercover mode
  • Command /security-review
  • ConfigTool, TungstenTool
  • Debug prompt dumping to ~/.config/claude/dump-prompts/

GrowthBook xử lý runtime feature gating với aggressively cached values. Feature flags prefix với tengu_ control mọi thứ từ fast mode đến memory consolidation. Nhiều checks dùng getFeatureValue_CACHED_MAY_BE_STALE() để tránh block main loop — stale data được coi là acceptable cho feature gates.

Các Phát Hiện Thú Vị Khác

Fast Mode = “Penguin Mode”

Fast Mode được gọi nội bộ là “Penguin Mode”. API endpoint trong code:

const endpoint = ${getOauthConfig().BASE_API_URL}/api/claude_code_penguin_mode

Config key: penguinModeOrgEnabled. Kill-switch: tengu_penguins_off. Analytics event on failure: tengu_org_penguin_mode_fetch_failed. Penguins all the way down!

Computer Use – “Chicago”

Claude Code có full Computer Use implementation, internally codename “Chicago”, built trên @ant/computer-use-mcp. Nó cung cấp screenshot capture, click/keyboard input, và coordinate transformation. Gate to Max/Pro subscriptions (với ant bypass cho internal users).

Model Codenames in Migrations

Thư mục migrations/ reveal internal codename history:

  • migrateFennecToOpus — “Fennec” (con cáo) là Opus codename
  • migrateSonnet1mToSonnet45 — Sonnet với 1M context thành Sonnet 4.5
  • migrateSonnet45ToSonnet46 — Sonnet 4.5 → Sonnet 4.6
  • resetProToOpusDefault — Pro users được reset về Opus

Attribution Header

Mọi API request include:

x-anthropic-billing-header: cc_version={VERSION}.{FINGERPRINT}; 
  cc_entrypoint={ENTRYPOINT}; cch={ATTESTATION_PLACEHOLDER}; cc_workload={WORKLOAD};

NATIVE_CLIENT_ATTESTATION feature cho phép Bun’s HTTP stack overwrite cch=00000 placeholder với computed hash — essentially một client authenticity check để Anthropic có thể verify request đến từ một Claude Code installation thực.

Nhận xét cuối cùng

Đây là một trong những cái nhìn toàn diện nhất mà chúng ta từng có về cách AI coding assistant hàng đầu hoạt động bên trong.

Một vài điều nổi bật:

Engineering thực sự ấn tượng. Đây không phải weekend project bọc trong CLI. Multi-agent coordination, Dream system, three-gate trigger architecture, compile-time feature elimination — đây là những systems được deeply consider.

Có RẤT NHIỀU thứ sắp ra mắt. KAIROS (always-on Claude), ULTRAPLAN (30-minute remote planning), Buddy companion, coordinator mode, agent swarms, workflow scripts — codebase vượt xa public release khá nhiều. Hầu hết bị feature-gated và invisible trong external builds.

Văn hóa nội bộ thể hiện rõ. Animal codenames (Tengu, Fennec, Capybara), playful feature names (Penguin Mode, Dream System), Tamagotchi pet system với gacha mechanics. Có người ở Anthropic đang có fun!

Nếu có một điều rút ra, đó là bảo mật rất khó. Nhưng .npmignore còn khó hơn, có vẻ như :P

Nguồn tham khảo

  1. Kuber Studio – Claude Code Source Code Leak Analysis

Các câu hỏi thường gặp

Coordinator Mode trong Claude Code là gì?

Coordinator Mode là hệ thống multi-agent orchestration trong Claude Code, cho phép Claude Code hoạt động như một coordinator có thể spawn và quản lý nhiều worker agents song song để xử lý các tasks phức tạp.

Undercover Mode hoạt động như thế nào?

Undercover Mode ngăn Claude Code reveal thông tin nội bộ (model codenames, internal project names, tool names) khi làm việc trên các repository public/open-source. Nó tự động activate trừ khi đang trong internal repo.

Capybara là gì trong Anthropic?

Capybara là model family mới của Anthropic, đã ở version 2 với variant capybara-v2-fast hỗ trợ 1M context window. Đây là model chưa được public announce được tìm thấy trong source code bị leak.

Feature gating là gì?

Feature gating là hệ thống compile-time flags trong Claude Code phân biệt giữa bản internal và external. Các tính năng như KAIROS, Coordinator Mode, Buddy system bị dead-code-eliminated từ bản public.

Penguin Mode là gì?

Penguin Mode là tên nội bộ của Fast Mode trong Claude Code. Đây là một tính năng cho phép Claude Code hoạt động nhanh hơn với trade-off về chất lượng.

Tengu là gì?

Tengu là internal codename cho Claude Code, xuất hiện hàng trăm lần trong source code như prefix cho feature flags và analytics events. Đây là tên động vật theo quy ước đặt tên nội bộ của Anthropic.

Tú Anh

Cây bút chính tại VietnamTutor

Bài viết cùng chuyên mục

Claude Code Source Code Leak Qua npm – Sự Việc 31/3/2026

Ngày 31/3/2026, toàn bộ source code Claude Code bị exposed qua npm sourcemap. Đây là cách leak xảy ra và những gì đã bị lộ.

Thiết Kế Website Agentic AI 2026: Hướng Dẫn Toàn Diện

Website tĩnh đang dần biến mất. Năm 2026, thiết kế website agentic AI giúp website tự động cá nhân hóa trải nghiệm người dùng, tối ưu

AI tạo hình ảnh 2026: Midjourney vs DALL-E vs Gemini — so sánh & hướng dẫn

Bạn đang tìm kiếm công cụ AI tạo hình ảnh tốt nhất năm 2026? Bài viết này so sánh chi tiết Midjourney, DALL-E và Gemini Imagen,

MCP (Model Context Protocol) là gì? Chuẩn Kết Nối AI Agent 2026

MCP (Model Context Protocol) là giao thức mã nguồn mở giúp AI agents kết nối với công cụ, dữ liệu và dịch vụ bên ngoài một

SEO On-Page Checklist cho WordPress: 37 Bước Tối Ưu 2026

Trong bài viết này, tôi sẽ đưa ra checklist 37 bước SEO on-page cho WordPress dựa trên thực hành tốt nhất năm 2026. Mỗi bước đều

Claude vs GPT vs Gemini 2026: So Sánh 3 AI Mạnh Nhất

OpenAI với GPT-5.2, Anthropic với Claude 4.6, và Google với Gemini 3.1. Mỗi bên đều có chiến lược riêng, và không có câu trả lời chung

Sự thật đằng sau “reset 5 giờ” của Antigravity Pro: Toàn bộ là dối trá?

Quota Antigravity Pro bị khóa cả tuần thay vì reset 5h? Google ép lên Ultra hay chống “bào” token? Đọc ngay để biết sự thật &

Mã độc VS Code, Go, npm, Rust: Nguy cơ đánh cắp dữ liệu dev

Mã độc trong VS Code extensions, gói Go, npm, Rust đang âm thầm đánh cắp dữ liệu dev. Tìm hiểu cách bảo vệ thông tin cá

Vibe Coding: Bí quyết dẫn đầu marketing AI 2025-2030

Vibe Coding - chìa khóa bứt phá marketing kỷ nguyên AI. Làm chủ sự kết hợp sáng tạo và tư duy hệ thống để tự động

Bảng xếp hạng công cụ AI xây dựng ứng dụng tối ưu

Bạn muốn xây ứng dụng AI? Khám phá bảng xếp hạng công cụ AI hàng đầu. Tìm nền tảng phù hợp cho ứng dụng cá nhân,

Lập trình viên: Xây doanh nghiệp một người, kiếm 10.000 USD/tháng

Lập trình viên: Khám phá khung làm việc để xây dựng doanh nghiệp một người, kiếm 10.000 USD/tháng. Biến kỹ năng code thành cỗ máy tiền,