Every Effect Carries Its Inverse: The Paper Underneath DeepSeek Harness
“Everything is a plugin” is the slogan on the box. The actual claim lives in a paper almost nobody opened: a plugin's side effects can be completely reverted on unload, with the runtime holding the inverse. That is what lets DeepSeek Harness have no privileged core — the agent loop itself is a swappable row in a config tree. Plus the router-worker prototype, where the budgeted resource is human attention.

Every effect carries its inverse: the paper underneath DeepSeek Harness
Hello everyone, Pink is back.
DeepSeek Harness has 276,962 GitHub stars as I write this, which it collected in under three months. The slogan everyone repeats is everything is a plugin. That slogan is doing the project a disservice, because it sounds like a plugin count, and a plugin count is the least interesting thing about it.
The interesting thing is one sentence in the repository's own architecture document:
"There is no privileged core to patch: you extend dsh by mounting a plugin beside the others, and registrations are effects that unwind when their plugin unloads."
That second clause is the whole design. And it rests on a paper — arXiv:2608.25512 — that I suspect almost nobody who starred the repo has opened.
My older sister Mint wrote the public version, including the part where two separate projects are being conflated. This is the engineering half.
1. The problem every plugin system actually has
Think about what happens when you install a plugin into a normal agent framework. It registers a tool. It subscribes to an event. It patches a prompt section. It opens a file watcher. It adds a middleware. It stashes something in a module-level registry.
Now unload it.
In practice, you can't — not cleanly. Some registrations have an unregister, some don't, some have one that's wrong. The usual remedy is to restart the process, which is an admission that installation is a one-way operation.
For a long-running agent this is worse than annoying. An agent harness is exactly the kind of software where you want to add a capability mid-session, try it, and take it back out if it misbehaves — and exactly the kind where a restart costs you the session state you were trying to preserve.
Cordis attacks this head-on, and it starts by noticing that "composability" is two problems, not one:

Temporal composability — "the ability to completely revert a component's side effects upon removal."
Spatial composability — "the ability to declare and reactively manage inter-component dependencies."
These are orthogonal, and most plugin systems give you a weak version of the second and none of the first.
2. Revertible effects, and why the runtime holds the inverse
The mechanism for the temporal axis is the part I'd put on a slide:
"...we formalize revertible effects, in which every context transformation carries an inverse that the runtime holds, establishing temporal composability local to one component."
Read that carefully, because the placement matters. It is not "plugins should provide a cleanup function." Plugins already can, and they get it wrong. It is that the inverse is produced as part of performing the effect, and held by the runtime, not by the plugin author's discipline.
So when a plugin registers a tool, the registration is an effect, and the act of registering hands the runtime the thing that undoes it. Unload the plugin and the runtime replays the inverses. The plugin author doesn't write teardown code; there's nothing for them to forget.
The spatial axis gets the dual treatment:
"...we formalize reactive coeffects, in which every context change is classified against a component's coeffect specification to drive its activation and deactivation."
A component declares what it requires from the context. The runtime watches the context, and when the requirements stop being satisfied, the component deactivates — automatically, not by polling or by a dependency-ordering convention. When they're satisfied again, it activates.
Then both get unified:
"We then unify the effect context and the coeffect context into a single context type and mediate every effect and coeffect through it, yielding a discipline we call the context paradigm; the mediation induces an observational equivalence up to which the effects of distinct components interleave without disturbing one another."
That last clause is the payoff. It is a statement about isolation between plugins, and it is proved rather than asserted — the paper gives a calculus of dynamic composition "whose metatheory carries spatiotemporal composability from a single component to a whole system of interleaved components."
Whether the metatheory survives contact with a real TypeScript codebase is a separate question, and I have not audited that. But the ambition is the right ambition, and I have not seen another agent harness that even states it.
3. What "no privileged core" buys you concretely
Here is where the theory shows up as something you can type.
A running dsh is not an application with plugins attached. It is a plugin tree composed at boot from ordered layers:

Layers apply onto an empty entry list — that phrase is in their docs and it is the design in four words. Then: the profile's ordered bundles, the profile's cordis.patch.yml, the home patch, then --patch overlays. A patch targets a row by id and replaces its whole config, or inserts new rows.
Shipped profiles: web, headless, sdk, sdk-minimal, acp. Bundles like dsh-base (model adapters, tools, persistence, sandbox and approval policy, settings, credentials, telemetry) are the shared first layer.
And you can see the whole thing:
dsh --profile web --dump-config
"Any row it prints can be replaced by a patch of your own."
Now look at what the rows are:

