Note
Harness notes — Part 1
For half a year I kept hearing people say "harness."
Some meant a framework. Some meant a runtime. Some meant a whole agent product. After a while the word stopped meaning anything.
They do different jobs. Pick the wrong one and you spend weeks solving the wrong problem.
This note does one thing: walk seven common products one by one. For each, I say the everyday pain first, then what the product does, then when to use it and when to skip it.
What harness means here
By harness I mean the system around the model.
It runs tools. It holds permissions. It recovers when a step fails.
The model thinks. The harness makes the thought land, and keeps going after a failure.
Frameworks, runtimes, and products can all taste a little like a harness. They are still not the same thing. Below I talk by product, not by brand.
A short map
A one-line map of the seven, for later reference.
- LangGraph: durable graph runtime; resume after a crash.
- Deep Agents: opinionated harness on top of LangGraph.
- Claude Code: finished coding agent for a repo.
- Codex: same product shape from another lab.
- Pi: tiny harness you grow with extensions.
- dsh: open-source harness where everything is a Cordis plugin.
- Grok Bot: hosted multi-bot product with gates and routines.
1. LangGraph
You run a long chain of business steps. It dies halfway. You cannot resume by guessing. Someone may need to review mid-run.
That is the problem LangGraph sells into.
It sells durable execution. You draw a graph of steps. You checkpoint state (a saved snapshot so you can continue from that point). You resume after a crash. You park for human review.
Its lineage is Pregel and Beam, not a chat wrapper. It owns workflow shape, durable state, interrupts, and streaming.
It does not ship a coding agent's filesystem UX, permission product, or "one feature then commit" discipline. You bring those.
Use it when
- A multi-step workflow must resume without guessing.
Skip it when
- You only need model-plus-tools against a repo. You would pay for durable-workflow machinery you will not use.
2. Deep Agents
You want something that behaves like a coding agent. You still want to rewire it. You do not want to draw every graph edge by hand.
Deep Agents is for that.
LangChain's stack says it plainly. LangGraph is the runtime. create_agent is a thin harness. Deep Agents is the thicker one: planning tools, filesystem backends, subagents, skills, context management, shell, human-in-the-loop.
create_deep_agent() assembles those onto a LangGraph graph.
Against the Claude Agent SDK, Deep Agents is model-provider agnostic. The agent can sit inside a sandbox or outside it and drive a remote sandbox as a tool. That seam (a clean cut between a capability's definition, provider, and consumer so you can swap the whole group) matters for multi-tenant hosts.
Use it when
- You want a coding-shaped harness you can still rewire, without drawing every graph edge by hand.
Skip it when
- You want a sealed CLI product tomorrow morning.
- You want a Cordis-everything plugin tree.
3. Claude Code
The everyday job is a developer and a repo. Edit files. Run commands. Preview servers. Ask before risky permissions. Recover a failed step.
Claude Code (and the Claude Agent SDK under related products) owns that loop against a real environment.
Anthropic's long-running agents write-up shows harness lessons learned the hard way: initializer plus feature list, progress file, one feature per session, verify like a human in a browser, leave git clean for the next window.
Compaction alone (folding older turns into a summary to free context space) did not fix one-shotting or early "done." The fix lived in artifacts and session roles, not in a longer system prompt.
Use it when
- The job is a developer and a repo.
Skip it when
- You need a custom durable workflow graph that is not a coding session.
4. Codex
Same product shape for day-to-day coding in a repo. Another lab.
Codex CLI: local or sandboxed execution, tool loop, patches, tests, a developer in the loop. It is post-trained with its own tool surface (apply_patch and friends). Harness and model co-evolve.
Swap the patch tool carelessly and quality drops, even if the prompt looks fine.
Use it when
- Same band as Claude Code. Finished harness you run, not a library you compose. Choose by model fit, sandbox rules, and which failure modes you already hit.
Skip it when
- The job is not repo coding. Same reasons you would skip Claude Code.
5. Pi
Every token of context stays under your control. "Missing feature" means you write an extension.
Pi keeps the harness small on purpose. Default tools are read, write, edit, bash.
Interfaces share one loop: interactive TUI, print/JSON, RPC over stdio, TypeScript SDK (createAgentSession). A user message lands on the active branch of a JSONL session tree. Pi builds a request from system prompt, that branch, tools, and model settings. It streams the reply. It runs tools and records results. It continues or stops.
Compaction inserts a summary entry. Originals stay on disk. Context is assembled from base instructions, AGENTS.md, optional SYSTEM.md, tool defs, and on-demand skills. Extensions can inject or filter context every turn.
What Pi refuses to bake in is the product. Sub-agents, plan mode, permission gates, path protection, SSH, sandboxing, heavier MCP: build as TypeScript extensions or install a Pi package. Extensions run in-process with the same OS permissions, so project trust comes before project resources.
Use it when
- Every token of context must stay under your control, and "missing feature" means "write an extension."
Skip it when
- You need a multi-surface app family.
- You need a hosted multi-bot control plane with draft gates already welded in.
6. dsh
One harness family across web, headless, and SDK surfaces. A tree you can dump and patch. A loop you can replace.
DeepSeek Harness (dsh) is DeepSeek's open-source harness (developer preview). Everything is a plugin on Cordis.
Model adapter, tool registry, session log, and the agent loop are all plugins. Unload a plugin and its registrations unwind. A profile (web, headless, sdk, sdk-minimal, acp, desktop) stacks ordered bundles, then patches. dsh --profile web --dump-config prints the tree you boot.
dsh-base shares adapters, tools, persistence, sandbox and approval policy, credentials, telemetry. Each surface adds transport.
Core map: ctx.sessions, ctx.systemPrompt, ctx.tools, ctx.agents, ctx.agentLoop, ctx.llm. A step is one model request plus its tools. A turn is zero or more steps.
Flow: claim inbox → assemble → agent/pre-step waterfall → freeze history from the log → stream → tools/pre-execute → execute → post-execute → next step or stop. The session log is the source of what the model sees. Capability seams let one provider swap move filesystem, bash, and LSP together, including onto a remote sandbox.
Use it when
- You need one harness family across surfaces, a dumpable patchable tree, and a replaceable loop.
Skip it when
- You want a fifty-line mental model.
- You want a hosted product with identity and connectors already productized. Read the safety notice; preview APIs break.
7. Grok Bot
Many agents work under your identity. Gates, wake schedules, and connectors are already wired. You do not want to fork a minimal open loop from scratch.
Grok Bot is a hosted product harness: named bots, a shared bot computer, Temporal-hosted runs (Temporal: the layer that hosts long jobs as recoverable workflows), chat as the control plane.
Long jobs go to background workers. Repository PRs go to Cursor cloud agents. The parent stays available and delivers results.
Skills load by name with progressive disclosure. Routines wake bots on schedule or events with saved delivery rules. Memory keeps profile and journal facts outside one window. Consequential sends draft first. Auto-review can block risky calls. Credentials sit in a vault. Connectors and a signed-in browser are governed tools. Many bots share one computer with different envelopes.
Coding compute prefers Codex CLI or Cursor Models first. Chat, dispatch, verify, drafts, memory, and send gates stay on Grok Bot. That routing is harness policy written as a skill.
Use it when
- Many agents must work under your identity with gates, routines, and connectors already wired.
Skip it when
- You need a minimal open loop to fork this weekend.
- You need a Cordis tree to dump and YAML-patch.
How to choose
| Job | Product that usually fits |
|---|---|
| Resume a crashed multi-step workflow | LangGraph |
| Coding-shaped harness you can rewire on a graph runtime | Deep Agents |
| Day-to-day coding in a repo with a sealed product | Claude Code or Codex |
| Minimal loop, context engineering, TypeScript extensions | Pi |
| Multi-surface app, everything replaceable via plugins | dsh |
| Hosted multi-bot work under my accounts, with gates | Grok Bot |
Harness and scaffold
One last cut, so the words stop swapping.
A scaffold is the layer that composes many calls and keeps state across failures and restarts. A harness wraps model turns with tools, permissions, and per-step recovery.
Deep Agents sits on LangGraph because those layers compose. Pi, dsh, Claude Code, Codex, and Grok Bot are different products on the harness side of that cut. They are not substitutes for each other.
Takeaways
- Name the product and the job before copying a feature.
- Prefer artifacts the next turn can read over a longer prompt.
- Keep the refusal point before the side effect.
- Steal on-demand skills from Pi, seam tables from dsh, progress files from Anthropic's long-running write-up, and chat/worker/cloud split from Grok Bot. Put each into the product that already matches the job.
References
- LangChain on Deep Agents / LangGraph and the Claude Agent SDK comparison
- Anthropic on effective harnesses for long-running agents
- How Pi Works
- dsh architecture
- Living inside Grok Bot