← Technology, Science & Infrastructure ▣ Distilled locally

AWS open-sources Strands Stash so Claude Code and Codex can pull context from a single folder

By Paul Sawers
December 4, 2026  ·  The New Stack ↗
An illustration of a computer screen with folders on it.

An AI agent might need just a handful of lines from a document or database to complete a task, yet the entire contents of a tool response can end up in the model’s context window. As agents undertake longer and more complex tasks, this means they’re consuming valuable context space — and tokens — on information they may never actually need.

It’s a problem Amazon Web Services (AWS) is looking to address with a new open source tool called Strands Stash, which gives AI agents a way to manage their context through a filesystem.

Stash is the latest addition to AWS’s Strands family, which began with Strands Agents, an open source SDK that AWS introduced last year to simplify AI agent development. AWS subsequently open-sourced Strands Harness back in September, a ready-to-run, general-purpose agent that it claimed could achieve comparable performance to Anthropic’s Claude Code and OpenAI’s Codex at a 28% lower token cost.

Context as files

In a blog post announcing the tool on Tuesday, AWS explains that developers often resort to truncating tool results, trimming context windows, or building custom tools for individual data sources. However, such approaches can compromise agent performance and make switching between harnesses more cumbersome.

“These workarounds still leave agent state tied to its harness.”

“These workarounds still leave agent state tied to its harness,” the authors write. “A harness’s own compaction and memory stay inside that harness, so teams rebuild the context layer when they change harnesses.”

With Strands Stash, AWS is extending the familiar filesystem interface that agents already use to encompass external context sources. A small background program runs alongside the agent, making information from memory stores, knowledge bases, MCP servers, and other sources available as Markdown and JSON files in a single directory.

Strands Stash gives agents a filesystem for context
Strands Stash gives agents a filesystem for context. Image credit: AWS.

Each source has its own subfolder and a descriptive page under _sources/ explaining what it contains and how to access it. Developers can add new sources through a few lines of configuration or via plugins, giving agents a consistent way to access and search data across disparate sources.

When a tool returns a large volume of data, Stash saves the full result to a file, provided it fits within the configured storage limits, and gives the agent a short preview and the file’s path. The remaining data stays outside the context window until it’s needed.

Crucially, agents already know how to navigate filesystems. Using familiar shell commands such as ls, cat, and grep, an agent can locate, read, and filter the information it needs. An agent querying customer order records, for instance, could isolate refunded orders without sending every record to the model.

An agent uses standard shell commands to retrieve and filter context.
An agent uses standard shell commands to retrieve and filter context. Image credit: AWS.

And because that context resides in a filesystem independently of the harness, an agent can also share its workspace with sub-agents where supported. Notes and memory can persist across sessions and even across different harnesses.

Stash works with Claude Code and Codex, as well as AWS’s Kiro and Strands Agents, and ships with built-in integrations for AWS services such as Bedrock AgentCore Memory and Bedrock Knowledge Bases, alongside support for Model Context Protocol (MCP) servers.

It’s worth noting that Stash won’t necessarily benefit every agent. For shorter tasks involving small tool results, AWS acknowledges that the additional overhead of navigating the filesystem may outweigh the benefits.

To get started, developers can install Stash globally via npm (npm install -g @strands-agents/stash) or Python (pipx install strands-stash), with a standalone installation script also available through GitHub. The stash configure command guides developers through setting up their context sources, while stash attach connects their chosen harness.

Stash is currently in preview for Linux and Apple silicon Macs, and AWS has published a quickstart guide that doesn’t require an AWS account.

Beyond context management

Strands Stash is part of a broader push by AWS to reduce the cost of running AI agents. This week, the company also introduced harness optimization in Strands Evals, its open source agent evaluation toolkit.

The new feature automates the process of tuning system prompts, tool descriptions, skills, and other harness settings against developers’ own test cases. In one benchmark involving simulated telecom customer service tasks, AWS increased Claude Haiku 5.5’s task success rate from 60% to 99% while reducing token costs by 16%, though other benchmarks showed that improving accuracy sometimes came at the expense of higher token consumption.

“Agents are showing up in places where startup time, memory and concurrency really matter.”

Elsewhere, AWS is also targeting infrastructure overhead, bringing Strands Harness and its underlying SDK to Rust in developer preview.

In a blog post announcing Rust support, Arron Bailiss, a principal engineer at AWS, points to the growing use of AI agents in serverless computing, robotics, and resource-constrained edge devices.

“Agents are showing up in places where startup time, memory and concurrency really matter,” Bailiss writes.

In tests on AWS Lambda, the Rust implementation recorded median cold start times of 50 milliseconds, versus 635 milliseconds for TypeScript and 2,428 milliseconds for Python, while consuming roughly a quarter of the memory of either of the other two implementations.

Notably, AWS built the Rust implementation using Strands Factory, an autonomous software development system based on Strands Harness and its SDK that the company also open-sourced this week.

These developments are part of a broader effort by AWS to reduce agent operating costs at every level, including the models themselves. Just last week, AWS released Strands Decider v2, a family of open-weight models designed to handle routine agent decisions without incurring the expense of calling larger language models.

Originally published by The New Stack ↗ · rebuilt here from its own full-text RSS feed · all rights remain with the publisher, please read and support them there.