DeepSeek 's latest collaborative paper with Peking University has lifted the veil on the Harness version of "Whale."
It's titled "A Programming Paradigm for Spatiotemporal Composability," translated into Chinese as "一套处理时空可组合性的编程范式".
It sounds a bit convoluted, but you just need to remember one sentence—
The entire text revolves around Cordis, the core of the black whale, a detachable "Lego baseplate."
Here, everything is a plugin, and everything can be reorganized.
This also explains why "Black Whale" is so open and why the official team actively encourages everyone to develop plugins and customize Harness.
It's a paper packed with information, also the culmination of the DeepSeek Harness team's long-term efforts, ultimately making a spectacular debut in the form of the Great Black Whale.
It's worth noting that this is DeepSeek 's seventh paper this year and the Nth time collaborating with Peking University.

Over eighty pages long, I went through the paper from start to finish and roughly compiled a few takeaways—
1. Cordis provides a set of universal dynamic composition semantics. Components managed through Context can be dynamically loaded, unloaded, and have their managed side effects automatically reclaimed.
2. The mathematical foundation comes from two classical concepts in type theory: effects and coeffects.
3. Not just a lab toy. This design has been running on the Koishi chatbot framework for four years, validated in production environments by over 4,000 community plugins.

And all of this serves the same ambition—
Self-Evolution.
Time and Space: The Two Hurdles for Harness Self-Evolution
There's a counterintuitive reality in the software world: most systems supporting plugins require restarting the entire host process after uninstalling a plugin.
This means that while only one plugin might be deleted, all other loaded plugins have to restart along with it.
Yes, a "plug-in" is actually plugged in and can't be pulled out.
VSCode is a typical case.
The paper states that as of June 9, 2026, among the top 100 extensions in the VSCode Marketplace, 87 contain executable code. Once activated, they cannot be individually unloaded at runtime; disabling or deleting them requires restarting the entire extension host.
This isn't a problem unique to VSCode. The paper points out that almost all plugin architectures have such defects, just to varying degrees.
In ordinary plugin systems, this is troublesome enough, but if the cost is just a restart, it's somewhat acceptable.
But in the context of Agents, it's a completely different problem.
A conventional harness is typically packed with a bunch of things: toolkits, execution environments, permission controls, sandboxes, session states, memory systems... It's an extremely complex engineering system in itself.
And now, it's met with the "Self-Evolving AI"—a mischievous Sun Wukong (Monkey King) who might accidentally modify itself out of existence.

This is also the angle from which DeepSeek 's paper approaches self-evolution:
Future Agents might generate a tool based on a task, install it into the runtime themselves, and if problems are discovered, replace it themselves.
If every time a single line of code is changed, the entire process has to be restarted, the accumulated context, cache—everything could crash.
This is called Temporal Composability.
If dependencies between modules rely on each module patching itself—checking for A today, guessing about B tomorrow... it's easy to inadvertently introduce circular dependencies, which will explode during reloading.
This is called Spatial Composability.
And these two difficulties are precisely the two problems Cordis aims to solve.
DeepSeek's Solution
First, let's supplement two mathematical knowledge points, which are also the two main theoretical pillars of this paper—
Effects and Coeffects.
Simply put, effects characterize "the program's impact on the world"; coeffects characterize "the world's constraints on the program." The two are dual concepts: effect systems enrich types, while coeffect systems enrich contexts.
But there's a problem: in the context of self-evolving AI, frameworks are dynamically loaded.
Classical effect/coeffect systems are static type system tools.
To overcome both the temporal and spatial hurdles simultaneously, the team adapted and upgraded these two concepts for Agent runtimes—"revertible effects" and "reactive coeffects."
Revertible effects target the temporal dimension.
The core definition is just one sentence: every modification to the context must have an explicit inverse function, making side effects reversible.
When loading a plugin, each state modification records the corresponding inverse function, stacking them sequentially into an "undo chain."
When unloading a plugin, this chain is executed in reverse, allowing the system state to be precisely restored to its state before the plugin was loaded.
Think of it like a stack of plates: the last one placed is the first one removed.
This way, the temporal order doesn't get messed up.
Reactive coeffects are responsible for the spatial dimension.
In Cordis, components can declare which dependencies they need, achieving resolvable dependencies.
For example, a chat plugin states it needs a message adapter and a database. It only becomes ACTIVE when both dependencies are satisfied. If one is missing, it stays INACTIVE—not rushing to start, nor running and then throwing a null reference error.
When a provider appears, dependents automatically activate. When a provider is removed, dependents stop first. After they roll back their own effects, the provider completes its unloading.
If a dependency provider unloads, dependents automatically deactivate; if the dependency comes back online, dependents automatically resume. This topological arrangement isn't manually written by developers but automatically derived from declarations.
The combination of the two constitutes the core of Cordis.
The intuitive meaning of "spatiotemporal composability" in the paper's title lies right here.
Koishi
So, has all this just been discussed been validated in practice?
Yes.
And the scale is not small.
The project used for experimental validation in the paper is a chatbot framework called Koishi.

