Why Agent Harnesses Are Hard to Work With as an Engineer

·
Why Agent Harnesses Are Hard to Work With as an Engineer

You give Claude Code a task. Today it nails it in one pass. Tomorrow you run the same prompt on the same codebase and it spins for ten minutes, makes a mess, and gives up. As an engineer, your job is to answer one question: why?

promptharnessmodelproviderhardwaretoday ✓tomorrow ✗?same prompt. same model name. different result.

The engineer's mindset

When something behaves differently than it did yesterday, an engineer wants to know why. Not philosophically — in a "which variable changed" sense. Debuggability is what lets you optimize, reproduce, and trust the system you are building on top of.

The mental model is simple: given the same input, the same system should produce the same output. If it doesn't, something changed. Find the diff. Fix the cause, not the symptom.

Agent harnesses break that model on at least three layers.

Layer 1: the model is non-deterministic

Setting temperature=0 feels like it should give you reproducibility. It doesn't.

Anthropic's own docs state that "even with temperature 0.0, the results will not be fully deterministic." The sampler isn't secretly adding noise. The cause is lower: modern inference batches many requests together, and GPU kernels don't produce identical floating-point results across different batch sizes. Floating-point arithmetic is not associative — (a + b) + c is not always equal to a + (b + c) — so the order reductions happen in matters. Thinking Machines Lab's write-up on batch invariance lays it out: batch size depends on server load, which you don't control, and if two candidate next tokens have close logits a tiny numerical difference flips their order. From there the divergence compounds.

So the model itself, even held constant, is stochastic from the caller's perspective.

Layer 2: the harness

A harness is the orchestration layer around a raw model: system prompt, tool definitions, context management and compaction, retry logic, subagent routing, the CLI or UX that makes a raw LLM feel like an agent. Claude Code is a harness around the Claude model. Cursor is a harness. Codex is a harness.

Harness versions ship. The system prompt evolves, tool definitions change, compaction heuristics get tweaked, retry behavior gets "smarter." You installed Claude Code three weeks ago and it auto-updated twice. The Claude Code that ran your task yesterday is not bit-identical to the one running it today. Even if the underlying model were perfectly deterministic, the harness wouldn't be.

Layer 3: closed-source

Here's the part that is specific to commercial tools like Claude Code. The harness is not open source. You cannot read the system prompt. You cannot grep the compaction heuristic. You can observe behavior, reverse-engineer it, complain about it on Twitter — but you cannot open the file and see what changed.

This is unusual for developer tools. When Next.js ships a regression, I can git blame the commit. When Postgres changes a query planner heuristic, I can read the release notes and the source. With Claude Code, the harness is a black box shipped on their cadence, not yours. You can pin a version, but you can't inspect one.

The killer scenario

Same prompt. Same repo. Different result. What could have changed between yesterday and today?

  • The context window: What actually lands in front of the model on this run - prior tool results, injected system reminders, file snippets the harness decided to include - is not identical across two invocations of "the same" task. The harness composes it dynamically. You see the prompt you typed. You don't see the rest of the window.
  • The system prompt inside the harness: A Claude Code update could have shipped while you slept.
  • The harness itself: Tool definitions, compaction heuristics, retry logic, subagent routing - all closed source, all shipping on their cadence, not yours.
  • Thinking tokens: Extended-thinking models produce internal reasoning before the visible answer. How much they think, and what they think about, varies between runs - and the reasoning that shapes the final output is often not even shown back to you in the same form across versions.
  • The model weights: Anthropic may have rolled out a minor update, or your requests may be silently A/B routed to a new variant.
  • The inference provider: Claude Code can be configured to call Anthropic's API directly, or to route through Amazon Bedrock or Google Vertex AI. If your org flipped that setting, you changed infrastructure.
  • The inference hardware: Which silicon actually ran the tensor math. Covered below - this is the layer most engineers don't realise is moving under them.
  • Your own environment: A new MCP server, a new subagent definition, a settings.json tweak, a CLAUDE.md edit you forgot about.

Most people think about the model and the system prompt. The context window, the thinking, the provider and the hardware are where the mental model breaks.

Provider vs hardware

These two are easy to conflate. They are not the same thing, and both vary.

The provider is who you have a billing relationship with. According to Anthropic's own API overview, Claude is available through the direct Claude API and through three third-party platforms: Amazon Bedrock, Google Cloud Vertex AI, and Microsoft Azure AI Foundry. Each runs its own infrastructure, with its own feature availability. Picking the provider is a configuration choice — Claude Code doesn't silently shuffle your requests across them — but it is a choice your org might change without telling you.

The hardware is which chip ran the forward pass. And here's where it gets interesting.

The hardware below the provider

Anthropic does not run its own data centers end-to-end. They rent capacity from the major hyperscalers and run Claude on a deliberately heterogeneous fleet. In Anthropic's own words, Claude runs on "a range of AI hardware — AWS Trainium, Google TPUs, and NVIDIA GPUs".

The scale of that fleet is public. AWS Project Rainier, announced at re:Invent 2024 and brought online in late 2025, is a roughly 500,000-Trainium2 cluster built for Anthropic. In October 2025, Anthropic committed to up to a million Google TPUs over the next few years, and in April 2026 expanded that partnership to multiple gigawatts of next-generation TPU capacity. NVIDIA GPUs remain in the mix alongside both.

So a single request to api.anthropic.com — same endpoint, same model name — can land on NVIDIA GPUs, Trainium, or TPUs depending on workload, capacity, and region. The harness has no visibility into which chip served which token, and neither do you.

This matters because the batch-invariance problem from Layer 1 does not just apply within one chip type. Different silicon runs different kernels, different batch implementations, different rounding. Floating-point non-associativity compounds across all of it. "Same model" at the API surface does not mean "same tensor math" underneath.

The variability stacks: model → harness → provider → region → hardware → batch. Any of those can move between today and tomorrow without you knowing.

What you can actually do

None of this is a reason to stop using agent harnesses. The productivity gain is real. But stop expecting them to behave like the deterministic tools you're used to.

Pin what you can. Model version, Claude Code version, a checked-in CLAUDE.md. None give true reproducibility, but they cut variance meaningfully.

Write evals, not vibes. For tasks where repeatability matters - code review prompts, migration scripts, test generation - build a small eval suite you can run against new harness versions before you upgrade. Treat harness releases like dependency bumps.

Capture transcripts. When something works well, or when something fails spectacularly, save the full transcript. It's the only artifact that records what the system actually did. Logs beat memory.

Treat "it worked yesterday" as a hypothesis. Not a fact. The question is always: what changed? If you can't enumerate the variables, you can't debug. If you accept that some variables are outside your reach, you can at least stop assuming the problem is you.

The engineering mindset still applies. You just have to apply it to a moving target.