CLAUDE LABJP
AGENTS — When you create a Managed Agents session, pass agent_with_overrides to swap the model, system prompt, tools, MCP servers, or skills for that single sessionKEYS — API keys in the Claude Console can now carry an expiration (a preset, a custom duration, or Never), with an email reminder before keys that live 7 days or longer expireMCP — Admins can provision MCP connectors org-wide through their identity provider, starting with Okta, so users get connector access automatically on first loginWORKBENCH — The legacy Workbench at platform.claude.com/workbench retires on August 17, along with the experimental prompt generate, improve, and templatize APIsREVIEW — Claude Code adds a background /code-review so you can keep working while a review runs, with better MCP and Windows path handling alongsideFASTEND — Fast mode for Claude Opus 4.7 is removed today, July 24. Any speed: 'fast' calls need to move over to Opus 4.8AGENTS — When you create a Managed Agents session, pass agent_with_overrides to swap the model, system prompt, tools, MCP servers, or skills for that single sessionKEYS — API keys in the Claude Console can now carry an expiration (a preset, a custom duration, or Never), with an email reminder before keys that live 7 days or longer expireMCP — Admins can provision MCP connectors org-wide through their identity provider, starting with Okta, so users get connector access automatically on first loginWORKBENCH — The legacy Workbench at platform.claude.com/workbench retires on August 17, along with the experimental prompt generate, improve, and templatize APIsREVIEW — Claude Code adds a background /code-review so you can keep working while a review runs, with better MCP and Windows path handling alongsideFASTEND — Fast mode for Claude Opus 4.7 is removed today, July 24. Any speed: 'fast' calls need to move over to Opus 4.8
Articles/API & SDK
API & SDK/2026-07-24Advanced

When Memory Store Listings Returned Half the Rows: Migrating to agent-memory-2026-07-22

The Managed Agents memory listing behavior changed under agent-memory-2026-07-22: fixed ordering, stricter depth, and segment-based path_prefix matching. Here is how an audit script quietly dropped rows, and how to design a memory access layer that survives the change.

Claude47Managed Agents3Memory4API28Migration3

Premium Article

My morning audit script was quieter than usual.

As an indie developer, I hand the day-to-day operations of a handful of apps to a single Managed Agents session. Overnight it looks at crawl status, billing, and inbound questions, then leaves a summary for me to read at breakfast. To support that, I keep a memory store per project, writing down "the decision we made last time" and "the setting nobody should touch."

Every morning I list those memories and look at the diff. It had become a habit. Then one morning the listing returned fewer rows. The day before it had returned 68 across all projects; that morning, 39. Nearly half. No error. No exception, no warning, nothing. A few projects' memories had simply disappeared from the results.

The cause was a single beta header I had bumped the night before: agent-memory-2026-07-22.

Why call the memory listing API yourself

A Managed Agents memory store is mounted into the session container at /mnt/memory/, and the agent reads and writes it with the ordinary file tools. For that part, you can leave everything to the agent.

Calling the listing API from the human side serves a different purpose. Reviewing what the agent wrote. Correcting a bad memory. Exporting the store periodically for an audit. In my case, it was the daily diff: I would walk each project by narrowing memories.list with path_prefix.

Each memory is capped at 100 kB (roughly 25,000 tokens), and the docs explicitly advise structuring memory as "many small focused files, not a few large ones." I followed that, running a tree where the project name sits in the first path segment, like /projects/alpha/decisions/2026-07.md. That design turned out to be exactly where this change landed.

The three things that changed in agent-memory-2026-07-22

Once you bump the beta header to agent-memory-2026-07-22, memories.list behaves differently in three ways.

AspectBeforeAfter (agent-memory-2026-07-22)
List orderingControlled by order_by / orderFixed to a stable, server-defined order. order_by / order are ignored
depth valueAccepted any integerOnly 0, 1, or omitted. Anything else is a 400
path_prefix matchSubstring matchTrailing slash required. Matches whole path segments

You can brace for the first two just by reading them. The third is the troubling one, because its failure mode is "not an error, just a quietly different result."

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
The three changes in agent-memory-2026-07-22: fixed list ordering, restricted depth values, and segment-based path_prefix matching
The trap where a path_prefix without a trailing slash silently returns zero rows, with steps to reproduce it
A memory audit layer that depends on neither ordering nor substring prefix behavior
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Claude Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API & SDK2026-06-21
Connecting Managed Agents to Services You Don't Want to Expose: MCP Tunnel Design
How to connect Claude Managed Agents to an internal MCP server that is never exposed to the public internet. We cover the MCP tunnel, self-hosted sandboxes, authorization boundaries, and graceful degradation when things break.
API & SDK2026-07-14
A Two-Stage Pre-Publish Gate for User-Facing AI Text in Consumer Apps
Design a two-stage pre-publish gate for short AI-generated text you ship to end users: a deterministic rule layer plus a Claude classifier, with fail-closed handling, generation-time vetting, and a cost model. Full implementation code included.
API & SDK2026-07-12
A Long Non-Streaming Response Was Billed Twice Past the 10-Minute Wall: Redesigning the SDK's Default Timeout and Retries
The Anthropic SDK's default 10-minute timeout and two automatic retries can silently re-run a long non-streaming response and bill you twice. Here is how the trap works, and how to close it with streaming, explicit timeout/max_retries, and a small local ledger — with measured before/after numbers.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →