Ra mắt ngày 5 tháng 2 năm 2026, Claude Opus 4.6 đi kèm tính năng có cảm giác như research preview hơn là product announcement: Agent Teams. Nhiều Claude Code instances làm việc song song, phối hợp trực tiếp với nhau, mỗi cái sở hữu một phần của task lớn hơn.

Tôi đã xây dựng với nó được sáu tuần. Đây là những gì tôi học được.

Agent Teams Thực Sự Là Gì

Mental model đơn giản nhất: Agent Teams cho phép bạn khởi tạo một Claude Code session như orchestrator, có thể spawn sub-agents (các Claude Code instances khác) làm việc trên các subtask song song. Mỗi sub-agent chạy trong context window riêng. Chúng có thể nhắn tin trực tiếp cho nhau — không chỉ báo cáo lại orchestrator.

Điều này khác với cách hầu hết multi-agent frameworks hoạt động hiện nay:

Kiểu truyền thống (hierarchical):

  • Agent A gọi Agent B
  • Agent B thực thi, trả kết quả
  • Agent A xử lý và quyết định bước tiếp

Agent Teams (peer-to-peer):

  • Orchestrator spawn Agent A và Agent B
  • Agent A phát hiện cần thứ Agent B đang làm
  • Agent A nhắn tin trực tiếp cho Agent B
  • Cả hai tiếp tục, orchestrator tổng hợp

Cho phát triển phần mềm cụ thể, điều này map tốt với cách engineering teams thực sự làm việc. Không strictly hierarchical, với tech lead delegate mọi quyết định — mà collaborative, với các engineer phối hợp lateral về shared concerns.

Kiến Trúc Adaptive Thinking

Cùng với Agent Teams, Opus 4.6 giới thiệu Adaptive Thinking — và đây là thay đổi ảnh hưởng nhất đến API integration.

Mô hình cũ: bạn đặt budget_tokens để kiểm soát mức độ reasoning. Đơn giản, nhưng thô. Bạn hoặc trả cho maximum reasoning trên mọi call, hoặc chấp nhận hiệu suất giảm trên các task phức tạp.

Mô hình mới: bạn chỉ định effort level (low, medium, high, max) và để model quyết định bao nhiêu reasoning bài toán thực sự cần. Adaptive thinking tự động bật interleaved thinking — model có thể reasoning giữa các bước, không chỉ ở đầu response.

import anthropic

client = anthropic.Anthropic()

# Cách cũ — deprecated trên Opus 4.6
response = client.messages.create(
    model="claude-opus-4-6",
    max_tokens=8000,
    thinking={
        "type": "enabled",
        "budget_tokens": 10000  # ⚠️ Deprecated
    },
    messages=[{"role": "user", "content": "Review PR diff này..."}]
)

# Cách mới — dùng cái này
response = client.messages.create(
    model="claude-opus-4-6",
    max_tokens=8000,
    thinking={
        "type": "adaptive",
        "effort": "high"  # low | medium | high (default) | max
    },
    messages=[{"role": "user", "content": "Review PR diff này..."}]
)

Breaking change quan trọng khác: prefilling assistant messages giờ trả về lỗi 400. Nếu bạn đang dùng pattern assistant prefill để steer outputs, cần chuyển sang system prompts trước khi deploy Opus 4.6.

Context Compaction: Yếu Tố Kích Hoạt Cho Long Agent Sessions

Một tính năng quiet nhưng quan trọng trong Opus 4.6 là Context Compaction (beta). Trong long-running agentic workflows, context windows đầy lên. Hành vi truyền thống: bạn đụng ngưỡng, session fail, mất state.

Context Compaction xử lý điều này bằng cách summarize older context khi session tiến gần giới hạn token, giữ essential state trong khi loại bỏ verbatim history. Với Agent Teams sessions có thể chạy hàng giờ trên migration codebase lớn, đây là sự khác biệt giữa session hoàn thành và session fail sau 3 tiếng.

1M token context window (beta) cũng giúp ích, nhưng Context Compaction là thứ khiến các agent sessions 12+ giờ thực sự khả thi.

Hiệu Suất Thực Tế: Terminal-Bench 2.0

Benchmark quan trọng nhất với coding agents là Terminal-Bench 2.0, đánh giá hiệu suất trên các agentic coding tasks trong môi trường terminal thực — không phải isolated coding puzzles, mà là end-to-end development workflows.

Opus 4.6 đạt 65.4% trên Terminal-Bench 2.0 — cao nhất từ trước đến nay. So sánh: record trước đó ở tầm thấp-50s.

Ý nghĩa thực tế: Opus 4.6 có thể handle complete development workflows, không chỉ code generation snippets. Multi-file changes, chạy test, fix lỗi, iterate dựa trên output — chuỗi task mà developer thực sự làm.

Xây Dựng Với Agent Teams: Ví Dụ Thực Tế

Đây là pattern tôi đã dùng thành công cho parallel code review trên PR lớn:

import anthropic

client = anthropic.Anthropic()

def spawn_review_agent(file_path: str, diff_content: str, concern: str) -> str:
    """Chạy review agent tập trung vào concern cụ thể."""
    response = client.messages.create(
        model="claude-opus-4-6",
        max_tokens=4000,
        thinking={"type": "adaptive", "effort": "high"},
        system=f"""Bạn là code reviewer chuyên về: {concern}.
Chỉ review những gì liên quan đến focus area của bạn. Cụ thể và actionable.""",
        messages=[
            {
                "role": "user",
                "content": f"Review thay đổi này trong {file_path}:\n\n{diff_content}"
            }
        ]
    )
    return response.content[-1].text

