Exploring Claude Code and Understanding the Agent Harness | A Conversation with Xinlu Lai

Exploring Claude Code and Understanding the Agent Harness | A Conversation with Xinlu Lai

May 5, 2026

🚥 Why Do We Say an Agent's Ceiling Comes from Its Harness? And What Exactly Is "Harness" Anyway?

Not long ago, Claude Code's source code leaked, giving the world a rare, complete view of the key modules that make up an Agent Harness — an extraordinary teaching specimen. During a period of rapid technological change, actively understanding new tech tends to yield outsized cognitive returns.

So this week on "Crossing," we're joined by Xinlu Lai to discuss Agent Harness. Xinlu is the founder of the ShareAI open-source community, and his tutorial Learn Claude Code has earned over 50k stars on GitHub.

In this episode, we break "Agent Harness" down from buzzword to engineering language, walking through its three-layer framework: running (execution layer) → running long (state layer) → running stable (governance layer). We also examine several mechanisms in Claude Code worth learning from: the philosophy of more context, less control; the "zero-context-management" philosophy; relay-style handoff strategies for long-horizon tasks; and the "dreaming" memory maintenance and iteration mechanism that makes Agents smarter the more you use them.

Xinlu runs a textbook one-person company and just closed a multi-million-dollar funding round. He also shares his distinctive take on OPCs — going so far as to argue that "in the future there will only be zero-person companies, not one-person companies" — a provocative and thought-provoking perspective.

🎬 Our video podcast is now live on Koji Yang Yuancheng's channels: WeChat Video, Xiaohongshu, Bilibili, and YouTube.

📒 The written version is published on the Crossing WeChat official account.

🟢 00:49 Rapid Fire: Age, alma mater, MBTI, zodiac sign, one-sentence company description, funding status, team size, pre-founder experience

🟢 01:52 Everything Outside the Model Is Harness

Mecha suits, brains, robots, IQ 120 — what exactly is Harness?

Everything outside the model is Harness

Does an Agent's ceiling depend on its Harness?

Model IQ is already between 120–170; Agent Harness is like a mecha suit — it doesn't boost intelligence, but dramatically expands capability

🟢 02:47 How Did You Get 50k Stars on GitHub?

This Agent tutorial wasn't originally written for others — it started as Xinlu's personal notes on "how to build Agents."

He began writing nine months ago, driven by a simple intuition: "Slap a web shell on Claude Code and you've got a powerful Agent product."

At the time, the open-source community was dominated by LangChain, LangGraph, and other prompt-pipeline approaches building "pseudo-Agents" — a factional divide between "Prompt Flow-Driven vs. Agent Native-Driven"

Is LangChain obsolete?

🟢 04:02 Bash Is All You Need

Now that Claude has launched Manager Agents, do people still need to build their own Harness?

Just as Next.js made most developers stop caring about underlying runtime internals, Agent Harness will likely converge to out-of-the-box solutions in two to three years.

But right now we're in a technology-cycle dividend window — not understanding Agent Harness means the Agent products you build "lack soul."

The PM of today and the PM of yesterday are fundamentally different species.

🟢 07:04 Three-Layer Harness Breakdown

Using a classic case study — writing a C compiler from scratch in two weeks via multi-Agent collaboration — what three layers does this actually traverse?

Layer 1: Execution Capability Layer — file CRUD, browser, language interpreter; what happens when permissions are misconfigured?

Layer 2: Context & State Layer — system prompt, skills, memory, and how Agents "relay the baton" when the context window fills up

Layer 3: Governance & Orchestration Layer — how do hundreds or thousands of Agents organize and collaborate? Why can't a testing Agent simultaneously hold permissions to modify code?

🟢 12:05 KB's K-Series Agent Toolchain

His company is called Komputer Blue, codename KB, with the mission of building a complete open-source infra by Agents, for Agents.

Komputer: Rewriting the Unix filesystem and bash in TypeScript to give Agents a "familiar living environment"; switches to WASM implementation when WebAssembly is available

Kruntime: The Agent Runtime layer, providing interfaces for humans to develop Agents and for Agents to spawn Agents

Kwatch: The Agent observability layer, analyzing where Agents get stuck in tasks to iteratively inform Agent design

Krl: Taking trajectory data accumulated by Agents at Runtime and using it for reinforcement learning or self-iteration of the context layer

🟢 13:55 vs. AWS AgentCore, Alibaba Cloud AgentBay

Cloud providers naturally want to own this layer too.

The core philosophy of the K-series toolchain: run Agents closer to users, in any environment that can run JavaScript — browser, extension, app, Electron, mini-program, static webpage, full-stack SaaS.

