# Claude Managed Agents Memory API Changed Today: Fix These 3 Things Now

> Source: <https://byteiota.com/claude-managed-agents-memory-api-changed-today-fix-these-3-things-now/>
> Published: 2026-07-22 03:09:40+00:00

Anthropic changed the behavior of every Claude Managed Agents memory call in production today. The `agent-memory-2026-07-22`

beta header is now live — and the critical part is that you do not need to switch headers to be affected. As of July 22, the old `managed-agents-2026-04-01`

header adopts the same new list semantics. Developers passing custom `depth`

values or using `path_prefix`

without a trailing slash will hit 400 errors or silent regressions starting now. Here is what changed and how to fix it.

## Why Claude Agent Memory Matters

Claude Managed Agents Memory [launched in public beta on April 23, 2026](https://claude.com/blog/claude-managed-agents-memory). A memory store is a workspace-scoped collection of text documents mounted inside a session container at `/mnt/memory/<store-name>/`

. The agent reads, writes, and updates them using the same file tools it already uses for code — no special memory API inside the agent, just the filesystem.

The results speak for themselves. Rakuten’s agents report 97% fewer first-pass errors, 27% lower costs, and 34% lower latency — because agents that remember every past mistake stop repeating them. Netflix, Wisedocs, and Ando are running production workflows on it. The April launch was three months ago, and adoption is ahead of the announcement pace. Today’s API change reflects that: the memory subsystem is being tightened for GA readiness.

## Three Things That Break Today

### 1. The depth Parameter Is Now Strict

Previously, you could pass any integer as `depth`

on a memory list call and the API would handle it (often silently clamping or ignoring the value). Starting today, the only accepted values are `0`

, `1`

, or omitting the parameter entirely. Any other value returns a 400 error.

If your code does this, it breaks today:

```
# Breaks with 400 starting July 22
memories = client.beta.memory_stores.memories.list(
    store_id=store_id,
    depth=2
)

# Correct — use 0, 1, or omit entirely
memories = client.beta.memory_stores.memories.list(
    store_id=store_id,
    depth=1
)
```

### 2. path_prefix Now Matches Whole Segments, Not Substrings

This one is more dangerous because it will not throw an error — it will silently return wrong results. The `path_prefix`

parameter now requires a trailing slash and matches whole path segments, not substrings.

`path_prefix="user"`

previously matched `user-data/`

, `user-preferences/`

, and `user/`

. After today it matches nothing — it lacks the trailing slash. `path_prefix="user/"`

now matches only the `user/`

directory and its contents.

```
# Silent regression — may return empty or wrong results starting today
memories = client.beta.memory_stores.memories.list(
    store_id=store_id,
    path_prefix="user"
)

# Correct — trailing slash required
memories = client.beta.memory_stores.memories.list(
    store_id=store_id,
    path_prefix="user/"
)
```

Audit every `path_prefix`

call in your codebase. If it does not end with `/`

, it is now broken.

### 3. Result Order Is No Longer API-Controlled

The `order_by`

and `order`

parameters are now silently ignored. Results return in a stable server-defined order. If your code relies on the API returning memories in a specific order — by creation time, alphabetically, or otherwise — review that logic now.

## Who Is Actually Affected

If you are using a current SDK, you are partially protected. The [Python SDK (0.116.0+)](https://github.com/anthropics/anthropic-sdk-python/releases/tag/v0.116.0), TypeScript SDK (0.110.0+), Go (1.56.0+), Java (2.48.0+), Ruby (1.55.0+), PHP (0.36.0+), C# (12.35.0+), and CLI (1.16.0+) all send the correct header automatically. But they do not protect you from the `depth`

and `path_prefix`

behavior changes — those apply regardless of SDK version or header.

If you call the API directly or set beta headers manually, replace `managed-agents-2026-04-01`

with `agent-memory-2026-07-22`

on memory store calls. Sending both headers on the same request returns a 400. Also: page cursors issued under the old header are not valid under the new one — restart pagination from page 1 when adopting the new header.

## The Three-Step Fix

**Step 1:** Upgrade your SDK.

```
# Python
pip install "anthropic>=0.116.0"

# Node.js
npm install @anthropic-ai/sdk@latest
```

**Step 2:** Search your codebase for `path_prefix`

and `depth`

arguments on any memory store list call. Add trailing slashes to every `path_prefix`

value. Replace any `depth`

value above 1 with `1`

, or remove the parameter entirely.

**Step 3:** If you set beta headers manually, swap `managed-agents-2026-04-01`

with `agent-memory-2026-07-22`

on memory store calls only. Non-memory-store Managed Agents calls still use `managed-agents-2026-04-01`

.

The full migration reference is in the [Claude Platform memory docs](https://platform.claude.com/docs/en/managed-agents/memory). The [developer platform release notes](https://platform.claude.com/docs/en/release-notes/overview) have the complete changelog. The API tightening is a clear signal that memory is heading toward GA — APIs do not get stricter validation as a courtesy. Start treating your memory store calls with the same rigor you apply to any production endpoint.
