{"product_id":"the-adventuring-party-multi-agent-orchestration-với-tmux-từ-sub-agents-dến-ai-team-thực-sự","title":"The Adventuring Party: Multi-Agent Orchestration với tmux — Từ Sub-agents đến AI Team thực sự","description":"\n\u003ch2\u003eHành trình từ frustration đến kiến trúc\u003c\/h2\u003e\n\u003cp\u003eAlex Ivison bắt đầu với một vấn đề đơn giản: code review của một AI agent thường bỏ sót bugs mà một AI agent khác có thể catch. Giải pháp tự nhiên — dùng hai AI — nhưng kết nối chúng với nhau lại phức tạp hơn nhiều so với tưởng tượng ban đầu. Hành trình của anh qua 3 giai đoạn từ tháng 1 đến tháng 3\/2026 là bài học quý giá cho bất kỳ ai muốn xây dựng multi-agent system nghiêm túc.\u003c\/p\u003e\n\n\u003ch2\u003eGiai đoạn 1: Sub-Agents (Tháng 1\/2026) — Vấn đề communication\u003c\/h2\u003e\n\u003cp\u003eApproach đầu tiên: dùng Claude's sub-agents làm messenger giữa Claude và Codex (GPT-5.3\/5.4). Về mặt lý thuyết elegant — một agent orchestrate, agent khác execute.\u003c\/p\u003e\n\n\u003cp\u003eThực tế: sub-agents thêm một layer communication không đáng tin cậy. Messages bị misinterpret, context bị mất khi pass qua intermediary. Agent \"nói chuyện về\" work thay vì thực sự làm work.\u003c\/p\u003e\n\n\u003ch2\u003eGiai đoạn 2: Direct CLI Integration (Tháng 2\/2026) — Vấn đề synchronization\u003c\/h2\u003e\n\u003cp\u003eGiải pháp: loại bỏ intermediaries, để Claude gọi thẳng Codex qua Bash. Tốt hơn — nhưng nảy sinh vấn đề mới: synchronous bottlenecks. Claude phải đợi Codex respond trước khi tiếp tục. Pipeline trở thành sequential thay vì parallel.\u003c\/p\u003e\n\n\u003ch2\u003eGiai đoạn 3: tmux-Based Transport (Tháng 2-3\/2026) — Breakthrough\u003c\/h2\u003e\n\u003cp\u003eInsight quan trọng: đặt agents trong \u003cstrong\u003eneighboring tmux panes\u003c\/strong\u003e cho phép bidirectional, persistent communication với shared context — và quan trọng hơn, cho phép asynchronous operation.\u003c\/p\u003e\n\n\u003cp\u003eHai agents có thể làm việc đồng thời trong cùng terminal environment, giao tiếp qua tmux messaging, mà không cần đợi nhau. Đây là breakthrough thực sự.\u003c\/p\u003e\n\n\u003ch2\u003eKiến trúc \"Adventuring Party\" — tên không phải ngẫu nhiên\u003c\/h2\u003e\n\u003cp\u003eAlex đặt tên system theo D\u0026amp;D party của mình — mỗi \"nhân vật\" có role và strength riêng:\u003c\/p\u003e\n\n\u003ch3\u003eParty Session: 3 tmux panes\u003c\/h3\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003eCodex pane\u003c\/strong\u003e: Reviewer — GPT-5.3\/5.4, xuất sắc trong việc catch implementation bugs\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eClaude pane\u003c\/strong\u003e: Implementor — tạo ra code, architecture\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eShell pane\u003c\/strong\u003e: Test execution, build verification, evidence collection\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eMaster Session Orchestrator\u003c\/h3\u003e\n\u003cp\u003eSpawn và monitor nhiều \"party sessions\" cho batch task processing. Một orchestrator quản lý nhiều parties làm việc song song trên different features.\u003c\/p\u003e\n\n\u003ch3\u003eCustom TUI Tracker\u003c\/h3\u003e\n\u003cp\u003eBuilt với Bubble Tea (Go framework) — real-time progress monitoring dashboard hiển thị trạng thái tất cả agents và tasks.\u003c\/p\u003e\n\n\u003ch2\u003eEvidence System: Không ai tự approve work của mình\u003c\/h2\u003e\n\u003cp\u003eInsight sâu sắc nhất của hệ thống: \u003cstrong\u003eagents không thể self-approve\u003c\/strong\u003e. Alex build evidence system với JSONL logging tied to diff-hashes:\u003c\/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eMỗi task phải có documented evidence trước khi được approve\u003c\/li\u003e\n\u003cli\u003eEvidence được tie vào specific code diff hash — không thể dùng lại evidence cũ\u003c\/li\u003e\n\u003cli\u003ePRs bị reject tự động nếu thiếu verification documentation\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cblockquote\u003e\n\u003cp\u003e\"Separate your implementor from your reviewer, make agents prove their work with evidence, and never let anything self-approve.\" — Alex Ivison\u003c\/p\u003e\n\u003c\/blockquote\u003e\n\n\u003ch2\u003ePipeline 5 gates của mỗi task\u003c\/h2\u003e\n\u003col\u003e\n\u003cli\u003e\n\u003cstrong\u003eScope verification\u003c\/strong\u003e: Đối chiếu với requirements — agent có làm đúng những gì được yêu cầu không?\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eRED\/GREEN testing\u003c\/strong\u003e: Failing tests trước (RED), sau đó implementation (GREEN)\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eSub-agent critics\u003c\/strong\u003e: Code correctness check + bloat detection từ specialized critics\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eDeep multi-model review\u003c\/strong\u003e: Codex + Opus cùng review — hai models, hai perspectives\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eEvidence gate\u003c\/strong\u003e: Reject incomplete documentation — không có evidence = không có merge\u003c\/li\u003e\n\u003c\/ol\u003e\n\n\u003ch2\u003eDispute Resolution tự động\u003c\/h2\u003e\n\u003cp\u003eKhi Claude và Codex disagree về approach, system có automatic debate mechanism:\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eCả hai agents trình bày argument của mình\u003c\/li\u003e\n\u003cli\u003eOrchestrator tổng hợp reasoning\u003c\/li\u003e\n\u003cli\u003eDecision được log với rationale rõ ràng\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003eKhông cần human intervention cho mọi disagreement nhỏ — chỉ flag lên khi cả hai agents đều uncertain cao.\u003c\/p\u003e\n\n\u003ch2\u003eCross-model advantage: Tại sao cần cả Claude và Codex?\u003c\/h2\u003e\n\u003cp\u003eTesting thực tế của Alex xác nhận: reviewers catch implementation bugs mà implementors miss. Nhưng quan trọng hơn — \u003cstrong\u003ecác models khác nhau miss những bugs khác nhau\u003c\/strong\u003e.\u003c\/p\u003e\n\n\u003cp\u003eClaude thường mạnh hơn về architecture và long-context reasoning. Codex thường tốt hơn về catching specific implementation bugs. Kết hợp hai = coverage rộng hơn nhiều so với một model review hai lần.\u003c\/p\u003e\n\n\u003ch2\u003eTech Stack và Tools\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003etmux\u003c\/strong\u003e: Inter-agent communication backbone\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eGo\u003c\/strong\u003e: Testable, type-safe orchestration logic (thay thế Bash scripts)\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eBubble Tea\u003c\/strong\u003e: TUI development framework cho monitoring dashboard\u003c\/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eCustom skills\u003c\/strong\u003e: Enable natural agent-to-agent messaging\u003c\/li\u003e\n\u003cli\u003eGitHub: \u003ca href=\"https:\/\/github.com\/alexivison\/ai-config\" target=\"_blank\"\u003egithub.com\/alexivison\/ai-config\u003c\/a\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch2\u003eBài học thực tế\u003c\/h2\u003e\n\n\u003ch3\u003e1. Agents hiểu tmux một cách tự nhiên\u003c\/h3\u003e\n\u003cp\u003eKhông cần viết special skills để dạy agents cách dùng tmux — chúng hiểu terminal environment đủ tốt để navigate và communicate qua tmux naturally.\u003c\/p\u003e\n\n\u003ch3\u003e2. Terminal familiarity có giá trị cao\u003c\/h3\u003e\n\u003cp\u003eDeveloper quen với terminal environment sẽ build agent systems tốt hơn nhiều. Investment vào learning tmux, shell scripting pays dividends khi xây orchestration.\u003c\/p\u003e\n\n\u003ch3\u003e3. Abstraction layers mỏng tốt hơn dày\u003c\/h3\u003e\n\u003cp\u003eAlex deliberately tránh thick abstraction layers vì \"existing AI tools change fast enough that anything with a thick layer will lag behind on features.\" Bash script + tmux = maintainable. SDK wrapper on top of SDK on top of SDK = tech debt.\u003c\/p\u003e\n\n\u003ch2\u003eKhi nào áp dụng kiến trúc này?\u003c\/h2\u003e\n\u003cp\u003eKiến trúc Adventuring Party phù hợp với:\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eProjects có quality requirements cao — code đi vào production, không phải prototype\u003c\/li\u003e\n\u003cli\u003eTeams muốn automate code review hoàn toàn\u003c\/li\u003e\n\u003cli\u003eUse cases cần dual-model validation\u003c\/li\u003e\n\u003cli\u003eDevelopers thoải mái với terminal và Go\/Bash\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003eKhông phù hợp với:\u003c\/p\u003e\n\u003cul\u003e\n\u003cli\u003eQuick prototypes và exploration\u003c\/li\u003e\n\u003cli\u003eTeams chưa quen với terminal tools\u003c\/li\u003e\n\u003cli\u003eProjects nhỏ — overhead không justify\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch2\u003eSo sánh với Claude Code Agent Teams chính thức\u003c\/h2\u003e\n\u003cp\u003eKiến trúc của Alex predates và complements \u003ca href=\"\/en\/products\/claude-code-agent-teams-huong-dan-thiet-lap\"\u003eClaude Code Agent Teams\u003c\/a\u003e chính thức của Anthropic. Điểm khác biệt:\u003c\/p\u003e\n\n\u003cul\u003e\n\u003cli\u003eAlex's approach: cross-model (Claude + Codex), custom evidence system, Go orchestration\u003c\/li\u003e\n\u003cli\u003eOfficial Agent Teams: single-model (Claude only), built-in task management, simpler setup\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003eCả hai có use cases riêng. Official Agent Teams tốt cho speed và simplicity. Alex's approach tốt hơn khi cần dual-model review và rigorous evidence tracking.\u003c\/p\u003e\n\n\u003ch2\u003eTổng kết\u003c\/h2\u003e\n\u003cp\u003eThe Adventuring Party là ví dụ tốt nhất về DIY multi-agent orchestration trong năm 2026. Không phải vì technology phức tạp — mà vì design principles rõ ràng: tách implementor khỏi reviewer, require evidence cho mọi approval, và dùng minimal tooling thay vì thick abstractions.\u003c\/p\u003e\n\n\u003ch2\u003eNguồn tham khảo\u003c\/h2\u003e\n\u003cul\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/dev.to\/alexivison\/the-adventuring-party-from-sub-agents-to-multi-agent-orchestration-with-tmux-2edf\" target=\"_blank\"\u003eThe Adventuring Party: Multi-Agent Orchestration với tmux — Alex Ivison (DEV Community)\u003c\/a\u003e\u003c\/li\u003e\n\u003cli\u003e\u003ca href=\"https:\/\/github.com\/alexivison\/ai-config\" target=\"_blank\"\u003eGitHub Repository: alexivison\/ai-config\u003c\/a\u003e\u003c\/li\u003e\n\u003c\/ul\u003e\n","brand":"Minh Tuấn","offers":[{"title":"Default Title","offer_id":47725814055124,"sku":null,"price":0.0,"currency_code":"VND","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0821\/0264\/9044\/files\/the-adventuring-party-multi-agent-orchestration-v_i-tmux-t_-sub-agents-d_n-ai-team-th_c-s.jpg?v=1774574211","url":"https:\/\/claude.vn\/en\/products\/the-adventuring-party-multi-agent-orchestration-v%e1%bb%9bi-tmux-t%e1%bb%ab-sub-agents-d%e1%ba%bfn-ai-team-th%e1%bb%b1c-s%e1%bb%b1","provider":"CLAUDE.VN","version":"1.0","type":"link"}