Back to Blog

Codex Harness vs DeepSeek Harness: Agent Runtime Guide

Tutorials and Guides2616
Codex Harness vs DeepSeek Harness: Agent Runtime Guide

Information cutoff: August 2026. DeepSeek Harness remains in developer preview (v0.1). Official documentation warns breaking changes may occur. All capability descriptions are subject to official updates.

Introduction

Within AI agent engineering, the term “Harness” refers to the runtime supporting infrastructure built upon large language models. It governs tool dispatching, context management, session persistence, sandbox isolation, permission control, and retry‑oriented error handling. A concise formula widely adopted by practitioners is: Model + Harness = Agent

Foundation models determine what an agent is capable of understanding, while the Harness layer defines how the agent executes real‑world tasks. OpenAI Codex Harness and the newly open‑sourced DeepSeek Harness (dsh) released in August 2026 are two representative implementations of this formula. However, they follow opposing design philosophies in terms of extensibility and encapsulation. This article compares their positioning, core architecture, replaceable components, security models, observability, operational modes, cost structure and ecosystem compatibility, and delivers practical selection guidance for engineering teams. When operating multi‑model agent deployments across heterogeneous backend services, developers may consider an API gateway such as 4sapi to streamline request orchestration.

1. Product Positioning: Turn‑key Finished Product vs Composable Low‑level Framework

The divergence between the two projects originates from their core positioning.

DimensionOpenAI Codex HarnessDeepSeek Harness (dsh)
Core positioningReady‑to‑use AI coding agent productAgent runtime framework
Open‑source statusCore source code open‑accessMIT‑licensed open‑source
Model bindingPrimarily tied to OpenAI GPT‑5‑6 familyModel‑agnostic, compatible with roughly 40 model vendors
Main delivery formsChatGPT desktop Codex Tab, CLI, cloud serviceWeb UI(127.0.0.1:3080), CLI, Python SDK
MaturityProduction‑grade commercial productv0.1 developer preview, breaking changes expected
Initial releaseMay 2025August 13, 2026

Codex Harness follows a closed‑boundary philosophy: the vendor delivers a fully‑functional agent, and developers extend behaviours through Skills, MCP protocols and hooks within predefined boundaries. Core runtime logic remains opaque to downstream developers. By analogy, Codex Harness resembles a finished smartphone: hardware and software are tightly integrated, end‑users can install applications but cannot modify underlying system internals.

DeepSeek Harness adopts a composable mindset. It does not enforce fixed agent behaviours. Instead, it supplies modular runtime building blocks for engineers to assemble custom agent implementations. A coding agent is merely one possible assembled outcome. Metaphorically, dsh acts like an Android or Lego hardware baseplate: nearly every functional component can be replaced or re‑combined.

2. Architecture Philosophy: Privileged Monolithic Kernel vs Fully Plugin‑oriented System

2.1 Codex Harness: High‑performance privileged monolithic kernel

Codex Harness is built around a Rust‑implemented monolithic kernel. Core logic including main‑loop iteration, tool scheduling and context handling is baked inside the kernel binary. Developers may extend peripheral capabilities with MCP, hooks and configuration files, yet they cannot alter fundamental kernel execution logic. Major behavioural adjustments have to wait for official upstream releases.

Advantages of monolithic privileged‑kernel design

Trade‑offs Community contributors cannot modify kernel internals. Ecosystem expansion is constrained to officially‑supported extension interfaces.

2.2 DeepSeek Harness: Kernel‑free pure plugin tree built on Cordis

DeepSeek Harness promotes the principle “Everything is a Plugin”. Model adapters, tool registries, skill sets, session logging, sandboxes, storage, scheduling modules, UI layers and even the core agent loop are implemented as swappable plugins. There exists no privileged kernel that cannot be replaced. Extensions are realised by attaching new plugins alongside existing plugin instances.

Its underlying foundation is the Cordis framework originating from open‑source work by Koishi author Shigma, co‑published by DeepSeek and Peking University. Cordis focuses on two core composability properties:

  1. Temporal composability: When plugins are unloaded, all side‑effects including event listeners and service registrations roll back completely, restoring system state.
  2. Spatial composability: Plugins explicitly declare dependency relationships. The runtime automatically resolves loading sequences.

