Skip to content

For teams whose agents keep repeating the same mistake

Harness engineering: own the harness files in an open-source repo

The open-source CompanyOS

Harness engineering decides how reliably an agent works: the rules it follows, the checks it must pass, and the loops that stop a failure from repeating. Reliability is decided in that harness. Kortix is the open-source CompanyOS and keeps the harness in files you own, which is why it is my pick, and I work on Kortix’s marketing, so weigh that accordingly.

Open source · Any model provider with your own keys · Approval gates you set

harness.tsOne box, one harness, for the life of the box.
Kortix docs: Developers, what a new project contains
const cfg = loadConfig()                 // reads KORTIX_HARNESS, then pi's env
const selected = resolveHarness(cfg)     // piDefinition
const runtime = selected.createService(cfg, projectEnv)
await runtime.lifecycle.start()

/kortix-ai/CompanyOS/blob/dev/apps/kortix-sandbox-agent-server/src/harness/README.md

Three controls a harness owns

Each one is a file a reviewer can open, diff and roll back.

Guides and sensors

The check runs before the edit and after it.

A linter steers the change on the way in, a test reports on what came out, and the same failure cannot pass twice.

In the repoorder-total.diff
 src/orders/total.ts-  return items.reduce(sum) + tax+  return items.reduce(sum, withTax)

lint · typecheck · test: pass

Permissions

Each tool carries its own allow, ask or block.

The agent edits its own branch without a prompt and stops on the one call that reaches production.

In the repoconnector-policy.md
  • read the repoallow
  • edit the branchallow
  • deployask

policy in the manifest

Swappable harness

The harness is a module the box resolves at boot.

A preflight answers what a switch would cost before anyone makes it, and the log records the switch when it happens.

In the repoharness-boot.md
  • adapterpi
  • unknown idboot fails
  • per-request switchnone

one adapter registered

Where the harness lives in four agent tools

What matters is where the rules live, who can change them, and what runs the agent.

Open source
Kortix CompanyOSYes
Claude CodeNo
Codex CLIYes, code on GitHub
OpenHandsYes, code on GitHub
Where the harness config lives
Kortix CompanyOSagents/*.md and kortix.yaml in your git repo
Claude Code.claude/settings.json (committed) and ~/.claude/settings.json; CLAUDE.md holds the project instructions
Codex CLI~/.codex/config.toml plus project .codex/config.toml
OpenHandsSettings UI, or environment variables when self-hosted
Where the agent runs
Kortix CompanyOSOne isolated sandbox per session. Each session has its own isolated machine and branch.
Claude CodeYour computer, or a cloud session
Codex CLILocally on your computer
OpenHandsDocker on your computer, or OpenHands Cloud
Approval control
Kortix CompanyOSApproval gates you set. Off until you set them.
Claude CodeAllow, ask and deny rules in settings
Codex CLIapproval_policy and sandbox_mode in config
OpenHandsAsks first; flags to auto-approve
Model choice
Kortix CompanyOSAny model provider with your own keys
Claude CodeClaude models; third-party providers on some surfaces
Codex CLIChatGPT plan, or an API key
OpenHandsAny LLM provider with your API key

The harness boundary is a file you can read today

Open source here means the adapter, the manifest and the rules around them are yours to read, fork and audit.

Questions the discipline raises

What does harness engineering change about reliability?

It moves reliability into the environment around the model, the part LangChain calls the harness. Databricks measured that the same model can place significantly higher or lower depending entirely on the harness it runs in (Databricks).

Where do you start with harness engineering?

With the mistake that just happened. Fix it in the environment rather than in the prompt: a lint rule, a test, a hook, or one line the agent reads every session. Then commit those files and review them like any other code.

Does harness engineering apply to non-coding agents?

Yes. Guides steer any agent before it acts and sensors check what it produced after, so a research agent gets a source check on the way in and a citation check on the way out. The checks change with the job; the structure does not.

The harness is a file you can read

Read the manifest, then the prompt file it points at.

Your agents, skills, memory and connectors live in one git repo you own: your whole company as code (Kortix on GitHub). Approval gates you set. Off until you set them. A control you add after a failure lands in a diff.

Run agents whose harness you can read.

Agents, skills, company memory and connectors in one git repo.