Strands harness vs Claude Code: which uses fewer tokens with the same model?

According to AWS’s own benchmarks, Strands harness spends 28% fewer tokens than Claude Code, Codex, and other agent harnesses when all use the same Claude or GPT models, with nearly equal accuracy. The nuance lies in AWS’s own announcement: Strands harness was designed as a general-purpose agent, not a coding agent, so it doesn’t directly replace the tool you program with every day.

Note: figures and versions as of September 24, 2026. The benchmarks are from AWS, and at the time of publishing this note, the research paper supporting them had not yet been published.

The Strands Agents team at AWS launched it on September 21 under the Apache 2.0 license, with packages for Python and TypeScript and a CLI on top. Two days later it hit the front page of Hacker News. Here’s what that 28% actually measures, where the savings come from, how to install it, and how to verify your token bill yourself.

What is Strands harness and what is Strands Agents?

Strands harness is a pre-assembled agent harness: a single import gives you a working agent, with:

  • shell and file tools (read, write, edit)
  • web access
  • context management and prompt caching
  • sessions and long-term memory
  • a built-in auxiliary sub-agent
  • a task list
  • support for Agent Skills and MCP servers

It works with Amazon Bedrock (the default provider), Anthropic, OpenAI, and Google, plus Ollama for local models and LiteLLM.

It’s built on top of Strands Agents, AWS’s open source SDK for building agents in Python and TypeScript. The SDK is the toolbox: the agent loop, model providers, tools, hooks. The harness is the “batteries included” layer, with defaults measured against benchmarks. What you get is a standard Strands Agent, so you can override any default and drop down to the SDK if you need to.

If the concept of “harness” is new to you, we explain the discipline behind it in Harness engineering: the new work of the engineer.

Does Strands harness spend fewer tokens than Claude Code?

According to AWS’s numbers, yes, but it’s worth reading the fine print before quoting them. The two main figures are:

  • 28% lower cost across six benchmarks, comparing harnesses using the same Claude or GPT models. Tests were performed with distributed benchmarking on EC2 using Harbor.
  • 77% lower cost than Claude Code on Terminal Bench 2.1 with Claude Fable 5, and with a better score, across 89 runs per harness.

There are three things the headline doesn’t tell you:

  1. Strands is not the cheapest harness even in AWS’s own chart. According to the benchmark’s footnote, DeepSeek Harness comes out 14% cheaper than Strands, though it scored lower on all benchmarks. The same note clarifies that including DeepSeek Harness is what brought Strands’s total savings down to 28%. We analyze DeepSeek Harness in DeepSeek Harness: what happens when even the agent loop becomes a plugin.
  2. The scoring difference came out in the HN thread, not in the announcement. Albert Zhao, co-author of the post, said Strands scored 69.7 versus 61.8 for Claude Code on Terminal Bench 2.1 (Fable 5, high effort).
    • Another participant replied that Terminal Bench 2.1 is nearly saturated and public rankings show scores between 80 and 90%. In other words, these runs clearly used different configuration, and a trick to save tokens can look very good on a benchmark where everyone gets similar scores.
  3. Nothing independent backs up the figures yet. The team announced a paper from their researchers that, at the time of publishing this note, had not appeared.
    • In the same thread people asked why they left out Pi in its basic version while including Oh My Pi. The team responded that they would evaluate a run with Pi.

In summary: take the 28% as a credible manufacturer claim with a believable mechanism, not as measured data on your own work.

Where does the token savings come from?

According to AWS, almost all of it comes from context management. These are the defaults it attributes to the result:

  • tool results larger than roughly 1,500 tokens are truncated
  • summarization is activated when the context window exceeds 85%
  • if there’s an overflow, context retrieval runs within the loop itself

The documentation adds that bulky results are stored separately and replaced with a short preview and a reference. The agent only retrieves the full content if it really needs to.

The second lever is prompt caching. On Bedrock and Anthropic directly, Strands sets the cache points on its own. On OpenAI, Google, and bedrock-mantle, caching happens automatically on the provider’s side.

The practical conclusion: there’s no magic here. It’s the same discipline any serious harness applies, with defaults that someone measured. That’s also why a well-tuned custom harness can close the gap. If you want to start cutting tokens without changing tools, check out how to reduce tokens in Claude Code with hooks.

Can Strands harness replace Claude Code for programming?

