Skip to content

fix: correct BetaAsyncAbstractMemoryTool docstring example#1301

Open
Scottcjn wants to merge 2 commits intoanthropics:mainfrom
Scottcjn:fix/async-memory-tool-docstring
Open

fix: correct BetaAsyncAbstractMemoryTool docstring example#1301
Scottcjn wants to merge 2 commits intoanthropics:mainfrom
Scottcjn:fix/async-memory-tool-docstring

Conversation

@Scottcjn
Copy link
Copy Markdown

Summary

The BetaAsyncAbstractMemoryTool docstring example was copy-pasted from the sync BetaAbstractMemoryTool without updating for async usage.

Three fixes

  1. Wrong base class: BetaAbstractMemoryToolBetaAsyncAbstractMemoryTool
  2. Sync methods: def view()async def view(), def create()async def create()
  3. Sync client: Anthropic() + .until_done()AsyncAnthropic() + await ... .until_done()

Test plan

  • Docstring example now uses correct async patterns
  • No functional code changes

Fixes #1290

@Scottcjn Scottcjn requested a review from a team as a code owner March 26, 2026 15:22
…reaming

The beta path (_beta_messages.py) wraps from_json() with a try-except
that provides an actionable error message including the raw JSON.
The non-beta path (_messages.py) was missing this wrapper, causing
raw ValueError with no context ("expected ident at line 1 column 11").

Fixes anthropics#1265
The docstring example was copy-pasted from the sync class without
updating: wrong base class name, sync methods instead of async,
Anthropic() instead of AsyncAnthropic(), missing await.

Fixes anthropics#1290
@Scottcjn Scottcjn force-pushed the fix/async-memory-tool-docstring branch from fbbc757 to 26b1eea Compare March 27, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BetaAsyncAbstractMemoryTool docstring contains sync-only example (copy-paste from sync class)

1 participant