Plugins communicate through Service and Event patterns, following Definition‑Provider‑Consumer capability modelling. Providers can be swapped without modifying consumer code.

2.3 Philosophy comparison summary

ItemCodex HarnessDeepSeek Harness
Core implementationRust monolithic kernelCordis micro‑kernel plus plugin tree
Replaceable scopeOuter‑layer tools, prompts and hooksEvery component, including agent main loop
Extension methodConfigure within official extension interfacesSwap or hot‑swap plugins for recomposition
Open hierarchyApplication‑layer extensionsAssembly‑layer composition, broader capability boundary and larger governance scope

An important counterpoint: highly composable plugin architecture expands governance burden. Codex users only manage tool sets they enable. dsh operators must maintain the full assembly of plugins, requiring corresponding testing, version control and rollback strategies.

3. Replaceable Component Comparison

DeepSeek Harness abstracts nearly every functional layer into replaceable plugins. This constitutes its most visible architectural gap compared with Codex Harness.

Componentdsh default implementationdsh supported alternativesCodex equivalent capability
Model adapterDeepSeek official adapterAnthropic, OpenAI, Ollama local models, around 40 vendors totalRestricted to OpenAI‑family endpoints
Tool collectionFile system + ShellArbitrary custom plugin toolsBuilt‑in tools plus MCP protocol
SandboxLocal process isolationDocker, E2B remote sandboxKernel‑level Seatbelt / Landlock, fixed
Session logLocal event stream file storageCloud storage, remote databaseImmutable conversation history, cannot fully replay internal execution
Agent loopStandard ReAct patternCustom‑defined inference strategiesHard‑coded, non‑replaceable
UI layerBuilt‑in Web UICustom TUI, community‑developed skinsDesktop / IDE client, fixed official presentation

Developers can launch dsh rapidly with the shell command: npx @deepseek‑ai/dsh web.

4. Security Model: Hard Immutable Boundary vs Programmable Policy

4.1 Codex Harness: Kernel‑enforced non‑bypassable sandbox

Codex implements sandboxing at kernel level. macOS leverages Seatbelt while Linux utilises Landlock system‑call filtering. Risky file‑system and system operations are blocked directly inside OS system‑call layers.

Key traits:

This makes Codex Harness particularly suitable for auditing untrusted external pull‑requests, temporary workspaces and CI/CD automation workflows.

4.2 DeepSeek Harness: Sandbox as a configurable plugin

dsh ships no single hard‑coded security enforcement unit. Sandbox implementations and approval policies are themselves plugins.

Core distinction: Codex supplies a tamper‑proof safety fence. dsh provides blueprints and building materials for developers to construct fences. Greater freedom transfers partial security responsibility to application operators.

5. Session and Observability: Conversation History versus Append‑only Event Sourcing

Observability represents one of dsh’s most differentiated features.

Codex Harness maintains standard conversation history. Session recovery is supported, yet it does not persist complete raw request payloads. Engineers cannot precisely reconstruct the full context observed by the model at each inference step.

DeepSeek Harness adopts append‑only event‑sourcing architecture. The design principle is “everything visible to the model gets logged”. System prompts, user prompts, inference steps and context injections all flow into a single immutable event stream. Session restore, branching, replay, reproduction and persistent debugging are built upon this stream.

Four major capabilities derived from event‑sourcing:

  1. Traceability: Locate mis‑behaviour within context and tool‑call sequences instead of only examining final outputs.
  2. Restorability: Session states persist independently of volatile in‑memory runtime.
  3. Reproducibility: Re‑run past event streams against different models, tool sets or policy configurations for comparative testing.
  4. Evaluability: Build evaluation datasets and regression test suites directly from historical event logs.

The bundled Trajectory View visualises full agent execution paths. Important caveat: observability does not equal security. Event logs contain sensitive context data. Operators must enforce retention policies, data redaction and access controls. Event streams record what has occurred but do not automatically block malicious plugin behaviour.