Not as an everyday tool, and AWS doesn’t present it that way either. Their announcement says Strands harness is designed as a general-purpose agent and not as a coding agent. The target audience is someone building their own agent, ideally one that runs in the cloud, and who wants to start from something closer to the “just works” feel of Claude Code.

It has the primitives a coding agent needs: shell, file editing, sub-agents, and MCP. Its system prompt tells it to explore before changing anything, confirm before any irreversible action, and verify before declaring something done. Still, the comparison with Claude Code is about the cost in tokens per task at the harness layer, not the full experience of a programming tool.

Does it save you money if you already pay for Claude Code?

Not necessarily, because the payment method is different. Strands harness calls models through each provider’s APIs: Bedrock credentials or an API key from a provider. The savings AWS measured is savings in API spend. If you use Claude Code with a subscription, you pay with different logic, and that “28% cheaper” doesn’t translate directly to your bill. To see how per-seat and per-token payment compare, check out Gloo Code vs Claude Code.

How do I install Strands harness and create my first AI agent?

You have three paths: the CLI, the Python library, or the TypeScript library.

With the CLI (interactive, no code):

npm install -g @strands-agents/cli
strands

The setup wizard asks what your agent should do and suggests a model, tools, skills, MCP servers, memory, and a tool approval mode. When you’re done, /export inside the chat generates a project in Python or TypeScript with your choices.

With Python (requires Python 3.10 or higher):

pip install strands-harness

from strands_harness import create_harness

agent = create_harness(model="anthropic/claude-sonnet-5")

agent("Research the three most common strategies for versioning a REST API, compare their tradeoffs, and write a recommendation to api-versioning.md")

With TypeScript:

npm install @strands-agents/harness

import { createHarness } from '@strands-agents/harness'

const agent = await createHarness({ model: 'anthropic/claude-sonnet-5' })

await agent.invoke('Research the three most common strategies for versioning a REST API, compare their tradeoffs, and write a recommendation to api-versioning.md')

Model and credentials:

  • Model string. The model is chosen with a provider/name string. Supported prefixes are bedrock, bedrock-mantle, anthropic, openai, google, ollama, and litellm. Model names change often, so check the model selection page instead of copying an ID from an announcement.
  • Default provider. If you don’t specify a model, Strands uses Amazon Bedrock.
  • Bedrock credentials. Set AWS_BEARER_TOKEN_BEDROCK with a Bedrock API key, use aws configure, or set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. You also need to enable model access in the Bedrock console.

Sessions are enabled by default and saved in ./.agent/sessions. Pass session={"id": "my-project"} to resume a conversation. From the CLI, use strands --session-id my-project.

Does it work with Ollama and local models?

Yes. Download a model and pass it with the ollama/ prefix:

ollama pull llama3.1

from strands_harness import create_harness

agent = create_harness(model="ollama/llama3.1")

In that case, your only token cost is your own hardware.

How do I measure how many tokens your agent spends?

Run the same task with the same model and compare the usage counters. Since create_harness() returns a standard Strands Agent, SDK metrics apply:

result = agent("your task here")

print(result.metrics.accumulated_usage["totalTokens"])

Cache reads and writes appear as cacheReadInputTokens and cacheWriteInputTokens when the provider reports them. In TypeScript, the equivalent is result.metrics.accumulatedUsage.totalTokens.

Choose a task that resembles your actual work, not a benchmark, run it several times, and compare it with what your current harness reports for the same model. That’s the only 28% that matters to you. If you need a refresher on why each token translates to cost, we explain it in what tokens are in AI and why they charge you for them.

Is Strands harness free?

The harness is: it’s Apache 2.0 and you can deploy it anywhere that runs a Linux container. AWS mentions Modal, Cloudflare Containers, Azure Container Apps, Google Cloud Run, Amazon ECS, and Bedrock AgentCore. What you pay for are the models you call, unless you run them locally with Ollama.

As of September 24, 2026, harness packages are at version 0.1.x (harness-python/v0.1.2, harness-typescript/v0.1.1, harness-cli/v0.1.2), while the base SDK is already at 1.x. The organization is mature, but the harness itself is days old.

Who should try it?

Try it if you’re building an agent for something that isn’t your editor: an internal bot, a research agent, a pipeline that has to run in the cloud. For that, Strands harness gives you measured defaults instead of a whole afternoon of wiring. It’s also worth it if you want to measure what part of your token bill is harness overhead and not the model.

If you just want to code, stick with your current tool and wait for the promised paper.