記事一覧へ
研究者が同じコーディングベンチマークで同じAIモデルを2回テストした。1回目は42%のスコア。2回目は78%のスコア。同じモデル。同じテスト。何もかも同じ。
変わったのはハーネスだけだった。
プロンプトでも、モデルでも、温度設定でもない。ハーネス——AIを包み、どう振る舞うかを指示するルール、ツール、スキル、メモリファイル、フィードバックループのシステムだ。
これが今のAI支援開発で最も重要な発見だ。そして少数のエンジニアリングチーム以外では、ほとんど誰も話していない。
LangChainが独自に同じことを証明した。彼らのコーディングエージェントは、モデルについては何も変えずに、Terminal Bench 2.0でトップ30外からトップ5に躍進した。ハーネスだけを変えた。OpenAIも証明した。彼らのCodexチームは、人間の手で書かれた行がゼロのコードで100万行以上の本番アプリケーションを構築した。エンジニアはコードを書かなかった。ハーネスを設計した。
これらのハーネスを設計するスキルには今や名前がある:ハーネスエンジニアリング。数週間前に造られた言葉だ。YouTubeやエンジニアリングブログでの注目は増えている。しかし主流のカバレッジはほぼゼロだ。ほとんどの開発者はその用語を聞いたことがない。
それは変わろうとしている。そして最初に学んだ開発者は、非常に複製しにくいキャリアアドバンテージを持つことになる。
これが完全ガイドだ。ハーネスエンジニアリングとは何か。なぜ使うモデルより重要なのか。今日から始める方法。なぜそれがあなたをかけがえのない存在にする0ドルのスキルなのか。
ハーネスエンジニアリングが実際に何を意味するか
できるだけシンプルにしよう。
Claude Code、Cursor、Codexなどのコーディングエージェントを使うとき、AIモデルはシステムの一部に過ぎない。モデルはブレインだ。しかしブレインには指示が必要だ。ツールが必要だ。ルールが必要だ。メモリが必要だ。出荷前にミスを捕まえるフィードバックループが必要だ。
モデルの周りにあるすべてのそれ?それがハーネスだ。
乗馬を考えてみよう。馬は強力だ。しかし手綱、鞍、ビットがなければ、馬は行きたいところに行く。ハーネスは、その力を必要な方向に向けるものだ。
AIコーディングエージェントも同じだ。モデルは強力だ。しかし適切に設計されたハーネスなしでは、推測し、漂流し、同じミスを何度も繰り返し、印象的に見えるが本番でバグになるコードを生成する。
ハーネスエンジニアリングは、AIコーディングエージェントが同じミスを二度としないよう、そのハーネスを設計・設定する実践だ。
TerraformのクリエイターでThe最も尊敬されるエンジニアの一人、Mitchell Hashimotoはこう定義した:「エージェントがミスをするたびに、エージェントが二度とそのミスをしないような解決策をエンジニアリングする時間を取る。」
それが1文に凝縮された全哲学だ。より良いモデルを祈るな。モデルの周りのシステムを直せ。
コーディングエージェントハーネスの5つのレバー
すべてのコーディングエージェントには5つの設定ポイントがある。これがレバーだ。正しいものを引けば、同じモデルが劇的に良いコードを生成する。
1. システムプロンプト(CLAUDE.md / AGENTS.md)
リポジトリのトップにあるマークダウンファイルで、すべてのセッションの開始時にエージェントのコンテキストに注入される。コードベースが何についてのものか、どの規約に従うか、何を避けるかをエージェントに伝える。
ほとんどの人はこのファイルを完全にスキップするか、AIに生成させる。どちらもミスだ。ETH Zurichの研究は異なるリポジトリの138のエージェントファイルをテストして、AI生成のものは実際に20%多くトークンをコストしながらパフォーマンスを傷つけることを発見した。人間が書いたものは助けになったが、簡潔で具体的な場合だけだ。
ルール:60行以内に収める。すべてのタスクに適用される普遍的な指示だけを含める。ディレクトリリスト不要(エージェントは自分で構造を発見できる)。条件付きルール不要(「Xをするなら、Y」は混乱を生む)。必要なものだけ:テックスタック、テストコマンド、コーディング規約、ハードルール。
2. スキル(知識のプログレッシブな開示)
スキルはタスクがマッチしたときだけエージェントがロードする指示ファイルだ。システムプロンプトにすべてを詰め込む代わりに、知識を集中したモジュールに分割して、エージェントが必要に応じて発見する。
例えば、データベースマイグレーションのスキル、APIエンドポイント作成のスキル、フロントエンドコンポーネントパターンのスキルを持つかもしれない。エージェントがマイグレーションタスクに遭遇すると、マイグレーションスキルを自動的にロードする。残りはコンテキストウィンドウの外にある。
これをプログレッシブな開示と呼ぶ。エージェントは最小限のコンテキストから始め、必要に応じてより多くを引き込む。コンテキストウィンドウをクリーンに保ち、関係のない指示でエージェントが混乱するのを防ぐ。
3. MCPサーバー(ツールと機能)
Model Context Protocolサーバーはエージェントがファイルを読んでコマンドを実行すること以上のことを拡張する。イシュー追跡のためのLinear、エラーモニタリングのためのSentry、ライブクエリのためのデータベース、または任意の外部システムにエージェントを接続できる。
ただし警告:接続するすべてのMCPツールはエージェントのシステムプロンプトに追加される。ツールが多すぎると、HumanLayerチームが「ツールスラッシュ」と呼ぶものが起きる——エージェントはどのツールを使うか決めることに時間を無駄にして、実際の作業をしない。2〜3つから始める。本当の制限にぶつかったときだけ追加する。
4. サブエージェント(コンテキストファイアウォール)
これがほとんどの人が誤解しているレバーだ。サブエージェントは「フロントエンドエンジニア」エージェントと「バックエンドエンジニア」エージェントを持つことではない。それは機能しない。HumanLayerチームが試して諦めた。
サブエージェントはコンテキストファイアウォールとして機能する。メインエージェントがコンテキストウィンドウを中間ノイズで埋めてしまうタスクに遭遇したとき、そのタスクをサブエージェントに委任する。サブエージェントは独立したコンテキストで実行し、作業をして、結果だけを返す。中間ステップはどれも親スレッドを汚染しない。
これがメインエージェントを「スマートゾーン」に保つ方法だ。Chromaの研究は、AIモデルがより長いコンテキスト長でパフォーマンスが測定可能なほど悪化することを示している。サブエージェントは大きな問題を小さな、集中したセッションに分割し、モデルがシャープな状態を保てる。
5. フック(自動チェックポイント)
フックはエージェントのワークフローの特定の点で自動的に実行されるスクリプトだ。非決定論的なシステムに決定論的なコントロールを追加する。
例えば、pre-commitフックはエージェントがコードをコミットする前にリンターを実行できる。pre-completionフックはエージェントがタスクを完了と宣言する前にテストを実行するよう強制できる。ループ検出フックは同じ編集を何度も繰り返し始めたエージェントを捕まえられる。
LangChainは「PreCompletionChecklistMiddleware」を構築した。タスクを完了する前にエージェントを傍受し、元の要件に対する検証パスを強制する。その単一のフックが彼らのハーネス全体で最大のパフォーマンス向上の一つだった。
なぜハーネスはモデルより重要なのか
これがほとんどの開発者が間違える部分だ。ClaudeとGPTとGeminiの議論に何時間も費やす。すべての新しいモデルリリースを追いかける。次のバージョンがすべてを直すと信じる。
データは違うことを言っている。
研究者が2026年3月に同じAIモデルが周囲のハーネスだけで42%から78%の精度にスイングできることを実証した。それはほぼ2倍のパフォーマンスだ。歴史上2倍の改善をもたらしたモデルのアップグレードはない。しかしよく設計されたハーネスはそれを日常的にやる。
LangChainは業界標準のTerminal Bench 2.0ベンチマークで同じことを証明した。同じモデル。異なるハーネス。トップ30外からトップ5へ。
OpenAI自身のCodexチームが直接言った:「エージェントが苦労するとき、それをシグナルとして扱う。何が欠けているか——ツール、ガードレール、ドキュメント——を特定して、リポジトリにフィードバックする。」モデルを切り替えない。ハーネスを直す。
モデルはエンジンだ。ハーネスはステアリング、ブレーキ、道だ。世界で最も強力なエンジンを持てる。ステアリングなしではクラッシュする。
今日からハーネスエンジニアリングを始める(0ドル)
新しいツールは必要ない。コースも必要ない。AIコーディングエージェントを変える必要もない。失敗したときの反応を変える必要がある。
ステップ1:失敗の反射を変える
古い反射:エージェントがミスをして、手動で直して先に進む。
新しい反射:エージェントがミスをして、「二度とこのミスをしないようにするにはどうすればいいか?」と問う。そして修正をハーネスにエンコードする。
それがマインドセットの変化の全てだ。すべての失敗はハーネスに何かが欠けているシグナルだ。欠けているものを見つける。追加する。先に進む。エージェントはその方法では二度と失敗しない。
ステップ2:簡潔なCLAUDE.md / AGENTS.mdを書く
リポジトリのルートにマークダウンファイルを作る。60行以内に収める。テックスタック、テストコマンド、ハードルール(「マイグレーションファイルは絶対に削除しない」「コミット前に必ずテストを実行する」「TypeScript strictモードを使う」)を含める。ディレクトリマップなし。条件ロジックなし。AI生成のコンテンツなし。
ステップ3:最初のスキルを構築する
コードベースの繰り返しパターンを特定する。APIエンドポイントの作成。データベースマイグレーション。コンポーネントスキャフォールディング。エッジケースと一般的なミスを含めて正しくやる方法を説明する集中した指示ファイルを書く。スキルとして保存する。パターンがマッチしたとき、エージェントが自動的にロードする。
ステップ4:1つのフックを追加する
リンターとテストスイートを実行するpre-commitフックから始める。エージェントがどちらのチェックも失敗するコードをコミットしようとしたら、フックがリポジトリに到達する前に捕まえる。1つのフック。巨大な影響。
ステップ5:コンテキストが多いタスクにサブエージェントを使う
長いタスクでエージェントがコヒーレンシーを失っていることに気づいたら、サブタスクに分割する。各サブタスクをサブエージェントに委任する。サブエージェントに独立して作業させ、結果だけを返させる。メインスレッドをクリーンに保つ。
ステップ6:毎週反復する
毎金曜日、その週の失敗をレビューする。それぞれについて、ルール、スキル、またはフックをハーネスに1つ追加する。失敗ごとに5分のハーネスエンジニアリング。時間をかけてハーネスに修正が積み重なる。エージェントは毎週より信頼できるものになる。モデルが改善されたからではない。システムが改善されたからだ。
誰も見えていないキャリアの堀
なぜこれがキャリアに重要か。
AIモデルはコモディティ化されつつある。すべての会社が同じフロンティアモデルにアクセスできる。Claude、GPT、Gemini——みんなに利用可能だ。モデルはもはや競争優位ではない。
しかしよく設計されたハーネスはそうだ。コードベースに固有だ。チームのパターンに固有だ。ドメインのエッジケースに固有だ。モデルをダウンロードしても複製できない。実際の世界の失敗をシステムにエンコードする週と月をかけて構築される。
これらのハーネスを設計できる開発者は、会社が置き換えられない人だ。最良のコードを書くからではない。AIが最良のコードを書けるようにするシステムを設計するからだ。
OpenAIが明示的に言った:エンジニアの仕事はもはやコードを書くことではない。環境を設計し、インテントを指定し、エージェントが確実な作業をできるフィードバックループを構築することだ。
それがハーネスエンジニアリングだ。そして今それを学ぶ開発者、用語がまだ新しく、規律がまだ形成されている間に、待っているすべての人より2年先行することになる。
プロンプトエンジニアリングは2023年のスキルだった。コンテキストエンジニアリングは2025年のスキルだった。ハーネスエンジニアリングは2026年のスキルだ。
学ぶのに0ドルかかる。新しいツールは必要ない。コーディングエージェントへのアクセスがある開発者全員に利用可能だ。
唯一の質問は、今日ハーネスをエンジニアリングし始めるか、次のモデルリリースがすべてを直すのを祈り続けるかだ。
データはすでにその質問に答えた。

