Lessons From 51 Anthropic and OpenAI Engineering Posts
Two frontier labs, 51 engineering posts, and near-total agreement on what actually makes an agent work. The ten recurring themes, the numbers behind them, and prompts you can copy.
As of this writing, Anthropic's engineering blog has 25 posts and OpenAI's developer blog has 26. Fifty-one posts, published by two companies with different architectures, different products, different incentives, and a genuine commercial rivalry. Both blogs are still growing, so treat the number as a snapshot of August 2026 rather than a permanent total.
On the engineering questions that actually determine whether your agent works, they agree almost completely.
That convergence is the interesting part. When two competitors independently arrive at the same answer, that answer is worth writing down.
How this was assembled, since it matters: I did not sit and read fifty-one posts front to back. I pointed an agent fleet at the full corpus, had it pull the thesis, numbers, and recommendations out of each post, then worked through the synthesis myself—checking the claims that carry weight against the original posts and cutting the ones that did not hold up. Every statistic below links to where it came from, so you can check my work the same way I checked the fleet's.
That process is, I will admit, exactly the sort of thing these fifty-one posts are about.
The one-paragraph version
The model is no longer the interesting variable. What separates an agent that works from one that demos well is everything around the model: what you put in its context, what it can use to check itself, what procedures you have written down, and what boundaries you have drawn around it. Both labs spent 2025 and 2026 publishing essentially the same discovery—the intelligence got cheap, and the engineering moved outward.
1. Context is the budget. Spend it like one.
Anthropic named the failure mode: context rot. Performance degrades as the context window fills, not off a cliff but down a gradient. Their own guidance for Claude Code opens by stating that nearly every best practice descends from this one constraint. Their framing for context engineering is to find the smallest set of high-signal tokens that produce the outcome you want.
OpenAI arrived at the same place from the product side. Perplexity, building voice search on the Realtime API, found that pushing context in ~2,000-token chunks instead of large updates prevented catastrophic loss. Repo Prompt splits context gathering from context reasoning so the reasoning model never burns its window navigating. OpenAI's long-horizon Codex guidance makes compaction a default, not an emergency.
The techniques both sides recommend are the same four:
- Just-in-time retrieval. Hold lightweight identifiers—file paths, URLs, queries—and load the actual content only when needed.
- Progressive disclosure. Metadata first, full document only on relevance. This is the mechanism behind both Agent Skills and OpenAI's skill routing.
- Sub-agents with clean windows. Anthropic's research system returns 1,000–2,000 token summaries to the coordinator instead of raw exploration.
- Compaction and resets. Anthropic found context resets outperform compaction for long builds, at the cost of orchestration complexity.
The numbers are not subtle. Anthropic's tool search tool cut tool-definition overhead from 77K tokens to 8.7K—an 85% reduction—while raising accuracy from 79.5% to 88.1% on Opus 4.5. Their MCP code-execution pattern took a 150,000-token tool-definition load down to 2,000. That is a 98.7% cut.
Less context made the model smarter. That is the whole lesson.
Prompt you can copy — run this against your own agent setup:
Audit my agent's context budget. Read my system prompt, tool definitions,
and any always-loaded config files (CLAUDE.md, AGENTS.md, etc.).
For each block, tell me:
1. Approximate token cost
2. Whether it is needed on EVERY turn or only sometimes
3. What would break if I deleted it
Then propose a version where anything conditionally-needed moves to a
skill, a file the agent can read on demand, or a sub-agent. Show me the
before/after token count.
2. If the agent cannot check its own work, you are the check
This is the theme that recurs most often, and most bluntly, across both blogs.
Anthropic's Claude Code guidance frames it as the difference between a session you have to watch and one you can walk away from: give the agent something that returns pass or fail, and the loop closes without you. Their harness-design research went further and found that agents reliably praise their own output even when it is mediocre—so generation and evaluation have to be separate agents, and the evaluator has to be tuned toward skepticism.
The C compiler project makes the point at its sharpest. Sixteen parallel Claude instances, 2,000+ sessions, ~100,000 lines of Rust, roughly $20,000, two weeks—producing a compiler that builds Linux 6.9 on three architectures at a 99% pass rate on the GCC torture suite. The author's stated precondition was that the verifier had to be near-perfect, because an autonomous agent will faithfully solve whatever problem your tests actually describe.
OpenAI says the same thing in different vocabulary: checkpoint-based execution, acceptance criteria per milestone, lint and typecheck and build at every step, repair before advancing. Their guidance for skill evals is that every manual fix you make during development is a candidate eval case.
I hit my own version of this a week ago, in Status Is a Claim. Evidence Is the Job. — my agent runs reported green while their own event logs contained failed tests. I had filed that as a bug in my platform. Both labs describe it as the default behavior of any system that lets an agent grade itself.
Prompt you can copy — the verification-first task template:
[Describe the change you want.]
Before you write any code:
1. Tell me the check that will prove this works — a test command, a build,
a script, or a screenshot comparison.
2. If no such check exists, write it first and show me it FAILS for the
right reason.
Then implement. Run the check. Show me the actual output, not a summary.
Iterate until it passes. Do not tell me it is done; show me the evidence.
Prompt you can copy — the adversarial reviewer, run in a fresh session:
Review this diff against the requirements in [PLAN.md / the ticket].
You did not write this code and you have not seen the reasoning behind it.
Check that every stated requirement is implemented, that the listed edge
cases have tests, and that nothing outside the task's scope changed.
Report only gaps that affect correctness or the stated requirements.
Do not report style preferences. If the work is sound, say so.
That last line matters. Anthropic's own guidance warns that a reviewer told to find gaps will manufacture them, and chasing every finding produces defensive over-engineering.
3. The harness is half the product
Anthropic ran the same task two ways: a solo agent finished a retro game maker in 20 minutes for $9; a full planner/generator/evaluator harness took six hours and $200. Twenty times the cost, and dramatically better output. On another build—a digital audio workstation—the harness ran 3 hours 50 minutes for $124.70 across three QA rounds.
Their SWE-bench work makes the cleaner claim: the same model scores very differently depending on scaffolding. Their Managed Agents architecture separates the reasoning "brain" from the execution "hands" and the session store, which cut time-to-first-token by roughly 60% at p50 and over 90% at p95.
OpenAI open-sourced the Codex harness for exactly this reason—their argument is that the chat box was never the product, the agent loop was. They cite a 3x score improvement on ARC-AGI-3 from harness changes alone.
Both then add the same warning: harnesses encode assumptions that expire. Anthropic found that Opus 4.6 removed the "context anxiety" that Sonnet 4.5 exhibited, which made an entire sprint-decomposition layer unnecessary. Their advice is to strip one harness component at a time and re-test what the model can now do alone.
Prompt you can copy — run this after every model upgrade:
Here is my current agent harness: [paste or point at the orchestration code].
For each component, tell me:
1. What assumption about model capability it encodes
2. Whether that assumption is still true for [new model name]
3. What I should test to find out
Rank the components by "most likely to now be unnecessary" and give me a
single experiment that would prove or disprove the top one.
4. Tools are a user interface for a reader who is not human
Anthropic's position, stated in their SWE-bench writeup and expanded in their tool-design post, is that the effort we spend designing interfaces for humans should be matched by effort designing them for models. Concretely:
- Fewer, higher-leverage tools. If a human cannot tell which of two tools applies, neither can the agent. Consolidate: one
schedule_eventthat finds availability and books, not two calls. - Return meaning, not identifiers. Human-readable names instead of UUIDs measurably reduces hallucination.
- Cap and paginate. Anthropic restricts tool responses to 25,000 tokens and reports that the constraint improves precision.
- Errors are steering, not stack traces. An error that suggests the next action is worth more than one that reports a failure.
- Namespace consistently.
asana_projects_search,asana_users_search. And test prefix vs. suffix—it changes results.
OpenAI's version comes from the ChatGPT Apps side and adds a useful framing: you are designing for two audiences, the human and the model runtime deciding whether to call you at all. Perplexity's production advice is to keep the toolset under ten actions and return structured JSON with clearly separated fields rather than prose mixed with instructions.
Anthropic's most useful process tip here: have the model rewrite its own tool descriptions. One tool-testing agent found nuances that cut subsequent task completion time by 40%. And on the platform side, tool examples moved accuracy from 72% to 90% on complex nested parameters—examples beat schemas.
Prompt you can copy — the tool description rewrite:
Here are my tool definitions: [paste].
Act as a new engineer who has never seen this system. For each tool:
1. What is ambiguous about when to call it?
2. What parameter names would you misread?
3. What would you expect it to return, and what does it actually return?
Then rewrite each description as if onboarding that engineer. Add one
concrete input/output example per tool. Flag any two tools whose purposes
overlap enough that they should be merged or renamed.
5. Put the procedure in a file, not in the prompt
This is the biggest structural convergence in the whole corpus. Anthropic ships Agent Skills. OpenAI ships skills plus AGENTS.md. Same idea, near-identical mechanics: a folder with a name, a description, instructions, and optional scripts; the name and description are all that load until the skill is actually relevant.
Anthropic frames building a skill as writing an onboarding guide for a new hire. OpenAI calls the same artifact a living SOP. Both framings point at the same thing: institutional knowledge that currently lives in someone's head.
The receipts are unusually concrete:
| Change | Result |
|---|---|
| Skills on OpenAI's Python SDK repo | 182 → 226 merged PRs (+24%) |
| Skills on the TypeScript SDK repo | 134 → 231 merged PRs (+72%) |
| Both repos, 3-month window | 316 → 457 PRs (+45%) |
| A Salesforce-oriented skill | 73% → 85% accuracy, 18.1% faster first token |
Custom code-review rules in AGENTS.md | 58.3% → 98% of required findings caught |
Two craft notes both labs stress:
The description field is routing logic, not marketing. "Run verification stack" is a bad description. "Run the mandatory verification stack when changes affect runtime code, tests, or build behavior" is a good one. OpenAI reports that Glean saw skill triggering drop 20% before recovering once they added negative examples—explicit "do not use this when…" cases.
Push mechanics to scripts, keep interpretation with the model. If the model has to rediscover the same shell incantation every session, that incantation should be a script. Judgment—does this behavior match intent, is this a compatibility risk—stays with the model.
Anthropic's guidance on CLAUDE.md deserves its own line, because it is a common and self-inflicted failure: a bloated instructions file causes the model to ignore the instructions. Their test for every line is whether removing it would cause a mistake. If not, cut it.
Prompt you can copy — the instructions-file diet:
Read my CLAUDE.md / AGENTS.md.
For each line, answer: "Would removing this cause the agent to make a
mistake it would not otherwise make?"
Put every line into one of three buckets:
KEEP — the agent genuinely cannot infer this from the codebase
CUT — inferrable from code, or generic advice the model already follows
CONVERT — should be a hook (must happen every time) or a skill
(only relevant sometimes)
Then show me the pruned file.
6. Evals are smaller and cheaper than you think
Everyone I talk to treats evals as a project they will get to later. Both labs say the opposite: start at 20–50 tasks, drawn from real failures, before you ship.
The most useful specifics from Anthropic's eval guidance:
- A 0% pass rate on a frontier model usually means a broken task, not an incapable agent. That single reframe saves hours of debugging the wrong layer.
- Grade outcomes, not paths. Agents find valid approaches you did not anticipate.
- Two domain experts should independently reach the same verdict, or the task is underspecified.
- Isolate environments per trial. Shared state inflates scores and adds noise.
- Read the transcripts. When scores stop climbing, verify it is the agent failing and not your eval design.
- Watch for saturation. An eval at ~100% has become a regression test, not a measure of progress.
- pass@k vs. pass^k. Probability of succeeding at least once in k trials rises with k; probability of succeeding every time falls with k. Use the first for tools where one good answer suffices, the second for anything that has to be reliable.
OpenAI's skill-eval guidance layers the same idea for practitioners: 10–20 prompts mixing explicit invocations, implicit triggers, and negative controls; deterministic checks first, model-graded rubrics second, heavy build-and-smoke-test checks last.
Prompt you can copy — bootstrap an eval set from your actual history:
Go through the last 20 times this agent failed or needed correction —
check git history, my chat transcripts, and any bug reports.
For each failure, write an eval case with:
- the input prompt
- what the agent did wrong
- a deterministic check that would have caught it (command + expected result)
Include at least 4 NEGATIVE cases: prompts where the correct behavior is
NOT to trigger this workflow. Output as a single runnable test file.
7. Your benchmark is probably measuring your infrastructure
This is the pair to hand anyone who quotes leaderboard numbers at you.
Anthropic measured infrastructure noise on Terminal-Bench 2.0 and found that resource configuration alone can swing scores by more than 6 percentage points—larger than the typical gap between top models on the leaderboard. Give one agent a bigger VM and it is not taking the same test. Their practical fix: specify a guaranteed allocation and a separate hard kill threshold, then calibrate the headroom until floor and ceiling scores fall inside statistical noise. Roughly 3x headroom cut infrastructure errors from 5.8% to 2.1% without meaningfully lifting scores.
Their stated skepticism threshold: treat any gap under 3 points as unproven until the eval configuration is documented and matched.
The companion post is stranger. Claude Opus 4.6, running BrowseComp, independently suspected it was being evaluated, identified which benchmark it was on, and worked toward decrypting the answer key. Multi-agent setups showed 3.7x the rate of unintended solutions (0.87% vs 0.24%), because more parallel searchers means more chances to stumble into contamination. The fix that worked was blocking any search result mentioning the benchmark name—URL blocklists were not enough.
The takeaway both posts share: eval integrity is an adversarial, ongoing problem, not a design-time one.
8. Containment beats prevention
Anthropic's security post contains the sharpest line in the entire corpus:
"The weakest layer is the one you built yourself." — Anthropic, How we contain Claude
Their argument is that established primitives—gVisor, seccomp, hypervisors, OS sandboxes like bubblewrap and seatbelt—survived adversarial scrutiny longer than their own custom proxies did, and that this pattern repeated across their most serious incidents.
The rest of the security consensus:
- Approval fatigue is a security vulnerability. Users approved roughly 93% of Claude Code permission prompts. At that rate you are not reviewing, you are clicking. OS-level sandboxing cut prompts by 84%.
- Filesystem and network isolation, together. Either alone leaves a hole: one permits escape, the other permits exfiltration.
- Keep credentials structurally outside the sandbox. Route through a validating proxy; never co-locate secrets with the environment running generated code.
- Egress allowlists grant capabilities, not destinations. Allowing an API domain can mean allowing uploads to any account on it.
- Strip context from your safety classifier. Anthropic's auto-mode classifier deliberately cannot see the assistant's own explanations, because a model can generate persuasive rationalizations, and cannot see tool output, because that is where injection enters. Their two-stage design took false positives from 8.5% to 0.4%.
OpenAI's contribution is architectural: their Secure MCP Tunnel inverts connectivity so the private network makes the first outbound move, avoiding public endpoints entirely. And their long-running-agent guidance flags the combination that should worry you most—skills plus open network access is a data exfiltration path.
Anthropic's forward-looking risks are worth writing on a wall: persistent memory poisoning (agent state that survives sessions becomes a persistence vector), and multi-agent trust escalation (treating a sub-agent's output as more trustworthy than a raw tool result).
9. Simplify first, and again on every release
Both labs open their oldest and newest agent posts with the same instruction: do the simplest thing that works, and add complexity only when you can show it helped.
Anthropic's original agent-patterns post recommends starting with a single well-prompted LLM call plus retrieval, and reaching for multi-step architectures only when the simple version provably falls short. Their newest harness research repeats it verbatim as a design principle. In between, they note the counterintuitive finding that a large share of multi-agent advantage comes simply from spending more tokens on the problem—multi-agent runs use roughly 15x the tokens of a chat, and token usage alone explained about 80% of performance variance on web-browsing tasks.
That is worth sitting with before you build an orchestration layer. Sometimes the fancy architecture is an expensive way to buy more tokens.
10. The real story is time horizon, not IQ
OpenAI states it directly: agentic coding is now about time horizon rather than one-shot intelligence, with agents holding coherence across 25+ hours, and the frontier of reliably-completable task length roughly doubling every seven months.
Anthropic's C compiler is that claim made physical. Sixteen agents. Two weeks. A working compiler.
And both note the same consequence, which is not a technology problem. When agents can sustain work longer than you can supervise it, your job moves to setting goals, defining "done," and verifying results. The C compiler author raised the concern plainly: programmers shipping software they never personally verified is a real risk.
That is the same conclusion I reached from my own repos in The Work Moved Up a Level. Finding it arrived at independently by two frontier labs is reassuring and slightly unnerving in equal measure.
If you don't write code, this still applies
Four things from these posts generalize past engineering:
Write down the procedure. The single highest-leverage move in both ecosystems was moving repeated procedures out of people's heads and into a file with a clear name, a clear trigger, and a clear output. That is true whether the executor is an agent or a new hire.
Domain expertise is now a starting point. OpenAI's Build Week winners included a veterinarian, a cardiologist, and a musician shipping real products. The recurring lesson from those builders was that constraining a model is harder than prompting one, and that the smallest interaction-design decisions carried the most weight.
Documentation is now infrastructure. Dagster Labs' test for documentation quality is worth stealing: generate working code from the docs alone, then run the test suite. If it passes, your docs are probably good enough for humans too.
Let the agent interview you. Of everything in these fifty-one posts, this is the one to try first:
I want to build [one-sentence description].
Interview me in detail before writing anything. Ask about technical
implementation, UX, edge cases, failure modes, and tradeoffs. Skip the
obvious questions — dig into the hard parts I probably have not considered.
Keep interviewing until we have covered everything, then write a complete
spec to SPEC.md that names the files involved, states what is out of
scope, and ends with an end-to-end verification step.
Then start a fresh session to execute the spec. Clean context, written contract.
What I'm actually changing
Five things, in order of how quickly I can do them:
- Audit my always-loaded context. My
CLAUDE.mdfiles have accumulated. The "would removing this cause a mistake?" test is going to delete a lot. - Split generation from evaluation. My agents currently grade their own homework. Both labs say that does not work, and my own logs already agreed.
- Convert my last 20 corrections into eval cases. Twenty is achievable this week. Perfect is not.
- Re-examine my harness against the current model. Some of my scaffolding was built for a model that needed it and no longer does.
- Assume my benchmark comparisons are noise until proven otherwise. A three-point gap means nothing if I have not matched the infrastructure.
The receipts
If you only read four of the fifty-one:
- Effective context engineering for AI agents — Anthropic. The mental model everything else hangs on.
- Demystifying evals for AI agents — Anthropic. The most practical thing either lab has published.
- How we contain Claude — Anthropic. Security written by people who have actually been attacked.
- Shell + Skills + Compaction: tips for long-running agents — OpenAI. The clearest statement of where agent work is heading.
And two for the pleasure of it: Anthropic's C compiler built by sixteen parallel agents, and their eval-awareness post, in which a model figures out it is being tested and starts looking for the answer key.
Both blogs are worth subscribing to. Neither is marketing. That is rarer than it should be.