def parallel_pr_review(pr_diff: str) -> dict:
    """Orchestrate parallel review trên nhiều concerns."""
    concerns = [
        ("security", "Lỗ hổng bảo mật, injection risks, vấn đề auth"),
        ("performance", "Bottlenecks hiệu suất, N+1 queries, memory leaks"),
        ("correctness", "Logic errors, edge cases, gaps xử lý lỗi"),
        ("maintainability", "Cấu trúc code, naming, testability")
    ]

    results = {}
    for concern_id, concern_desc in concerns:
        results[concern_id] = spawn_review_agent(
            "pr_diff.txt",
            pr_diff,
            concern_desc
        )

    return results

def synthesize_reviews(reviews: dict) -> str:
    """Orchestrator tổng hợp kết quả."""
    synthesis_prompt = "\n\n".join([
        f"## Review {concern.title()}\n{review}"
        for concern, review in reviews.items()
    ])

    response = client.messages.create(
        model="claude-opus-4-6",
        max_tokens=2000,
        thinking={"type": "adaptive", "effort": "medium"},
        messages=[
            {
                "role": "user",
                "content": f"Tổng hợp các parallel code reviews này thành danh sách hành động ưu tiên:\n\n{synthesis_prompt}"
            }
        ]
    )
    return response.content[-1].text

Insight kiến trúc quan trọng: mỗi sub-agent chạy với focused context — nó chỉ biết về files và concerns liên quan đến slice công việc của nó. Điều này cho kết quả tốt hơn so với feed tất cả vào một agent vì reasoning không bị pha loãng bởi các concerns không liên quan.

Case Study: Migration Codebase

Use case Anthropic highlight nhiều nhất cho Opus 4.6 là large-scale codebase migration. Tôi đã test ở quy mô nhỏ hơn — migration codebase .NET 200K dòng từ .NET 6 lên .NET 9:

Với single agent: 8 tiếng

Với Agent Teams (4 sub-agents song song trên các namespaces khác nhau): 2.5 tiếng

Tiết kiệm thời gian là thực tế, nhưng coordination overhead quan trọng — orchestrator cần đủ context để resolve conflicts thông minh.

Pattern làm việc:

  1. Orchestrator agent map codebase và tạo migration plan
  2. Nhiều sub-agents handle các modules khác nhau song song
  3. Agents flag dependencies cho orchestrator khi gặp cross-module concerns
  4. Orchestrator phối hợp merge work và resolve conflicts

Những Gì Thực Sự Thay Đổi Trong Workflow Của Tôi

Sáu tuần sau, những thay đổi tôi thực sự quan tâm:

Agent Teams có giá trị nhất cho tasks với natural parallelism. Code review, parallel module development, multi-format content generation. Ít giá trị hơn cho tasks nơi mọi thứ phụ thuộc vào nhau — sequential reasoning vẫn là approach đúng đó.

Adaptive thinking tốt hơn budget_tokens. Cách cũ yêu cầu tune budget_tokens theo từng task type, là trial-and-error. Các effort levels map trực quan hơn với độ phức tạp thực tế — tôi dùng high cho code generation, medium cho review, low cho formatting/extraction tasks.

1M context window thay đổi planning. Feed toàn bộ codebase vào context (cho large-scale analysis hoặc migration planning) giờ thực tế, không còn chỉ lý thuyết. Điều này tạo ra category task mới trước đây không khả thi.

Giá không đổi ($5/$25 per million tokens). Với upgrade capability đáng kể như vậy, giữ nguyên giá là đáng chú ý. Nó thay đổi ROI calculation trên các tasks trước đây ở ngưỡng.

Checklist Migration

Nếu bạn đang dùng Claude Opus 4.5 hoặc trước đó:

□ Thay thinking.budget_tokens → thinking.type: "adaptive", effort: "high"
□ Xóa interleaved-thinking-2025-05-14 beta header (giờ bị bỏ qua)
□ Chuyển assistant prefill patterns sang system prompts (prefill → lỗi 400)
□ Test context compaction behavior trong long-running sessions
□ Cập nhật model string thành "claude-opus-4-6"

Migration ít rủi ro — hầu hết thay đổi là additive hoặc cung cấp sensible defaults. Prefill change là cái duy nhất có thể gây immediate failures, vậy test cái đó trước.

Nhìn Về Phía Trước

Trajectory rõ ràng: multi-agent coordination đang trở thành first-class concern trong cách AI-assisted development tools được thiết kế. Agent Teams trong Opus 4.6, GitHub Copilot Workspace, Windsurf’s parallel agent sessions — tất cả ra mắt trong cùng quý.

Công việc của developer đang chuyển dịch từ viết code sang orchestrate agents viết code, với developer tập trung vào architecture, verification, và integration. Đó là bộ kỹ năng khác với tối ưu LLM prompts. Các team hiểu ra orchestration patterns — cách split work, cách verify agent output, cách handle agent coordination failures — sẽ có lợi thế cấu trúc.

Đó là cược đáng đặt hôm nay.


Claude Opus 4.6 có sẵn qua Anthropic API, Amazon Bedrock, Google Cloud Vertex AI, và Microsoft Azure AI Foundry. Agent Teams đang trong research preview.

Xuất nội dung

Bình luận