{"slug": "claude-managed-agents-memory-api-changed-today-fix-these-3-things-now", "title": "Claude Managed Agents Memory API Changed Today: Fix These 3 Things Now", "summary": "Anthropic changed the behavior of every Claude Managed Agents memory call in production on July 22, 2026, with the new `agent-memory-2026-07-22` beta header now live and the old `managed-agents-2026-04-01` header adopting 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, requiring immediate fixes to three key parameters: `depth` now only accepts 0, 1, or omission; `path_prefix` requires a trailing slash and matches whole path segments; and `order_by` and `order` parameters are silently ignored.", "body_md": "Anthropic changed the behavior of every Claude Managed Agents memory call in production today. The `agent-memory-2026-07-22`\n\nbeta 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`\n\nheader adopts the same new list semantics. Developers passing custom `depth`\n\nvalues or using `path_prefix`\n\nwithout a trailing slash will hit 400 errors or silent regressions starting now. Here is what changed and how to fix it.\n\n## Why Claude Agent Memory Matters\n\nClaude 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>/`\n\n. 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.\n\nThe 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.\n\n## Three Things That Break Today\n\n### 1. The depth Parameter Is Now Strict\n\nPreviously, you could pass any integer as `depth`\n\non 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`\n\n, `1`\n\n, or omitting the parameter entirely. Any other value returns a 400 error.\n\nIf your code does this, it breaks today:\n\n```\n# Breaks with 400 starting July 22\nmemories = client.beta.memory_stores.memories.list(\n    store_id=store_id,\n    depth=2\n)\n\n# Correct — use 0, 1, or omit entirely\nmemories = client.beta.memory_stores.memories.list(\n    store_id=store_id,\n    depth=1\n)\n```\n\n### 2. path_prefix Now Matches Whole Segments, Not Substrings\n\nThis one is more dangerous because it will not throw an error — it will silently return wrong results. The `path_prefix`\n\nparameter now requires a trailing slash and matches whole path segments, not substrings.\n\n`path_prefix=\"user\"`\n\npreviously matched `user-data/`\n\n, `user-preferences/`\n\n, and `user/`\n\n. After today it matches nothing — it lacks the trailing slash. `path_prefix=\"user/\"`\n\nnow matches only the `user/`\n\ndirectory and its contents.\n\n```\n# Silent regression — may return empty or wrong results starting today\nmemories = client.beta.memory_stores.memories.list(\n    store_id=store_id,\n    path_prefix=\"user\"\n)\n\n# Correct — trailing slash required\nmemories = client.beta.memory_stores.memories.list(\n    store_id=store_id,\n    path_prefix=\"user/\"\n)\n```\n\nAudit every `path_prefix`\n\ncall in your codebase. If it does not end with `/`\n\n, it is now broken.\n\n### 3. Result Order Is No Longer API-Controlled\n\nThe `order_by`\n\nand `order`\n\nparameters 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.\n\n## Who Is Actually Affected\n\nIf 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`\n\nand `path_prefix`\n\nbehavior changes — those apply regardless of SDK version or header.\n\nIf you call the API directly or set beta headers manually, replace `managed-agents-2026-04-01`\n\nwith `agent-memory-2026-07-22`\n\non 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.\n\n## The Three-Step Fix\n\n**Step 1:** Upgrade your SDK.\n\n```\n# Python\npip install \"anthropic>=0.116.0\"\n\n# Node.js\nnpm install @anthropic-ai/sdk@latest\n```\n\n**Step 2:** Search your codebase for `path_prefix`\n\nand `depth`\n\narguments on any memory store list call. Add trailing slashes to every `path_prefix`\n\nvalue. Replace any `depth`\n\nvalue above 1 with `1`\n\n, or remove the parameter entirely.\n\n**Step 3:** If you set beta headers manually, swap `managed-agents-2026-04-01`\n\nwith `agent-memory-2026-07-22`\n\non memory store calls only. Non-memory-store Managed Agents calls still use `managed-agents-2026-04-01`\n\n.\n\nThe 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.", "url": "https://wpnews.pro/news/claude-managed-agents-memory-api-changed-today-fix-these-3-things-now", "canonical_source": "https://byteiota.com/claude-managed-agents-memory-api-changed-today-fix-these-3-things-now/", "published_at": "2026-07-22 03:09:40+00:00", "updated_at": "2026-07-22 03:36:34.667843+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-products", "developer-tools"], "entities": ["Anthropic", "Claude Managed Agents Memory", "Rakuten", "Netflix", "Wisedocs", "Ando", "Python SDK", "TypeScript SDK"], "alternates": {"html": "https://wpnews.pro/news/claude-managed-agents-memory-api-changed-today-fix-these-3-things-now", "markdown": "https://wpnews.pro/news/claude-managed-agents-memory-api-changed-today-fix-these-3-things-now.md", "text": "https://wpnews.pro/news/claude-managed-agents-memory-api-changed-today-fix-these-3-things-now.txt", "jsonld": "https://wpnews.pro/news/claude-managed-agents-memory-api-changed-today-fix-these-3-things-now.jsonld"}}