{
  "video": {
    "id": "4kYl2_mqmnQ",
    "title": "I Run a Fleet of AI Agents Across Three Machines. Here's What Broke. - Kyle Jaejun Lee, KRAFTON",
    "duration": 551,
    "upload_date": null,
    "channel": "AI Engineer",
    "source": "AI Engineer",
    "event_format": "Online"
  },
  "analysis": {
    "video_id": "4kYl2_mqmnQ",
    "title": "I Run a Fleet of AI Agents Across Three Machines. Here's What Broke. - Kyle Jaejun Lee, KRAFTON",
    "one_liner": "A KRAFTON engineer who runs Claude Code agents across a MacBook and two always-on Linux boxes explains why he replaced a flat pile of tmux panes with a CEO/VP/manager/worker agent hierarchy whose state lives in files — and catalogues the five things that broke when one machine became three.",
    "summary": "Kyle Jaejun Lee argues that the first thing to break in a multi-agent setup is the human: sitting in front of six live contexts, he became the scheduler, the memory and the reviewer at once. His fix was to model the agents as an organization — CEO, VP, manager and worker as real entity types with scoped context and approval boundaries — to move agent state out of the context window onto disk, and to funnel every plan through a single blocking review gateway. He then walks through five concrete failures that appeared when he scaled from one machine to three (orchestrators doing the work themselves, unreadable tmux panes, OOM, colliding credentials, a laptop that rebooted and lost everything in flight) and the fixes for each. He ends honestly: one machine is solved, across machines is still rough, and the four remaining problems are the exact ones Kubernetes already answers.",
    "key_points": [
      "The fleet is three machines running daily: a MacBook for heavy coding and personal projects (which sleeps, because it's a laptop), Linux A for long-running coding tasks, Linux B for short-lived personal side projects — two operating systems, one control plane.",
      "The bottleneck was human attention: with four, five, six live tmux contexts, 'I'm not running agents anymore' — one human playing scheduler, memory and reviewer across six contexts doesn't scale.",
      "The unlock came from asking how a handful of executives run a company of thousands: they separate context so each person only sees their own slice. CEO/VP/manager/worker are real entity types in the system, not a metaphor — context flows down in slices, results flow up, and he reviews only what reaches the top, holding exactly one context instead of six.",
      "Agent state was moved out of the model's context window onto disk: a workspace per entity, cross-cutting rules in `shared`, machine-bound state under `machines`, and inside each workspace a mission, a current status and a handoff folder holding the actual work product.",
      "The single most practical lesson of the year: stop compacting, start resetting. Compaction is slow, he can't choose what survives, and whatever it drops is gone — so he clears the context completely inside Claude and lets the agent read back its own handoff and history files to resume. Context can be wiped and the machine can crash and the work still survives.",
      "Plans drift as they flow down the hierarchy, so he built a review gateway: any layer that wants to act submits its plan and blocks until he approves, at which point a hook fires the work off automatically. One web inbox, one control point — he never walks into the work windows anymore. The gateway itself was built by an infra team inside the fleet.",
      "Five failures when one machine wasn't enough: (1) orchestrators rolled up their sleeves and did the task instead of dispatching — fixed by a CLI harness with skills that call those CLIs, so dispatching is the only available path; (2) managers spawned so many worker panes in one window that the panes were too small to read and even `tmux capture-pane` couldn't pull anything meaningful out; (3) out of memory — activity monitor buried under Claude Code and MCP processes, swap almost full, no free memory; (4) Git credentials crossed over and bound to the wrong workspaces, fixed with a fully separated environment per workspace; (5) the MacBook ran out of capacity, restarted itself, and everything in flight was gone — answered with a single `overlord boot` command that brings the whole fleet back because all state sits in files.",
      "Cross-machine context transfer is deliberately boring: commit and push the context files with Git, poke the other machine with `tmux send-keys` over SSH telling it to pull, and the agent there reads the files and resumes. Two machines editing the same directory diverged, so machine-specific state got per-machine directories and shared state only changes through a pull request.",
      "Per-machine gateways recreated the multiple-inbox problem, so every machine now sends review requests over SSH into one main gateway hosted on an always-on Linux box — 'your one point of control can't be a thing that falls asleep.'",
      "His favourite failure: he went looking for a feature he'd built and could not remember which machine he'd built it on. Discord became the single router, one bot per machine (Mac, Linux A, Linux B), making his phone the remote control for the whole fleet.",
      "Four unsolved problems — consistency across machines, abstracting away local-only tools still stuck on the Mac (MCP servers, the browser), secure credential handoff between instances, and resource management — map exactly onto what Kubernetes already answers: an agent should declare what it needs, not where it runs. He plans to stack Kubernetes underneath for compute, secrets and tools, and build only the orchestration manager (task orchestration, review flow, context management) on top."
    ],
    "takeaways": [
      "Give agents an org chart instead of a flat pile: scoped context and an approval boundary per layer, so you hold one context rather than N.",
      "Persist agent state to disk — mission, status, and a handoff folder per workspace — then clear the context entirely rather than compacting, and let the agent re-read its own handoff to resume.",
      "Force delegation structurally: give the orchestrator a CLI harness and skills that call those CLIs so dispatching down is the only path it can take, rather than hoping it won't do the work itself.",
      "Route every plan through one blocking review gateway with a hook that fires work on approval, and host that gateway on an always-on machine — never on a laptop that sleeps.",
      "Separate per-machine state into per-machine directories and gate shared context behind pull requests; give each workspace a fully isolated credential environment.",
      "Before building cross-machine scheduling, secrets and tool access yourself, look at Kubernetes — reuse compute/secrets/tools and build only the orchestration layer on top."
    ],
    "topics": [
      "agents",
      "multi-agent-orchestration",
      "context-management",
      "claude-code",
      "tmux",
      "infrastructure",
      "kubernetes",
      "homelab"
    ],
    "tools": [
      "Claude / Claude Code",
      "tmux (capture-pane, send-keys)",
      "SSH",
      "Git",
      "MCP servers",
      "Discord bots",
      "Kubernetes",
      "KRAFTON",
      "macOS / MacBook",
      "Linux"
    ],
    "quotes": [
      {
        "text": "I've become the scheduler, deciding who does what. I'm the memory, holding what every one of them is doing, and I'm the reviewer, checking all of it. One human, three roles, six contexts. It does not scale.",
        "at": "01:07",
        "url": "https://www.youtube.com/watch?v=4kYl2_mqmnQ&t=67s"
      },
      {
        "text": "So, instead, I don't compact, I reset.",
        "at": "02:58",
        "url": "https://www.youtube.com/watch?v=4kYl2_mqmnQ&t=178s"
      },
      {
        "text": "An infra team inside the fleet built it. Agents building the tools that run the agents. I think that's kind of the whole point.",
        "at": "03:55",
        "url": "https://www.youtube.com/watch?v=4kYl2_mqmnQ&t=235s"
      },
      {
        "text": "Your one point of control can't be a thing that falls asleep.",
        "at": "07:22",
        "url": "https://www.youtube.com/watch?v=4kYl2_mqmnQ&t=442s"
      }
    ],
    "words": 1903
  },
  "summary_url": "/#4kYl2_mqmnQ",
  "transcript": {
    "html": "/transcripts/4kYl2_mqmnQ.html",
    "txt": "/transcripts/4kYl2_mqmnQ.txt",
    "vtt": "/transcripts/4kYl2_mqmnQ.vtt"
  }
}