With DeepSeek Harness, AI coding agents are no longer black boxes.

This episode explores DeepSeek Harness’s Cordis plugin framework, which treats AI coding agents as modular systems rather than rigid black boxes. The architecture relies on spatiotemporal composition to ensure system stability through mathematical reversibility and strict dependency tracking. Every plugin transformation is registered with an inverse function via ctx.effect to guarantee the baseline state remains preserved after unmounting. Additionally, a turn and step model logs execution across session, agent, and capability domains to enable precise state reconstruction.
Update, September 2026: this article has been updated for DeepSeek Harness v0.1.7. See the What’s New section below.
Key Takeaways
- The Cordis plugin framework treats language models as cognitive engines while making memory, tools, and sandboxes modular swappable components.
- Mathematical reversibility is enforced by requiring every plugin transformation to register a precise inverse via the ctx.effect function.
- Spatial composability proactively disables downstream modules if a dependency vanishes to prevent execution errors before they occur.
- Execution is tracked using a turn and step model partitioned into session, agent, and capability event domains.
- The system uses append-only logging to create a mathematically exact history that allows developers to rewind and replay specific states.
Chapitres
00:00Flipping the AI Black Box01:13Mathematical Reversibility02:33Spatial Dependency Mapping03:06Turn and Step Execution Model05:22Future Autonomous Agents
What Is DeepSeek Harness?
DeepSeek Harness is an agent framework published by DeepSeek in the deepseek-ai/deepseek-harness repository on GitHub. Its documentation describes it as a configurable runtime that assembles agents from model adapters, tools, session services, execution backends, permission policies, interfaces and agent loops. The guiding principle is simple: everything is a plugin.
Under the hood, DeepSeek Harness relies on Cordis, a vendored plugin framework. A Cordis context acts as a repository of services: plugins reach capabilities through stable keys such as ctx.llm or ctx.tools instead of direct imports, and declare their dependencies in an inject field so that activation order is resolved automatically. If you read our article on DeepSeek R1, this is the other half of the story: the model provides the reasoning, the harness provides a controllable runtime around it.
Mathematical Reversibility With ctx.effect
In DeepSeek Harness, prompt sections, tool schemas, adapters, providers and listeners are installed through ctx.effect(). The effect body runs when the plugin loads and returns a disposer that runs when the plugin unloads. Developers never call that disposer themselves: the framework does it for them.
The practical consequence is reversibility. A plugin can be unloaded by a configuration edit, a hot reload, an explicit disposal or the loss of a required service, and everything it registered is removed with it. Disposers start in reverse registration order, mirroring the way the effects were stacked, so the context returns to its baseline state.
Spatial Composability and Dependency Tracking
Every Cordis plugin moves through a defined lifecycle: PENDING, LOADING, ACTIVE, UNLOADING and DISPOSED. When a required service is not available, the plugin waits in the PENDING state instead of starting in a broken configuration. When a service it depends on disappears, the dependent plugin is unloaded and waits until the service becomes available again.
For teams building agents, this removes a whole class of runtime errors. A capability that depends on a sandbox provider or a specific model adapter simply cannot run without it, and it comes back automatically once the dependency is restored.
The Turn and Step Execution Model
DeepSeek Harness separates execution into turns and steps. A step contains one model request, the tool calls it generates and their results. A turn may contain zero or more steps. Each boundary is an interception point where extensions can rewrite input, reject a step, observe requests or modify execution.
Events are split into three domains. Session events record durable facts such as user messages, tool calls and results. Agent events cover live execution, such as pre-step processing and validation. Capability events attach behaviour to the agent while reducing direct coupling between plugins.
Append-Only Logging, Replay and Governance
In DeepSeek Harness, the session log is more than an audit file: it is the source from which the model-visible history is derived. The rule is that what the model sees must be logged. Because the log is append-only, a session can be resumed, forked, replayed and evaluated reliably.
The same discipline applies to security. Tool calls pass through guarded stages: pre-execution validation, permission handling, provider execution and post-processing. Approval and sandboxing are kept independent, because an approval dialog is not a filesystem boundary and a sandbox is not a substitute for user intent. For organisations that must demonstrate control over AI agents, reversible plugins combined with a replayable log provide a solid basis for auditability.
What’s New in DeepSeek Harness v0.1.7 (September 2026)
The video and the sections above were produced before the v0.1.7 release cycle. The core concepts (Cordis plugins, ctx.effect(), dependency tracking and the append-only session log) remain valid. DeepSeek Harness is still a developer preview under the MIT license, and the latest pre-release at the time of writing is v0.1.7-rc.2 (24 September 2026). The main changes relevant to this article, according to the official release notes:
- Plugin Manager: plugins can now be installed, configured, activated and removed at runtime, which makes the reversible plugin model directly usable from the product.
- Session logging V4: the session log format was upgraded, with migration tools for developers.
- MCP on the official SDK v2, with resource discovery and URI templates.
- Headless mode: tasks from stdin, session continuation with
--session-idand JSON event output with--json. - Configuration as plugins: settings persist through the Profile plugin, and agent presets moved from directory storage to plugin bundle declarations.
- Operations: scheduled tasks with run history, session archiving and restoration, and a manual approval option in auto review mode.
Always check the release notes before relying on a specific API: the project is moving fast and interfaces may still change.
Sources et liens
DeepSeek Harness et Cordis Framework

- DeepSeek Harness : Everything is a Plugin éditeur
- Cordis Explained: How DeepSeek Harness’s Plugin Framework Works article
Reversibilité mathématique et ctx.effect
- A Programming Paradigm for Spatiotemporal Composability papier
- Cordis – The Plugin Kernel Behind DeepSeek Harness source primaire
Composabilité spatio-temporelle
Turn and Step Execution Model et Logging
- DeepSeek Quietly Built a Different Kind of AI Agent Framework article
- Cordis: Spatiotemporal Composability, Plugin Systems, and DeepSeek Harness documentation
- Playlist Tech & IA YouTube
ai-coding deepseek-harness codex-framework system-stability software-architecture