Differentiation: Reducing the Claw-Agent runtime to a lightweight KB-scale Unix virtual computer environment simulated by pure data structures, rather than stuffing a full Linux system and browser inside.

Xinlu believes the way to make Agents work well is to give each Agent its own dedicated computer, typically via VM. But most Agents don't actually need a real Linux VM for most of their work (and it's expensive). Heavy tools like compilers and browsers never belonged in the VM environment allocated to each Agent anyway.

🟢 17:38 Memory Schools of Thought

Fully structured (knowledge graph + vector search): Fine-grained knowledge structures supporting pipeline reasoning, rule-based. Xinlu dislikes this approach.

Semi-structured (Unix Files + Markdown + Agent-driven updates): How both Claude Code and Xiaolongxia do it. Claude Code's auto-dream mechanism: a background Agent triggers daily to "replay" recent sessions, correcting errors, merging, and updating memory — like dreaming.

Model internalization: Still ~3 years away from real production deployment. Memory is hard to extract in bulk and transfer losslessly, creating lock-in risk with single-sided model providers.

🟢 22:49 Consensus and Non-Consensus

Consensus: CLI is all you need — "Bash is all you need" was a slogan Xinlu wrote in his open-source repo nine months ago; it's now industry consensus.

Non-consensus: Most mainstream open-source Agent frameworks born between 2023–2025 are still on the old PromptPipe + Node Graph route — like assembly lines woven from gears and conveyor belts.

Unix has existed since 1971, with billions of Linux command samples in LLM pre-training data. MCP has only existed for two years, representing less than 0.1% of pre-training — which explains why CLI tools have higher task completion rates than MCP, and why the shell offers composability and secondary programming space for CLI commands.

🟢 26:33 Claude Code Source Leak: The Biggest Surprise

It showed everyone something: how much engineering work this company has done on "context management" that others haven't.

Context compression strategies: when to drop tool output, at what threshold to initiate handoff when the window fills, what to load when initializing the next Agent

Fork Agent mechanism: triggering a turn-stop hook at each round's end, forking an Agent to reuse KV cache for memory updates

Memory file format and skills follow the same philosophy: YAML in the first three lines, read description before full text

Xinlu's conclusion: "A good Harness must be self-consistent with the model's inference logic, and orthogonal to the direction of Agent model progress."

🟢 34:05 What Makes a Good Harness

Bad: Arbitrarily trimming context, causing frequent KV cache invalidation and expensive recomputation

Bad: Using Prompt Graph to rigidly control every decision — the stronger the model, the more constrained it becomes

Good formula: Good context space + good action space + less prompt control

Anthropic was the first to shift from QA model training to Agent model training in early 2025, leading other vendors by about half a year.

🟢 38:52 Three Directions Xinlu Is Bullish On

First: Agent Harness toolchain (what he's building himself)

Second: Agent networking — not sending IMs or email to Agents, but hybrid cloud/edge full-device networking; existing Tailscale isn't Agent-native enough, needs high-throughput context exchange and more control capabilities

Third: Agent model intensive training and inference infrastructure — the Tinker route (Thinking Machines Lab, OpenAI's former CTO's venture): intensive efficient training + LoRA hot-swappable inference, enabling more enterprises and individuals to obtain personalized Agent models better suited to their tasks at lower cost

🟢 44:09 Agent Future Hot Takes

"I think a lot of companies in the future will be financial products — built by experienced human teams, or even AI-generated directly, then self-operating."

Stages: Single Agent → Agent swarms → Agents self-managing & coordinating more Agents → Agents begin creating and inventing

OPC "one-person companies" aren't fundamental; 0PC "zero-person companies" are the future trend.

ZhenFund and Crossing's Token Grant support the YoYo Agent.

Future vision: Pull a card from your pocket. "This card is running 5 Agent-composed companies, generating billions in annual income for me."


Subscribe to "Crossing": 🚦 We track the industry transformations and new entrepreneurial opportunities brought by the new wave of AI technology.

🚦 "Crossing" is Steve Jobs' metaphor for Apple — standing at the intersection of technology and liberal arts, where great products are born. AI is transforming every industry. We seek out, interview, and bring together a new generation of AI founders and active builders in the AI era. Together with them, we explore and embrace the new changes, the new possibilities.

👦🏻 Host Koji: I founded Crossing, launched AI Hacker House — a community space for the new generation of AI founders — and serve as Venture Partner at ZhenFund. I believe technology, especially AI, represents the greatest value-creation opportunity of our generation. Koji on Jike | Koji's website

👧🏻 Host Ronghui: I co-founded Crossing, worked at a dollar-denominated VC, and spent five years as a Silicon Valley correspondent, tracking technological development and business stories. Feel free to reach out and chat. Ronghui on Jike