Two weeks ago I wrote about harness engineering as the discipline that replaces prompt engineering. The argument was straightforward: the system around the model matters more than the words you feed it. OpenAI said it. Princeton proved it. Blitzy benchmarked it.

Now a research group at Midea AIRC has published the first academic paper that tries to formalize what harness engineering actually means for personal AI agents. The paper is called "SemaClaw: A Step Towards General-Purpose Personal AI Agents through Harness Engineering" (arXiv 2604.11548, submitted April 13, 2026). It comes from the same team that built Sema Code, the open-source coding agent runtime. And it ships with working code.

This is not another blog post declaring that harnesses matter. This is an attempt to define the engineering discipline itself, complete with architecture, abstractions, and a running implementation you can install from npm.

What Makes This Different From the Last Harness Article

My earlier piece focused on evidence that harness design drives agent performance more than model upgrades. OpenAI's Codex team, SWE-Agent, and Blitzy all showed the same pattern: better scaffolding beats bigger models.

SemaClaw starts from a different place. Instead of asking "does the harness matter?", it asks "what should the harness contain?" The paper identifies three specific system-level problems that personal agents face, then proposes concrete mechanisms for each one.

This is the first paper I have seen that treats harness engineering as a first-class systems design problem rather than a collection of ad hoc tricks.

Three Problems, Three Mechanisms

The paper argues that personal agents face three engineering challenges that raw model capability cannot solve.

Orchestration. Real tasks are not linear. Planning a trip involves booking flights, reserving hotels, checking visa requirements, and coordinating schedules. Some steps depend on others. Some can run in parallel. Some fail and need recovery. Current approaches cluster at two extremes. Declarative workflow systems give you structure but not flexibility. Unconstrained agent loops give you flexibility but not traceability. The authors call out "pseudo-orchestration," where a so-called orchestrator agent just does all the thinking internally instead of producing a verifiable decomposition.

Safety. Agent safety is not model safety. The question is not whether the model generates harmful text. The question is whether it takes actions you did not authorize. Modifying files, calling APIs, executing code. Current open-source systems treat permissions as configuration or tool wrappers. That breaks down when execution paths are determined at runtime.

Memory. Personal agents need to accumulate knowledge across sessions. Not just retrieve past conversations. Retain preferences, learn conventions, build domain-specific understanding. Most current memory systems are log-oriented. They store history but do not consolidate it into reusable structure.

These three problems are not independent. They define the gap between a capable model and a production-ready agent system. That gap is what harness engineering closes.

DAG Teams: Structured Flexibility

The orchestration mechanism SemaClaw proposes is called DAG Teams. It is a two-phase approach.

Phase one: the LLM decomposes a task into a directed acyclic graph. Each node is a subtask. Each edge is a dependency. The agent decides the structure at runtime, so it can adapt to whatever the user actually asked for.

Phase two: a deterministic scheduler executes the graph. Each node runs when its dependencies are satisfied. If a node fails, the failure is isolated to that branch. The rest of the graph keeps running.

This is the hybrid the paper argues for. You get the flexibility of LLM-driven decomposition. You also get the observability and fault isolation of graph-structured execution. The orchestrator produces a plan you can inspect, not just an internal monologue you have to trust.

Each node in the DAG is grounded in a persistent agent persona. The agents maintain their identity across tasks. This is not a fresh model call each time. It is a team of specialized agents with stable roles.

PermissionBridge: Runtime Authorization as a Primitive

PermissionBridge is SemaClaw's answer to the safety problem. Instead of treating permissions as config files or tool-level wrappers, it embeds permission checkpoints directly into the agent runtime as first-class control primitives.

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 before proceeding. The agent can also initiate clarification requests on its own, asking the user for guidance when it encounters ambiguity.

The key architectural decision: authorization is not optional. It is not a wrapper you can remove. It is baked into the execution model. This matters because in open-ended personal agent deployments, you cannot predict which tools the agent will need or in what order. Permissions configured at install time go stale. Runtime checkpoints that adapt to actual execution paths do not.

Three-Layer Context Architecture

The memory architecture separates context into three distinct tiers, each with its own governance policy.

Working memory. The contents of the context window at runtime. Session-scoped. Immediately accessible. The direct input to every reasoning step. Managed through history compaction, which semantically summarizes earlier reasoning to preserve active constraints while discarding noise.

External memory. Persistent storage outside the context window. Accumulated across sessions. Injected on demand through retrieval. Uses hybrid search (BM25 plus dense vectors) to balance precision and recall.

Structured context injection. The stable identity and behavioral constraints that define who the agent is and what rules it follows. This includes SOUL.md files for agent persona and RULES.md for behavioral boundaries. These persist across sessions and do not get compressed or summarized.

The paper introduces a term I have not seen elsewhere: "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 source of context its own lifecycle and governance rules, instead of dumping everything into one undifferentiated stream.

Agentic Wiki: Knowledge Sedimentation

The fourth contribution is the agentic wiki. This is a personal knowledge base built from Markdown files that 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 to the other.

