Summary: Designing the environment around a coding agent, or any task agent, so it can work autonomously for long sessions and converge on correct, production-ready results. The agent must understand the project, act like a practitioner (run code, tests, environments, browsers), and get reward signals telling it whether it’s on track. Guardrails are enforced in the flow rather than requested. Cloud vendors now sell the harness as a managed service (Amazon Bedrock AgentCore Harness): pick a model, a system prompt, tools and skills, and the platform handles memory, sessions, hosting and model swaps in a few clicks. Among AI-native companies the bottleneck has moved to continuous harness improvement: models are considered smart enough, so when an agent errs “the harness is to blame”, and production traces are clustered into failures that feed simulation and RL; it is also usually an easier place to improve than the model’s weights. A harness is built and torn down at once: add scaffolding where the model falls short, and remove it as new models make it redundant (“build harnesses, don’t fall in love with them”). Labs predict the harness itself will move into the model within months, and whether harness or model matters more is contested, so the durable investment is context and memory, which serve either. Frontier models work best with their own lab’s harness, and one builder argues every model deserves a harness tailored to it, much of it as agent-friendly CLIs rather than plugins. That is also insurance if frontier models become scarce. Domain teams often build no harness at all: Kritt only orchestrates prompts that run on the Claude Agent SDK or Codex SDK. Purpose-built harnesses beat generic ones, the environment and tools an agent can reach matter as much as its skills, measuring where you stand matters as much as the harness, and infrastructure (durable objects, sandboxes) is catching up for long-running agents. For business agents, an internal platform can also separate the two jobs: a definition language lets non-engineers change agents in a day, while engineers harden the runtime.
Key ideas
-
Terminology: the harness is Claude Code, Codex, Cursor agent; tools like NanoClaw/OpenClaw are orchestrators that use a harness (langtalks—73-harness-engineering).
-
In a plain chat session the only “reward” is your one prompt; the agent doesn’t know if its code works or fits the product (langtalks—73-harness-engineering).
-
OpenAI started a fresh repo in Aug 2025 with 3 engineers; it passed 1M lines within months and average productivity grew as engineers were added (langtalks—73-harness-engineering).
-
Key pattern: instead of “try harder / check yourself 10 times”, ask the agent what capability it’s missing to verify its work, build that tool, and make it part of the enforced flow (langtalks—73-harness-engineering).
-
Three alignments before trusting output: spec (product), plan (technical), proof of work (it actually runs). See ai-verification (langtalks—73-harness-engineering).
-
Prediction (hosts): within months to a year, most code will be written autonomously by background agents. The bottleneck shifts to human code review (langtalks—73-harness-engineering).
-
Success metric: productivity per token, rising over time not only with smarter models but with each internal tool you add (langtalks—73-harness-engineering).
-
Choose stacks for agent autonomy: TypeScript and cloud-first (React Native even for a mobile app) so agents can run and verify in the cloud with your laptop closed (langtalks—70-our-claude-code-tips).
-
Every agent PR spins up a full preview environment (DB, services, load balancers) via Pulumi/Kubernetes, or MirrorD mirrors only the changed container into a shared dev cluster (langtalks—70-our-claude-code-tips).
-
Prefer CLIs over MCPs where possible; they’re simpler for agents (langtalks—70-our-claude-code-tips).
-
The biggest blocker is often plain DevOps: no per-developer environment, shared broken staging, no log access. Map where developers copy-paste between systems and wire those gaps (MCP, tokens, CLI, environment infra) (langtalks—68-ai-sdlc).
-
The single most valuable investment for R&D orgs now: an internal platform for agents (environments, docs for internal tools, dev setups) (langtalks—63-wake-up).
-
Infra is catching up for long-running agents: Vercel and Cloudflare (Durable Objects) make stateless serverless functions stateful, replacing a 4–5-piece stack (queues, Redis memory). Sandboxes (Cloudflare, Vercel, Daytona, E2B) run agent code without risk (ignore-instructions—20-idan-benyon-build-ship-grow, idan-benyon).
-
A harness is two opposite processes at once: building scaffolding where the model’s freestyle intuition falls short (tools, memory, execution environment, what not to do) and removing it as new models make steps redundant or bloat the prompt, “like a startup” (ignore-instructions—26-ai-cyber-pavel-gurevich, pavel-gurevich).
-
A purpose-built harness beats generic ones; agent companies with enough traction and data eventually train their own model on open weights for cost and speed (as Cursor did with Composer) (ignore-instructions—26-ai-cyber-pavel-gurevich, pavel-gurevich).
-
Long tasks (8–12 hours) need a cloud environment, memory across runs, and coverage reporting: the agent should show where it looked, not just “found nothing” (ignore-instructions—26-ai-cyber-pavel-gurevich, pavel-gurevich).
-
Measuring where you stand can matter as much as the harness itself (ignore-instructions—26-ai-cyber-pavel-gurevich, pavel-gurevich).
-
“Harness” is overloaded: Mann reserves it for the loop that runs skills and tools, with an OS-like layer, applications, and plugins built above it, like CPU → OS → apps (startup-for-startup—362-agent-architecture-fit, roy-mann).
-
3D-printer analogy: early printers needed constant fixing; modern ones add a hundred engineering layers (laser bed scans) so a 40-hour print just works. Agents “don’t fully work yet”, and roughly a decade of engineering above the LLM is the opportunity (and why forward-deployed engineers exist) (startup-for-startup—362-agent-architecture-fit, roy-mann).
-
From rails to a cage: monday’s first sales agents ran “on train tracks”, predictable but unable to use what models can do. AgentOS gives the agent maximum freedom inside system-enforced policies. Krispin prefers a Pac-Man image: the agent chases its goal, hits a wall, turns back and keeps going (startup-for-startup—370-agentos-month-to-day, raz-diskin, moshe-krispin)
-
Decouple business from engineering: every small agent change used to need code, PR, merge and tests. An Agent Definition Language (ADL), compiled into a runtime on LangChain’s Deep Agents, lets go-to-market engineers change policies, skills and tools or build a new agent themselves, cutting agent build time from a month to a day. Engineers work on platform scale and robustness instead (startup-for-startup—370-agentos-month-to-day, moshe-krispin, raz-diskin)
-
Platform capabilities such as properly used long-term memory are hard engineering problems with direct business impact; building them once serves every agent on the platform (startup-for-startup—370-agentos-month-to-day, raz-diskin)
-
Next step: self-improving agents that analyze hundreds of variables (lead type, origin, timing) and suggest changes to their own instructions, or ask for a missing tool (“can I send this customer a bottle of wine?“) (startup-for-startup—370-agentos-month-to-day, raz-diskin)
-
Frontier models work best inside their own lab’s harness (Claude with Claude Code, GPT with Codex) because they were built for each other; the weaker or older the model, the more the harness and context have to compensate (ai-engineering-podcast—choosing-the-right-model, keren-kushman).
-
Context can make a cheap model perform: monday built a loop in which Opus improved an agent’s memory and context until Haiku could carry out its tasks (ai-engineering-podcast—choosing-the-right-model, keren-kushman).
-
Prediction from Anthropic, as relayed by Keren Kushman: prompt engineering already disappeared as a role because models write their own prompts, and within 6–9 months the harness and the knowledge graph will become part of the model, which will build its own tools on the fly from raw, unorganized data. Boris Cherny reportedly says he barely uses Claude Code’s harness himself. Take it with salt: labs have an interest, and they work with models half a year ahead (ai-engineering-podcast—choosing-the-right-model, keren-kushman).
-
A host’s counterpoint: moving the harness server-side is also a moat for labs, since a good local harness could be pointed at open-weight models instead (ai-engineering-podcast—choosing-the-right-model).
-
Long context still degrades: past ~150K of a 1M window, models miss the right fact and hallucinate. Her answer to “harness or model?”: keep investing in context and memory, which pays off either way (ai-engineering-podcast—choosing-the-right-model, keren-kushman).
-
Harness as a managed wrapper: an agent needs a model, tools (code interpreter, browser, search, internal tools), memory and skills, and wiring them yourself takes code. A harness, like a tandem skydiving harness strapping you to an instructor, wraps and manages all of it; Hermes does this for a personal assistant (explainable—167-yuval-avidani-agent-harness, yuval-avidani).
-
AgentCore Harness demo: “quick create” builds the environment in ~20 seconds, then you set the model (Bedrock, or OpenAI, Gemini, LiteLLM and local models), a system prompt, a built-in tool such as the code interpreter, and skills from Git or S3. A math agent on Haiku 4.5 refused off-topic questions and ran Python to prove 1+1=2 (explainable—167-yuval-avidani-agent-harness, yuval-avidani, mike-erlihson).
-
What the managed layer buys: one-click model swaps where hand-written API integrations are brittle, sessions with unique IDs so follow-ups like “prove it in two paragraphs” keep context and customers stay separated, and resilient hosting to expose the agent on WhatsApp or Telegram. The configuration exports for Claude or Copilot to embed elsewhere (explainable—167-yuval-avidani-agent-harness, yuval-avidani).
-
Continuous improvement loop: after reaching production, the bottleneck for AI-native companies is improving the harness continuously, since fixing each production failure by hand doesn’t scale. Cluster production traces, find failure points, feed them to a simulator, and close the loop with RL, adjusting prompts and skills automatically. “The models are smart; if there’s a mistake, the harness is to blame” was a common theme at a San Francisco AI engineering conference (hidden-layers—plurai-ilan-kedar, ilan-kedar).
-
Harness changes come before weights: if an agent keeps searching the web at a stage where it shouldn’t, remove that tool once the workflow reaches that stage, then rerun simulations to see the effect. Harness, knowledge and memory are more flexible and have lower-hanging fruit than training a model (langtalks—75-post-training-dan-padnos-novee).
-
Most of the power of Claude or ChatGPT is in the harness, the application that runs the model, Nachum read recently. He builds his open-source coding system as about 20 CLIs with interfaces tailored to agents, each adding a function that helps an agent work better. Claude Code can use them too, so they complement it rather than compete. He finds plugins, and even skills on their own, too specific to be what you distribute to everyone (explainable—170-uri-nachum-agents-that-work-for-you, uri-nachum).
-
A harness per model: Nachum believes each model does best with a harness built for it. If an “AI winter” makes Claude scarce or very expensive, companies will need custom harnesses for their own models (explainable—170-uri-nachum-agents-that-work-for-you, uri-nachum).
-
Kata, one of his tools: let a smart agent make good decisions, learn the process by which it decides, and turn that into a set of actions a less capable model can follow to handle bigger tasks (explainable—170-uri-nachum-agents-that-work-for-you, uri-nachum).
-
No new harness needed for a domain product: a LangTalks host notes that Kritt didn’t invent a harness. Each prompt in its workflows runs on something like the Claude Agent SDK or Codex SDK, and Kritt built only the orchestration (langtalks—76-kritt-gabi-balko-bug-bounties).
-
The environment gets too little focus: a host argues that what an agent can reach (its own user, access to docs and APIs, the ability to run things and get feedback) shapes how well it investigates, say, a specific vulnerability more than one more static-analysis skill or workflow. He cites a reported case of OpenAI evaluation agents in a sandbox reaching each other and the internet, Hugging Face included, though they weren’t supposed to have access (langtalks—76-kritt-gabi-balko-bug-bounties).
Disagreements & open questions
- Will the harness last? Roy Mann sees roughly a decade of engineering above the LLM as the opportunity (startup-for-startup—362-agent-architecture-fit, roy-mann); Anthropic, as relayed by Keren Kushman, expects the harness to move into the model within 6–9 months (ai-engineering-podcast—choosing-the-right-model, keren-kushman).
- What is a harness? LangTalks uses it for Claude Code, Codex or Cursor’s agent loop (langtalks—73-harness-engineering); Yuval Avidani uses it for a managed agent platform (AgentCore Harness) that bundles model connection, tools, memory, skills and hosting, a term he dates to only two or three months earlier (explainable—167-yuval-avidani-agent-harness).
- How much does the harness matter? Pavel Gurevich finds purpose-built harnesses beat generic ones (ignore-instructions—26-ai-cyber-pavel-gurevich); Ilan Kedar says models are now smart enough that the harness is to blame for mistakes (hidden-layers—plurai-ilan-kedar); Keren Kushman, testing all harnesses, says they aren’t cost-effective in themselves and model choice matters more (ai-engineering-podcast—choosing-the-right-model, keren-kushman).
- Cost: providers moved from flat ~$200/month plans to token billing, and companies push to cut spend (cheaper models, open source). The hosts argue against blind token minimization, but warn against “token-maxing” too: use harness hooks and OpenTelemetry to evaluate what’s actually happening (langtalks—73-harness-engineering).
- Is the harness enough? LangTalks hosts treat it as the first fix (langtalks—75-post-training-dan-padnos-novee), while Padnos says harness and prompts sit on a model whose quality still matters for vertical products, which can justify training it (langtalks—75-post-training-dan-padnos-novee, dan-padnos).
Takeaways
- When an agent fails, ask it which capability/tool it lacks to verify itself, and build that (langtalks—73-harness-engineering)
- Track productivity per token over time as the harness KPI (langtalks—73-harness-engineering)
- Give each agent PR its own preview environment (IaC or container mirroring) (langtalks—70-our-claude-code-tips)
- Map every copy-paste step in your dev loop and replace it with agent-accessible tooling (langtalks—68-ai-sdlc)
- If business people queue agent tweaks through engineers, give them a declarative agent definition (prompt, skills, tools, policies) they can edit and ship themselves (startup-for-startup—370-agentos-month-to-day)
- With each new model generation, try removing harness scaffolding; put lasting effort into context and memory instead (ai-engineering-podcast—choosing-the-right-model)
- Prototype a simple agent on a managed harness (e.g. Bedrock AgentCore Harness) with a code-interpreter tool before wiring model, memory and sessions yourself (explainable—167-yuval-avidani-agent-harness)
- Cluster production agent traces by failure point and turn each cluster into simulator scenarios (hidden-layers—plurai-ilan-kedar)
- If an agent misuses a tool at one workflow stage, remove that tool at that stage and rerun simulations (langtalks—75-post-training-dan-padnos-novee)
- Wrap a repeated agent chore in a small CLI with agent-friendly output instead of a plugin, so any harness can use it (explainable—170-uri-nachum-agents-that-work-for-you)
Related
llm-post-training · agent-ready-codebase · test-driven-development · ai-guardrails · ai-verification · coding-agent-workflow · ai-sdlc · ai-cybersecurity · agent-architectures · llm-cost-optimization