Two papers landed on arXiv on the same day from the same research group. That is not a coincidence. It is a coordinated argument.

On April 13, 2026, Midea AIRC published both "Sema Code" (arXiv 2604.11045) and "SemaClaw" (arXiv 2604.11548). Separately, each paper describes a specific system. Together, they make a bigger claim: the harness layer, not the model, is becoming the primary site of architectural differentiation in agent systems. The model is converging. The harness is where the real engineering happens.

This is the thread I want to pull on. Because if they are right, it changes where you invest your time and money if you are building agent systems.

What Is a Harness

A harness is the infrastructure that wraps a raw model and turns it into something you can actually deploy. Queuing, context management, permission checks, task decomposition, error recovery, multi-tenant isolation. The model generates text. The harness turns that text into reliable action.

We have known for a while that harnesses matter. OpenAI said it explicitly in February. Princeton's SWE-Agent proved it. Blitzy benchmarked it. LangChain's Terminal Bench 2.0 experiments showed a 13.7 percentage point gain from harness improvements alone, holding the model constant.

But knowing something matters and defining what it is are different projects. These two papers try to do the definition.

Sema Code: The Engine Without a Car

Sema Code starts from a specific observation. Most AI coding agents are monoliths. The reasoning engine, the user interface, the tool orchestration, and the context management are all tangled together in one application. You want to use the same agent in VS Code and in a terminal and in a Slack bot? You are rebuilding the integration each time.

Sema Code breaks this apart. It decouples the agent engine from the client layer. The core reasoning system becomes a standalone npm library. Any runtime can drive it programmatically.

This is not a wrapper. The paper describes eight mechanisms that the engine provides.

Multi-tenant isolation. Multiple users or projects can share one engine instance without cross-contamination.

FIFO queuing. Requests process in order. No starvation, no priority inversion.

Adaptive context compression. The context window fills up. Sema Code summarizes earlier reasoning to preserve active constraints while discarding noise. This is not simple truncation. It is semantic compaction.

Multi-agent scheduling. More than one agent can run concurrently. The engine manages coordination.

Todo-based process management. Tasks are tracked as persistent TODO items, not transient model outputs. The agent can pick up where it left off.

Four-layer async permissions. Permission checks happen at four distinct points in the execution pipeline. Each layer catches different classes of operations.

Three-tier ecosystem. Tools (MCP), skills, and plugins are separate extension mechanisms. Each addresses a distinct concern. Conflating them creates fragility.

Background task framework. Long-running operations do not block the main thread. They execute in the background and report results when done.

The same engine powers the Sema Code VS Code extension and the SemaClaw messaging gateway. One engine, multiple frontends. This is the point. The harness is not tied to any particular delivery interface.

SemaClaw: The Engine Meets the User

SemaClaw takes the Sema Code engine and extends its philosophy to personal AI agents. Not coding assistants. Personal agents. The kind that manage your schedule, book your travel, and maintain your knowledge base across sessions.

Personal agents face different problems than coding agents. The tasks are more open-ended. The failure modes are harder to predict. The user is not a developer who can read stack traces. So the harness needs different mechanisms.

SemaClaw adds four on top of the Sema Code foundation.

DAG Teams. A two-phase hybrid orchestration system. The LLM decomposes a task into a directed acyclic graph in phase one. Each node is a subtask. Each edge is a dependency. A deterministic scheduler executes the graph in phase two. Nodes run when their dependencies are satisfied. Failures are isolated to their branch. The rest of the graph keeps going.

This is a deliberate hybrid. Pure LLM orchestration gives you flexibility but no audit trail. Pure declarative workflows give you structure but no adaptability. DAG Teams try to give you both. The LLM decides the plan. The scheduler executes it verifiably.

PermissionBridge. Runtime authorization as a first-class primitive. When an agent wants to perform a high-risk operation, like modifying a file or calling an external API, PermissionBridge intercepts the request and requires explicit user authorization. The agent can also ask the user for clarification on its own.

The key design decision: authorization is not optional. It is not a config file you can delete. It is baked into the execution model. This matters because in personal agent deployments, you cannot predict which tools the agent will need or in what order. Permissions set at install time go stale. Runtime checkpoints adapt to actual execution paths.

Three-tier context management. Context is separated into working memory (the runtime context window, session-scoped), external memory (persistent storage across sessions, injected on demand via hybrid search), and structured context injection (stable identity and behavioral constraints like persona files and rule sets that persist across sessions without compression).

The paper introduces a term worth knowing: "context rot." This is the gradual degradation of reasoning quality that happens when irrelevant or stale content accumulates in the context window. The three-tier architecture prevents it by giving each context source its own lifecycle and governance rules.

Agentic wiki. A personal knowledge base built from Markdown files. Both the agent and the user can read and edit. The agent saves and organizes knowledge through a CLI. The user browses and edits through a web UI. Changes from either side are immediately visible.

The paper calls this "knowledge sedimentation." Task-derived insights get externalized into durable, user-owned format. Not a database the user cannot inspect. Plain Markdown files. The user retains absolute ownership over their compounding knowledge.

The Shared Argument

Read separately, each paper describes a system. Read together, they argue for something larger.

Sema Code says: the reasoning kernel should be a library, not an application. Decouple it. Package it. Let any runtime drive it. This makes the engine reusable across domains and delivery interfaces.

SemaClaw says: the engine alone is not enough. Personal agents need orchestration, safety, and memory mechanisms that the raw engine does not provide. Those mechanisms belong in the harness, not in the model.