core/agent-loop — "the default driver implementing that interface" — sits in that table like any other row. The agent loop is a default, not a foundation. If you want a different control flow — a planner, a state machine, a dataflow graph — you don't fork the project and you don't beg for a hook. You mount a different ctx.agentLoop.
Three event domains keep the seams honest, and the distinction is worth copying even if you never run dsh:
- Session events — durable facts appended to the log, broadcast via
session/event. "Use one when the fact must survive a reload." - Agent events (
agent/*) — carry a liveAgent: inbox, step, status, request, validation, continuation. "Use one to observe or intercept work in flight." - Capability events — attach policy and adapters to a seam (
fs/*,tools/*,telemetry/*) "without importing the loop."
That third category is the one most codebases lack, and its absence is why policy code ends up tangled into the control flow.
Their vocabulary is also unusually precise, which I appreciate: "a step is one model request plus the tools it calls. A turn is zero or more steps: it opens before its first input is claimed and closes once nothing is owed."
4. The other project: attention as the budgeted resource
dsh-superagent-prototype is a different repository — created 31 October, 21,492 stars, MIT — and DeepSeek labels it bluntly: "Research prototype for reference only, not an official DeepSeek product... much of the engineering done by coding agents." It also warns that "some designs discussed in the article are directions for future development and are not implemented in this prototype."
Take it as a design document with running code attached, not a product.
Its premise inverts the usual multi-agent pitch. The bottleneck isn't model capability; it's that a person can follow roughly three to five active agent sessions before losing track of which is blocked, which is waiting on approval, and which two are quietly editing the same PR.
So the stated objective is:
"Take as little human attention as possible, and give as much value as possible."
"Every part of the project is judged by the attention it costs. A message, a notification, a question, a setting, a panel element and a paragraph of documentation each cost someone's attention, and each has to give more value than that, or it is removed."
I want to dwell on that for a second, because it is a design constraint with a unit. Most agent products optimise capability and treat notifications as free. This one treats human attention as the scarce budget and makes every feature justify its draw against it. A panel that "lists first what waits for a person" and where "a healthy state takes no space" falls out of that principle rather than being a UX opinion.

The structure, in the repository's own nouns:
- A main Session is the long-lived router. It opens Tickets, tracks them, relays worker reports. It does not write code.
- The Executor gives "one Session and directory per Ticket." Workers never address a human; they report to the router, which is the single voice the human hears.
- WorkerSlots reserves capacity before a launch. A human message may use one slot beyond
maxWorkers, and wakes have priority over launches — a nice touch: the human is allowed to jump the queue. - Failures retry with exponential backoff: launch at 5 s doubling to 300 s, three times; delivery and relay at 2 s doubling to 60 s.
- Throwing
Laterdefers work without counting a failure — e.g. when no worker slot is free. Backpressure and failure are different things, and conflating them is a classic bug.
The design choice I find most instructive: the router assigns and tracks; it does not decompose. The common pattern is a lead agent that splits a task into steps and supervises them, which makes the lead a bottleneck and a single point of confusion. Here the router's job is deliberately simple enough that a smaller, cheaper model can hold it, while the expensive model goes where the actual work is.
5. What to change on Monday
Ask of any plugin system: who holds the inverse? If the answer is "the plugin author writes a teardown function," your system is reversible by convention, which means it isn't. If unload can't restore the pre-install state, you don't have plugins — you have a one-way installer with extra steps.
Separate backpressure from failure in your retry logic. Later versus a counted failure is a two-line distinction that prevents a queue from eating its own retry budget when it's merely saturated. Most agent queues I've read do not make it.
Give your policy code its own seam. The capability-event idea — attach policy and adapters to fs/*, tools/*, telemetry/* without importing the loop — is the cheapest structural improvement in this whole piece, and you can adopt it in an afternoon in any codebase.
Put a unit on human attention and make features pay it. Count the messages, questions and notifications your agent emits per completed task, and treat that count as a cost you must justify. If you ship an agent that works for a team, it can also waste a team.
And if you're evaluating dsh itself: read SAFETY.md first. It says the software "has not undergone a security audit and must not be treated as secure or production-ready," that it can "execute model-generated code and commands, load third-party plugins, and access the network, processes, credentials, and files made available to it," and that sandboxing and approval prompts "do not guarantee isolation." The README adds, in capitals, that there will be compatibility-breaking changes. Disposable VM, least privilege, read the plugins.
6. The part I keep coming back to
A 35,000-plugin ecosystem on a harness whose author says it has had no security audit is two facts that belong in the same sentence more often than they appear in one.
But I don't think the honest reading is "therefore avoid it." The honest reading is that the reversibility work is the thing that could eventually make an ecosystem like that safe to have. A plugin whose effects provably unwind is a plugin you can run, watch, and remove — and "remove and leave no trace" is a precondition for ever sandboxing one properly.
Right now that property is a paper, an implementation, and a very large pile of stars. Whether it holds under adversarial plugins is a question nobody has answered publicly, and it is the question I'd most like to see someone attack.
What I'll say without hedging: this is the first agent harness I've read where the extensibility story starts from a formal property rather than from a hook list. Even if the metatheory turns out to be stronger than the implementation, that is the right place to start, and it is a bar other harnesses should now be asked to clear.
Source notes
Read directly at the source. The architecture quotations, the layering model, the shipped profiles, the core-package table with its ctx keys, the three event domains, and the turn/step definitions: docs/architecture.md in github.com/deepseek-ai/deepseek-harness, read 9 November 2026. The safety quotations: SAFETY.md and README.md of the same repository. The composability definitions, revertible effects, reactive coeffects, the context paradigm and observational equivalence: the abstract of arXiv:2608.25512, A Programming Paradigm for Spatiotemporal Composability, Yifan Shi, Wei Zhang and Tianyi Cui, 26 August 2026. The router-worker structure, the WorkerSlots behaviour, the backoff figures and Later, plus the attention principle: README.md, docs/000-philosophy.md and docs/007-architecture.md in github.com/deepseek-ai/dsh-superagent-prototype. Star and fork counts: the GitHub API, same day.
Could not reach the original. The design article Exploring Super-agent Design: Towards a More Autonomous Agent System is named in the prototype's README but is not in the repository and is not linked from the Harness site. I could not find it. The "three to five active sessions" figure is attributed to it by several independent outlets, and the attention principle I quote is verbatim from the repository's own philosophy document — but I have not read the article itself.
Reported elsewhere, not verified by me. MindStudio's write-up reports timing results from that article — a mean task time of 12.4 minutes against a single-session baseline, and per-decision time falling from 6.4 s to 1.6 s as load rose. Those numbers are not in any repository document I could find, MindStudio cites no link, and I could not reach the original, so I have deliberately left them out of this piece and out of the charts. I mention them only so you know they exist and know their provenance.
Not verified. I have not run dsh, audited the Cordis implementation against its paper, or tested whether effect reversal holds under adversarial plugins. Everything above is a reading of published documents.