◉CLAUDE LABJP
●2.1.302 — Fork subagents are now on by default in claude -p, the Agent SDK and the desktop app. Turn them off with CLAUDE_CODE_FORK_SUBAGENT=0 (10/16)●2.1.301 — Unattended retries now stop on their own when a usage limit is hit instead of waiting (10/15). Latest is 2.1.304 (10/19)●SONNET 4.5 — Retires on the Claude API on 11/30, 40 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…●2.1.302 — Fork subagents are now on by default in claude -p, the Agent SDK and the desktop app. Turn them off with CLAUDE_CODE_FORK_SUBAGENT=0 (10/16)●2.1.301 — Unattended retries now stop on their own when a usage limit is hit instead of waiting (10/15). Latest is 2.1.304 (10/19)●SONNET 4.5 — Retires on the Claude API on 11/30, 40 days left. Migrate to Sonnet 5.5●WINDOWS — Reports say hooks break silently only on Japanese-locale Windows; check the character encoding first●FAST MODE — Opus 5.5 fast mode is out of research preview and no longer needs the beta header (10/15)●NEW — I Put a Ten-Line Promise File at the To…
Articles/API & SDK
⬡ API & SDK/2026-07-24Advanced

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

agent-memory-2026-07-22 changed memories.list: fixed ordering, stricter depth, segment-based path_prefix matching. How an audit quietly halved, an access layer that survives it, finding every call site with ast, and measured depth=1 traversal cost.

Claude53Managed Agents4Memory6API28Migration7

✦ 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, plus finding call sites with ast where grep catches only 1 of 5
✦An audit layer that depends on neither ordering nor substring behavior, plus measured depth=1 traversal cost (698.6ms sequential vs 147.8ms level-parallel, and why recursing inside a shared pool deadlocks)
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-03-15
Building an AI Chatbot with Claude API — Streaming, Conversation History & Cost Optimization
A record of building a chatbot on the Claude API from a minimal script upward: conversation history, streaming, a FastAPI endpoint, cost trimming, LINE/Telegram/Discord, and PII masking. The retry logic was rebuilt around measured jitter and the retry-after header.
⬡ API & SDK2026-10-13
Haiku 5.5 is cheaper per token, but your bill jumps fivefold past about 77k Haiku 4.5 tokens
On the price sheet, Haiku 5.5 costs roughly a tenth of Haiku 4.5. But the same text becomes about 30% more tokens, and a prompt over 100k tokens is billed at five times the rate. Here is the boundary in Haiku 4.5 terms, a script I actually ran, and the changes that return a 400.
⬡ API & SDK2026-10-08
Before Sonnet 4.5 retires, one script to find the arguments that will return a 400
claude-sonnet-4-5 retires on November 30. Swapping the model ID is not enough: budget_tokens, prefill, and tool_choice will fail. Here is a scanner built from the official migration guide, its real output, and the order I would fix things in.