claude-workflowai-thinkingagent-ops
同じツールで結果が変わる二人の開発者
♥ 442↻ 55
原文を表示 / Show original
A researcher tested the same AI model on the same coding benchmark twice. The first time, it scored 42%. The second time, it scored 78%. Same model. Same test. Same everything.
The only thing that changed was the harness.
Not the prompts. Not the model. Not the temperature setting. The harness — the system of rules, tools, skills, memory files, and feedback loops that wraps around the AI and tells it how to behave.
This is the most important finding in AI-assisted development right now. And almost nobody outside of a few engineering teams is talking about it.
LangChain proved the same thing independently. Their coding agent went from outside the top 30 to the top 5 on Terminal Bench 2.0 by changing nothing about the model. They only changed the harness. OpenAI proved it too. Their Codex team built a production application with over one million lines of code where zero lines were written by human hands. The engineers did not write code. They designed the harness.
The skill of designing these harnesses has a name now: harness engineering. It was coined weeks ago. It is already getting traction on YouTube and in engineering blogs. But there is almost zero mainstream coverage. Most developers have never heard the term.
That is about to change. And the developers who learn it first will have a career advantage that is extremely hard to replicate.
This is the complete guide. What harness engineering is. Why it matters more than the model you use. How to start doing it today. And why it is the $0 skill that will make you irreplaceable.
What harness engineering actually means
Let me make this as simple as possible.
When you use an AI coding agent like Claude Code, Cursor, or Codex, the AI model is only one part of the system. The model is the brain. But the brain needs instructions. It needs tools. It needs rules. It needs memory. It needs feedback loops that catch mistakes before they ship.
All of that stuff around the model? That is the harness.
Think of it like horse riding. The horse is powerful. But without reins, a saddle, and a bit, the horse goes wherever it wants. The harness is what channels that power in the direction you need.
An AI coding agent is the same. The model is powerful. But without a properly designed harness, it guesses, it drifts, it makes the same mistakes over and over, and it produces code that looks impressive but breaks in production.
Harness engineering is the practice of designing and configuring that harness so your AI coding agent never makes the same mistake twice.
Mitchell Hashimoto, the creator of Terraform and one of the most respected engineers in the industry, defined it this way: "Anytime you find an agent makes a mistake, you take the time to engineer a solution such that the agent never makes that mistake again."
That is the entire philosophy in one sentence. Do not pray for better models. Fix the system around the model.
The five levers of a coding agent harness
Every coding agent has five configuration points you can adjust. These are your levers. Pull the right ones and the same model produces dramatically better code.
1. The system prompt (CLAUDE.md / AGENTS.md)
This is a markdown file at the top of your repository that gets injected into the agent's context at the start of every session. It tells the agent what your codebase is about, what conventions to follow, and what to avoid.
Most people either skip this file entirely or let the AI generate it. Both are mistakes. An ETH Zurich study tested 138 agent files across different repositories and found that AI-generated ones actually hurt performance while costing 20% more in tokens. Human-written ones helped, but only when they were concise and specific.
The rule: keep it under 60 lines. Include only universal instructions that apply to every task. No directory listings (the agent can discover structure on its own). No conditional rules ("if doing X, then Y" creates confusion). Just the essentials: your tech stack, your testing commands, your coding conventions, and your hard rules.
2. Skills (progressive disclosure of knowledge)
Skills are instruction files that the agent loads only when the task matches. Instead of stuffing everything into your system prompt, you break your knowledge into focused modules that the agent discovers as needed.
For example, you might have a skill for database migrations, another for API endpoint creation, and another for frontend component patterns. When the agent encounters a migration task, it loads the migration skill automatically. The rest stay out of the context window.
This is called progressive disclosure. The agent starts with minimal context and pulls in more as it needs it. This keeps the context window clean and prevents the agent from getting confused by irrelevant instructions.
3. MCP servers (tools and capabilities)
Model Context Protocol servers extend what your agent can do beyond reading files and running commands. They can connect your agent to Linear for issue tracking, Sentry for error monitoring, your database for live queries, or any other external system.
But here is the warning: every MCP tool you connect adds to your agent's system prompt. Too many tools create what the HumanLayer team calls "tool thrash" — the agent wastes time deciding which tool to use instead of doing the work. Start with two or three. Add more only when you hit a real limitation.
4. Sub-agents (context firewalls)
This is the lever most people misunderstand. Sub-agents are not about having a "frontend engineer" agent and a "backend engineer" agent. That does not work. The HumanLayer team tried it and abandoned it.
Sub-agents work as context firewalls. When your main agent encounters a task that would fill up its context window with intermediate noise, it delegates that task to a sub-agent. The sub-agent runs in its own isolated context, does the work, and sends back only the result. None of the intermediate steps pollute the parent thread.
This is how you keep your main agent in the "smart zone." Research from Chroma shows that AI models perform measurably worse at longer context lengths. Sub-agents let you break big problems into small, focused sessions where the model stays sharp.
5. Hooks (automated checkpoints)
Hooks are scripts that run automatically at specific points in the agent's workflow. They add deterministic control to a non-deterministic system.
For example, a pre-commit hook can run your linter before the agent commits code. A pre-completion hook can force the agent to run tests before declaring a task finished. A loop-detection hook can catch the agent when it starts making the same edit over and over.
LangChain built a "PreCompletionChecklistMiddleware" that intercepts the agent before it finishes any task and forces a verification pass against the original requirements. That single hook was one of the biggest performance gains in their entire harness.
Why the harness matters more than the model
This is the part most developers get wrong. They spend hours debating Claude versus GPT versus Gemini. They chase every new model release. They believe the next version will fix everything.
The data says otherwise.
A researcher demonstrated in March 2026 that the same AI model can swing from 42% to 78% accuracy based solely on the surrounding harness. That is nearly double the performance. No model upgrade in history has delivered a 2x improvement. But a well-designed harness does it routinely.
LangChain proved the same thing on the industry-standard Terminal Bench 2.0 benchmark. Same model. Different harness. Jumped from outside the top 30 to the top 5.
OpenAI's own Codex team said it directly: "When the agent struggles, we treat it as a signal. We identify what is missing — tools, guardrails, documentation — and feed it back into the repository." They do not switch models. They fix the harness.
The model is the engine. The harness is the steering, the brakes, and the road. You can have the most powerful engine in the world. Without steering, it crashes.
How to start harness engineering today ($0 required)
You do not need new tools. You do not need a course. You do not need to change your AI coding agent. You need to change how you respond when it fails.
Step 1: Change your failure reflex
Old reflex: the agent makes a mistake, you fix it manually and move on.
New reflex: the agent makes a mistake, you ask "how do I make sure it never makes this mistake again?" Then you encode the fix into your harness.
That is the entire mindset shift. Every failure is a signal that something is missing from your harness. Find what is missing. Add it. Move on. The agent will never fail that way again.
Step 2: Write a concise CLAUDE.md / AGENTS.md
Create a markdown file at the root of your repository. Keep it under 60 lines. Include your tech stack, your testing commands, your hard rules ("never delete migration files," "always run tests before committing," "use TypeScript strict mode"), and nothing else. No directory maps. No conditional logic. No AI-generated content.
Step 3: Build your first skill
Identify a repeating pattern in your codebase. API endpoint creation. Database migration. Component scaffolding. Write a focused instruction file that explains how to do it correctly, including edge cases and common mistakes. Save it as a skill. The agent loads it automatically when the pattern matches.
Step 4: Add one hook
Start with a pre-commit hook that runs your linter and your test suite. If the agent tries to commit code that fails either check, the hook catches it before it reaches your repository. One hook. Enormous impact.
Step 5: Use sub-agents for context-heavy tasks
When you notice the agent losing coherency on a long task, break it into sub-tasks. Delegate each sub-task to a sub-agent. Let the sub-agent do the work in isolation and return only the result. Your main thread stays clean.
Step 6: Iterate weekly
Every Friday, review the failures from the week. For each one, add one rule, one skill, or one hook to your harness. Five minutes of harness engineering per failure. Over time, your harness accumulates fixes. Your agent gets more reliable every week. Not because the model improved. Because your system improved.
The career moat nobody sees coming
Here is why this matters for your career.
AI models are commoditizing. Every company has access to the same frontier models. Claude, GPT, Gemini — they are all available to everyone. The model is not a competitive advantage anymore.
But a well-engineered harness is. It is specific to your codebase. It is specific to your team's patterns. It is specific to your domain's edge cases. It cannot be copied by downloading a model. It is built through weeks and months of encoding real-world failures into a system that learns from them.
The developers who can design these harnesses are the ones companies cannot replace. Not because they write the best code. Because they design the systems that let AI write the best code.
OpenAI said it explicitly: the engineer's job is no longer to write code. It is to design environments, specify intent, and build feedback loops that allow agents to do reliable work.
That is harness engineering. And the developers who learn it now, while the term is still new, while the discipline is still forming, will have a two-year head start on everyone who waits.
Prompt engineering was the skill of 2023. Context engineering was the skill of 2025. Harness engineering is the skill of 2026.
It costs $0 to learn. It requires no new tools. It is available to every developer with access to a coding agent.
The only question is whether you start engineering your harness today, or whether you keep praying for the next model release to fix everything.
The data already answered that question.