Back Home

代理基礎設施

Anthropic Memory Store API Changes Pagination and Path Semantics, Potentially Invalidating Old Cursors and Query Parameters

New rules for Claude Managed Agents memory listing took effect on July 22, including stable ordering, directory-style prefix matching, and restricted query depth. This is more than an SDK header change: existing synchronization programs may encounter 400 errors, missing items, or invalid cursors.

Прикли · CC0 · Image source
zh-Hant

Anthropic has moved the Claude Managed Agents memory store endpoints to the `agent-memory-2026-07-22` behavior. The core changes affect `GET /v1/memory_stores/{id}/memories`: the server now returns results in a stable order that users cannot specify, while `order_by` and `order` are ignored; `depth` must either be omitted or set to 0 or 1; and `path_prefix` must end with a slash and is matched against complete path segments rather than treated as an arbitrary substring search.

These restrictions directly affect memory synchronization tools. Cursors from the previous version cannot be reused under the new semantics, so migrations must rescan from the first page. If an application sends both the old and new beta headers, the API returns a 400 error. Anthropic’s Python, TypeScript, Go, Java, Ruby, PHP, C#, and CLI SDKs have been updated to send the new header, but systems that override `betas`, use handwritten HTTP clients, or call the API through proxy gateways still require manual review. Engineering teams should also validate directory listing, incremental synchronization, deletion detection, and deduplication after retries—not merely confirm that requests succeed.

A memory store is itself a workspace-scoped collection of text files that can be mounted at `/mnt/memory/` when creating a session, with either read-only or read-write permissions. This allows agents to retain preferences and project knowledge across sessions, but it also expands the trust boundary. Recent research indicates that prompt injections planted in memory files can influence subsequent sessions, with attack success rates varying significantly by model, target, and interaction sequence. The new deterministic listing behavior therefore helps with auditing and synchronization, but it does not resolve questions of content trustworthiness. As a next step, deployers should treat memory writes as privileged state changes and add source attribution, version review, read-only mounts, and alerts for anomalous modifications.

Sources

  1. Claude Platform release notes
  2. Bad Memory: Evaluating Prompt Injection Risks from Memory in Agentic Systems