The paper calls this "knowledge sedimentation." The idea is that true persistence requires externalizing task-derived insights into a durable, user-owned format. Not a database the user cannot inspect. Plain Markdown files. The user retains absolute ownership over their compounding knowledge.

This is a practical design choice with philosophical weight. Agent memory that lives in an opaque vector database is memory you cannot audit. Agent memory that lives in files you can read, edit, and version-control is memory you own.

The Two-Layer Architecture

SemaClaw is built on a separation that deserves attention. The foundation is sema-code-core, an open-source event-driven agent runtime that handles context lifecycle, tool orchestration, and multi-tenant isolation. The application layer is SemaClaw itself, which adds channel integration, memory infrastructure, agent team coordination, and the plugin ecosystem.

This separation matters because it means the runtime can evolve independently from the application harness. You can use sema-code-core to build a coding assistant, a customer service bot, or something else entirely. The harness patterns SemaClaw demonstrates are reusable, but they are not the only patterns possible.

The plugin system has four layers: MCP tools (action space extension), subagents (reasoning delegation), skills (progressive context loading), and hooks (runtime control). Each layer addresses a distinct engineering concern. The paper argues that conflation of these concerns is a common source of fragility in agent systems.

How This Relates to Anthropic's Harness

Claude Code is the paper's primary example of mature harness engineering in production. It cites Claude Code's explicit context lifecycle management, persistent state isolation, hook-based execution control, and incremental skill loading as evidence that harness design shapes agent reliability.

But Claude Code is proprietary. Its harness is Anthropic's harness. You cannot inspect it, fork it, or adapt it to your own agent runtime.

SemaClaw fills that gap. It takes the principles that make Claude Code effective and implements them in an open framework you can actually use. PermissionBridge mirrors Claude Code's authorization model but makes it a runtime primitive rather than a product feature. The three-layer context architecture parallels Claude Code's context management but is documented and extensible. DAG Teams replace Claude Code's internal orchestration with an inspectable, graph-structured alternative.

The paper also cites empirical data from LangChain's Terminal Bench 2.0 experiments: 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. This is the same data point I cited in my earlier article. SemaClaw does not just cite it. It builds a framework designed to deliver those gains in the open.

What Is Missing

The paper is honest about its limitations. SemaClaw is a framework, not a finished product. The DAG Teams mechanism depends on the LLM's ability to produce correct task decompositions, which is not guaranteed. The wiki-based knowledge infrastructure requires the user to engage with it. PermissionBridge adds friction to every high-risk operation, which is the point but also a usability trade-off.

The GitHub repo (midea-ai/SemaClaw) is live and installable via npm. It ships with Telegram, Feishu, and QQ adapters, plus a React web UI. The documentation is currently only in Chinese, which limits accessibility for English-speaking developers.

The research group is at Midea AIRC, which is the AI research arm of Midea Group, a major Chinese appliance manufacturer. This is industrial research with a production motivation. The same group shipped Sema Code as a VS Code extension for internal use before open-sourcing it.

Why This Matters

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. But nobody has tried to formalize the design space for personal agents.

SemaClaw does three things that move the conversation forward.

First, it names the problems. Orchestration, safety, and memory are not ad hoc concerns. They are the defining engineering challenges of personal agents. Framing them as a coherent set gives the community a shared vocabulary.

Second, it proposes mechanisms, not just principles. DAG Teams, PermissionBridge, the three-layer context architecture, and the agentic wiki are concrete designs you can implement, test, and improve. They are not abstract calls for better engineering.

Third, it ships working code. You can install SemaClaw today. You can read the source. You can fork it. You can compare it to OpenClaw, which the paper explicitly acknowledges as inspiration. This is not a research prototype that lives only in a paper.

The ambition statement in the paper is worth quoting: "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 sooner we have open, documented, competing approaches, the sooner we figure out what actually works.


Suggested title: The Open-Source Harness Gets Formal: What SemaClaw Adds to the Conversation

Word count: 1,568

Citations:

Fact-check notes:

  • The 52.8% to 66.5% LangChain Terminal Bench 2.0 figure is cited in the SemaClaw paper and matches the figure I cited in the earlier harness engineering article. Verify against the original LangChain source if available.
  • The paper references "OpenClaw2026" as a motivating example of rapid personal agent adoption. This is a real project. The citation is appropriate.
  • SemaClaw's GitHub repo is live and installable. The documentation is currently in Chinese. Confirm npm package availability before publishing.
  • The paper states it is from "Midea AIRC," which is the AI research center of Midea Group. This is confirmed by the GitHub organization (midea-ai).
  • The paper mentions "Claude Code" as a mature harness engineering example but does not provide a direct citation beyond "Anthropic2025claudecode." Verify Claude Code's harness features match the paper's description if needed.
  • The Sema Code companion paper (arXiv 2604.11045) is a separate submission from the same research group, also submitted April 13, 2026. The SemaClaw paper builds on the sema-code-core runtime described in that paper.