6. Runtime Profiles and Operational Capabilities

DeepSeek Harness defines four built‑in assembly profiles for quick plugin combination: standard, code‑mode, minimal and cordis creation‑mode. It supports headless deployment via Python SDK for batch file‑processing and cycled task dispatching, covering scenarios where interactive graphical interfaces are unnecessary.

Codex Harness excels at multi‑client and cloud‑native workflows. ChatGPT web interface, Codex Tab desktop application, CLI, IDE integrations and Codex Cloud support up to six parallel thread pipelines. Tasks can be triggered through GitHub, Linear or Slack webhooks, with mature graphical parallel‑task management.

7. Cost Structure Analysis

Cost ItemCodex HarnessDeepSeek Harness
Framework licensingSubscription‑based tiersMIT open‑source, users only pay model API consumption
Typical model expenseGPT‑5.4 pricing appliesMatches pricing of selected backend model, supports low‑cost V4‑Flash
Overhead characteristicPredictable subscription plus API chargesFramework itself is free; total cost depends on token consumption of assembled plugins and selected LLM

Harness‑level overhead becomes a meaningful variable. Identical tasks running on different Harness implementations can diverge significantly in total token consumption, which directly shapes per‑task operational expenses.

8. Ecosystem and Compatibility: Competitive or Stackable

A frequently overlooked capability: dsh ships optional sub‑agent adapter plugins for Codex and Claude Code, disabled by default. It can parse binary task payloads and delegate workloads to those agents. Hooks configuration enables hybrid mixed‑agent deployment. The two frameworks are not mutually exclusive.

One feasible production‑grade combination pattern for 2026:

Configuration files from both systems (AGENTS.md for Codex, settings.yaml for dsh) can coexist within the same repository.

9. Decision‑making Selection Matrix

RequirementRecommended ChoiceJustification
Out‑of‑the‑box usage, minimal configurationCodex HarnessMature commercial product, stable experience
Audit untrusted external code and pull‑requestsCodex HarnessNon‑bypassable kernel‑level sandbox
Graphical parallel‑task managementCodex HarnessCodex Tab plus cloud multi‑threading capability
Deep customisation of agent main‑loop runtimeDeepSeek HarnessFully‑replaceable plugin‑based architecture
Switch dynamically among multiple model back‑endsDeepSeek HarnessModel‑adapter abstraction supports dozens of providers
Cost‑sensitive batch workloadsDeepSeek HarnessMIT‑licensed framework, compatible with low‑cost open‑weight models
Audit, replay, branching and regression evaluationDeepSeek HarnessNative append‑only event‑sourcing
Build and resell custom agent productsDeepSeek HarnessMIT licensing permits deep modification and redistribution
Production‑critical stable pipelineCodex Harness (current)dsh explicitly warns of incoming breaking pre‑release changes

10. Conclusion

Codex Harness and DeepSeek Harness represent two fundamentally distinct engineering paths for building AI agents.

Codex Harness encapsulates complexity on the vendor side to deliver simplicity for developers. Its Rust monolithic kernel, kernel‑enforced sandbox and multi‑client concurrency deliver strong performance, security and consistency. It is a polished finished product.

DeepSeek Harness transfers complexity and flexibility to developers. Built on Cordis micro‑kernel and the everything‑as‑plugin paradigm plus event‑sourcing logging, it unlocks extensive composability, auditability and evolutionary potential. It is a highly malleable agent construction toolkit.

Short‑term, Codex Harness holds advantages in maturity and security hardening. Long‑term, DeepSeek Harness’s composable, replaceable and replay‑capable architecture offers greater evolutionary potential. The two frameworks are not pure competitors. They can function in stacked hybrid setups: orchestration, policy tuning and loop logic can be split across layers. Engineering teams may adopt different Harness systems for separate sub‑workloads according to business constraints.

Learn more:https://4sapi.com

Tags:Codex HarnessDeepSeek HarnessAI AgentAgent RuntimeCordisPlugin ArchitectureAgent Security

Recommended reading

Explore more frontier insights and industry know-how.