The shared argument is that the harness layer is where architectural differentiation happens. As model capabilities converge across providers, the gap between a raw model and a production agent system becomes the competitive frontier. That gap is filled by harness engineering, not by better prompting or bigger parameters.

This is not a new observation. OpenAI made the same point in February. Anthropic's Claude Code demonstrates it in production. But these two papers go further. They try to define what the harness actually contains. They decompose it into mechanisms. They implement those mechanisms. And they ship working code.

Why the Separation Matters

The two-paper structure is itself an argument. Sema Code and SemaClaw are not one system. They are two layers of the same architecture.

The lower layer, sema-code-core, handles the runtime fundamentals. Context lifecycle. Tool orchestration. Multi-tenant isolation. Queuing. This is domain-agnostic. It does not care whether you are building a coding assistant or a personal agent or something else entirely.

The upper layer, SemaClaw, handles the domain-specific harness mechanisms. DAG orchestration. Runtime permissions. Three-tier memory. Knowledge sedimentation. These are designed for personal agents but built on the same engine that powers coding tools.

This separation means the runtime can evolve independently from the application harness. You can swap out SemaClaw's orchestration model without touching the core engine. You can build a completely different application harness on the same foundation. The harness is modular by design.

This is what makes the combined publication more than the sum of its parts. It is not just "here are two systems." It is "here is how you decompose the harness problem into layers, and here is evidence that the decomposition works."

What the Evidence Says

The SemaClaw paper cites LangChain's Terminal Bench 2.0 data: holding the model constant while improving only harness configuration raised task completion from 52.8% to 66.5%. That is a 13.7 percentage point gain from harness design alone. No model change. No prompt change. Just better scaffolding.

Sema Code does not include benchmark comparisons in the paper. But its architecture directly addresses the mechanisms that drove those gains. Context compression, multi-agent scheduling, and structured process management are the same levers that Terminal Bench 2.0 pulled.

The real evidence is the running system. Both Sema Code and SemaClaw are installable from npm. Sema Code ships as a VS Code extension. SemaClaw ships with Telegram, Feishu, and QQ adapters plus a React web UI. The GitHub repositories are live. You can read the source today.

What Is Missing

Both papers are honest about limitations.

Sema Code's eight mechanisms are designed but not all independently benchmarked. The claim that decoupling the engine improves composability is architectural, not empirical. You have to buy the argument on design grounds.

SemaClaw's DAG Teams depend on the LLM producing correct task decompositions. When the decomposition is wrong, the scheduler faithfully executes a bad plan. The deterministic scheduler gives you auditability, not correctness. Correctness still depends on the model.

PermissionBridge adds friction to every high-risk operation. That is the point. But it is also a usability trade-off that the paper acknowledges without fully resolving.

The agentic wiki requires user engagement. If you never read or edit the knowledge base, it degrades. The system gives you the tools for knowledge sedimentation. It does not force you to use them.

The documentation is currently in Chinese only. This limits accessibility for English-speaking developers, though the code itself is language-agnostic.

The research group is at Midea AIRC, the AI research arm of Midea Group. This is industrial research with a production motivation. Midea builds appliances. They have real deployment targets. That is a strength and a constraint. The systems are built for real use cases, but those use cases shape the architecture.

The Bigger Picture

Harness engineering has been a practice in search of a discipline. Teams at OpenAI, Anthropic, and various startups have built harnesses. Researchers have benchmarked their impact. OpenAI even named it explicitly. But nobody has tried to formalize the design space with working, open-source implementations.

These two papers do three things that matter.

First, they decompose the problem. The harness is not one thing. It is a stack of mechanisms. Context management is not permissions. Orchestration is not queuing. Each mechanism addresses a distinct failure mode. Treating them as separate concerns makes each one testable and replaceable.

Second, they separate the layers. Sema Code proves the engine can be a library. SemaClaw proves the application harness can build on that library without being coupled to it. This is the kind of modularity that lets the field iterate faster.

Third, they ship code. You can install both systems today. You can read the source. You can fork it. You can compare it to Claude Code or OpenClaw or whatever you are building. This is not a research prototype that lives only in a paper.

The SemaClaw paper puts it plainly: "SemaClaw's ambition is not to define the final architecture of personal AI agents. It is to advance the shared engineering foundation on which better architectures can be built."

That is the right frame. The harness layer is where agent systems will differentiate. The model war is converging. The harness war is just starting. The sooner we have open, documented, competing approaches, the sooner we figure out what actually works.


Suggested title: Harness Engineering Becomes a Discipline

Word count: 1,594

Citations:

Fact-check notes:

  • The 52.8% to 66.5% LangChain Terminal Bench 2.0 figure is cited in the SemaClaw paper. Verify against the original LangChain source if available before publishing.
  • Both papers list "Midea AIRC" as the affiliation. This is the AI research center of Midea Group, confirmed by the GitHub organization (midea-ai).
  • Sema Code's eight mechanisms are described in the paper (2604.11045) but the paper may not include independent benchmarks for each mechanism. The composability claim is architectural, not empirical.
  • SemaClaw's DAG Teams depend on LLM decomposition quality. The paper acknowledges this limitation. No benchmark data on decomposition accuracy is provided.
  • Both GitHub repos are live and installable via npm. The documentation is currently in Chinese. Confirm npm package availability before publishing.
  • The paper references "OpenClaw2026" as a motivating example. OpenClaw is a real project. The citation is appropriate.
  • Claude Code is referenced as a mature harness engineering example. Verify that Claude Code's features match the paper's description if needed.