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 AI Operating System

Harness engineering is the practice of designing the environment an AI agent operates within: the rules it follows, the checks it must pass, and the feedback loops that prevent the same mistake from recurring. Reliability is decided in that harness. Kortix is the open-source AI Operating System, and it keeps the harness in files you own.

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: Agents & permissions
Kortix docs: Agents & permissions/docs/project/agents
const cfg = loadConfig()                 // reads KORTIX_HARNESS, then the selected adapter's env
const selected = resolveHarness(cfg)
const runtime = selected.createService(cfg, projectEnv)
await runtime.lifecycle.start()

/kortix-ai/suna/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

2 adapters 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 (the AI Operating System)Yes
Claude CodeNo
Codex CLIYes, code on GitHub
OpenHandsYes, code on GitHub
Where the harness config lives
Kortix (the AI Operating System)agents/*.md and kortix.yaml in your git repo
Claude Code.claude/settings.json and CLAUDE.md, committed
Codex CLI~/.codex/config.toml plus project .codex/config.toml
OpenHandsSettings UI, or environment variables when self-hosted
Where the agent runs
Kortix (the AI Operating System)One isolated sandbox per session. Each session has its own isolated machine and branch.
Claude CodeYour machine, or a cloud session
Codex CLILocally on your computer
OpenHandsDocker on your machine, or OpenHands Cloud
Approval control
Kortix (the AI Operating System)Approval 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 (the AI Operating System)Any 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. On public benchmarks, the same model can place significantly higher or lower depending entirely on how that harness is built. Databricks paired GPT-5.5 with its OfficeQA Pro Agent Harness and scored 52.63%, up from 36.10% with GPT-5.4.

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.

Run agents whose harness you can read.

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