How Codex Harness and DSH Subagent Reveal a New Architecture Layer for Agents
Upgrading DSH to version 0.1.0‑rc.8 shows that Codex and Claude Code can be invoked as subagents, exposing the internal Harness execution system and prompting a discussion of whether agents are forming a new runtime layer in software architecture.
Upgrading DeepSeek Harness (DSH) to 0.1.0‑rc.8 makes Codex and Claude Code appear as subagents, turning them from direct tools into callable agents and prompting a deeper look at the emerging architecture layer.
First layer: the Agent execution entry is opened
Codex exposes its Harness
OpenAI defines the Harness as the execution system surrounding a model, handling dialogue state, streaming, tools, sandbox, approval policies and multi‑turn tasks. The open‑source repository lists the CLI, SDK, app‑server, Skills and Plugins as the publicly available components; the model‑access and hosting services remain private.
The app‑server acts as a control‑interface and event‑translation layer. It converts external requests into thread, turn and run_turn operations, then forwards core events to the client.
External host → app‑server → thread/start → turn/start → run_turn → model sampling & tool execution
Calling thread/start prepares configuration, working directory, sandbox, permissions and creates the core thread with event subscriptions. turn/start, turn/steer and turn/interrupt all return to the same thread, while run_turn handles sampling, tool result injection, input processing, context compression and cancellation.
Different entry points serve different use cases: codex exec for one‑off CI tasks, the SDK for streaming or resumable jobs, and the app‑server for full lifecycle management (thread, turn, events, approvals).
DSH integrates Codex and Claude Code as subagents
In rc.8 the two models are packaged as installable profile bundles. After installing, the parent Agent sees the named tools subagent_codex and subagent_claude_code. The call flow splits into two phases: the parent Agent decides whether to delegate and which tool to use; DSH registers the adapter, launches the process, manages the background job, handles cancellation and collects the result.
The provider configuration binds a fixed providerName and toolName. The model sees stable tools ( subagent_codex, subagent_claude_code) while the actual runtime is chosen by the host.
Parent Agent calls subagent_codex → DSH starts Codex app‑server → creates temporary thread → starts a turn → waits for turn/completed → returns final answer to the parent Agent
Claude Code follows the official Claude Agent SDK, launching a compatible CLI, issuing a single query and returning the result.
rc.8 still a one‑shot delegation
Each subagent launch spawns a new process, temporary thread and turn; there is no persistent session, shared memory, or unified timeout/rollback. Cancellation and process cleanup are supported, but side‑effects are not automatically rolled back, and concurrent subagents may conflict when modifying the same files.
Second layer: Agents as a new software‑architecture tier
Higher granularity of composition
Earlier work on MCP and the Agent stack split responsibilities into Context, Loop, Harness and Environment. Codex and Claude Code now bring their own Loop, state and permission system, adding a layer above plain tools.
model call → tool call → agent call
This shift turns the problem from “how does a tool use a capability?” to “how does a complete Agent get invoked by another system?”. The author notes that agents differ from ordinary services: they handle natural‑language tasks, maintain multi‑turn context, request approvals for sensitive actions, and produce self‑descriptive results rather than strict business facts.
Agent orchestration splits control
Parent Agent : decides delegation, selects subagent, organizes task, chooses sync or async execution.
DSH runtime : exposes tools, registers adapters, launches processes, manages jobs, handles cancellation and result collection.
Codex / Claude Code : maintain their own context, run the Agent Loop, execute tools, enforce sandbox and approval policies.
Business system & users : provide authoritative facts, decide whether actions are permitted, and verify final outcomes.
Harness as a potential new infrastructure layer
OpenAI’s ARC‑AGI‑3 experiment reports that keeping inference state and applying context compression raises the GPT‑5.6 score from 13.3 % to 38.3 % while cutting token usage to one‑sixth. The improvement stems from the execution infrastructure, not from a stronger model.
Thus Harness can be seen as the execution foundation for the Agent era: the model supplies reasoning, while Harness manages state, Loop, tools, sandbox, approvals and events. It does not replace business back‑ends; business systems still own facts, authorizations and final acceptance.
OpenAI still marks the app‑server command and WebSocket transport as experimental, not production‑ready. DSH rc.8 lacks shared long‑term memory, continuous collaboration and unified acceptance, so the runtime layer is not yet mature.
In summary, Codex app‑server and DSH Subagent expose a complete Agent as a callable tool, moving agents toward a Runtime layer that architects must consider for scheduling, execution control, approval workflows and result accounting.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Architect
Professional architect sharing high‑quality architecture insights. Topics include high‑availability, high‑performance, high‑stability architectures, big data, machine learning, Java, system and distributed architecture, AI, and practical large‑scale architecture case studies. Open to ideas‑driven architects who enjoy sharing and learning.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