Koishi is built on Cordis. Over four years, it has accumulated over 4,000 community plugins, covering instant messaging adapters, database drivers, admin consoles, and various user functions.
GitHub shows that Koishi is a cross-platform, extensible, high-performance chatbot framework.
Its name and icon design are inspired by the character Komeiji Koishi from Touhou Project.
Komeiji Koishi is a character known for unconscious actions. This name symbolizes the theme of chatbots and also embodies the passion developers poured into it.
A rather interesting README indeed.

So, what is Cordis?
The author of Koishi states that the name Cordis comes from the Latin word for "heart." Everything in Koishi starts from Cordis.
As a meta-framework, Cordis is not coupled to any specific domain or scenario.
The capability it provides is something most frameworks take for granted—a plugin system. But behind this system lies a goal most frameworks haven't achieved: reversibility.
And this sentence was left:
I hope it can become the core of future software (at least the software I develop).

Four years later, DeepSeek 's paper provides the validation.
First, validation of the temporal dimension.
In Koishi, an administrator can disable a plugin from the console. The plugin's impact on the system is rolled back on the spot, while other plugins continue to work.
During development, when a plugin is modified and saved, the modified plugin is reapplied, while caches and connections remain untouched.
Next, validation of the spatial dimension.
In the Koishi ecosystem, IM adapters provide message platform access, database drivers provide persistent storage, and functional plugins declare these as dependencies for direct access.
During actual operation, when switching storage backends or reconnecting adapters, only plugins whose dependencies have actually changed are reactivated. Plugins with unchanged dependencies remain completely still.
It's important to note that these plugins are typically developed independently by different authors. The only coordination between them is the reactive coeffect emphasized by Cordis.
This shows that a set of dynamic composition rules can indeed work in an open plugin ecosystem contributed by different authors.
But the paper doesn't package this case as a perfect demo either.
The team admits that currently, there's only validation data from the single ecosystem of Koishi and the single language of TypeScript, lacking controlled comparisons with alternative architectures...
But the most important thing is pointing out a new direction—a foundational infrastructure for Agent Harness serving self-evolution.
And now the released DeepSeek Harness is precisely the upgraded version of Koishi's Cordis.
Paper Author Introduction
Finally, let's talk about the paper authors as usual.
There are three in total, spanning Peking University and DeepSeek .

The first author is Yifan Shi, from Peking University and also a member of DeepSeek .
A deeper dive reveals that his name had already appeared in the DeepSeek V3 Technical Report.

The project used for validation in this new paper—Koishi—also originates from him.
Seems to have a strong attachment to "shi": real name Yifan Shi, project named Koishi, GitHub handle Shigma.
(doge)

Back on topic.
Koishi is a repository from four years ago, now with 5.7K stars. One could say this is the origin of everything.
Because the concept of Cordis was also proposed within Koishi.
In 2023, Shigma wrote a design article for the Koishi official documentation titled "Reversible Plugin System," almost the ancestor of this new paper.

Wei Zhang, also from Peking University, is an Associate Professor at the Software Research Institute, School of Computer Science, Peking University.
The school's website shows that Wei Zhang's research areas mainly cover software engineering and programming languages.

In 1999, he graduated with a bachelor's degree in Engineering Thermophysics from Nanjing University of Aeronautics and Astronautics. Subsequently, he shifted towards computer science, obtaining a Master's degree in Computer Science from Nanjing University of Aeronautics and Astronautics in 2002.
After his master's, Zhang Wei entered Peking University to pursue his Ph.D., earning a Doctorate in Computer Software and Theory in 2006.
After his doctorate, he directly took a position at Peking University and has since been engaged in research and teaching in software engineering, programming languages, and related directions.
Notably, as early as 2021 at ASE, Wei Zhang collaborated with Yifan Shi.

In 2024, the two published another ICSME paper together: "Focused: An Approach to Framework-oriented Cross-language Link Specification and Detection."

Finally, an old acquaintance.
Tianyi Cui, DeepSeek Harness Team Lead. Undergraduate graduate from Zhejiang University's Computer Science Department, junior to Wenfeng Liang.

During his studies, Tianyi Cui was admitted to Zhejiang University via NOIP/informatics competition recommendation and won gold medals in the ACM International Collegiate Programming Contest Asian Regional six times.
After graduation, he worked for nine years at Jane Street's Hong Kong and New York offices.

Paper Link: https://github.com/cordiverse/paperKoishi: https://github.com/koishijs/koishi
This article is from the WeChat public account "Qubit," author: Jay






