---
title: "Discussion on \"Pydantic AI + Anthropic: \"Container identifier can only be provided when using the code execution tool\" (400)\" | Hashnode"
description: "Discussion on \"Pydantic AI + Anthropic: \"Container identifier can only be provided when using the code execution tool\" (400)\". A follow-up run used to reuse the code execution container from message history on requests without code execution. Upgrade to 2.65.0+, or on older releases set anthropic_container=False / strip the id."
url: "https://hashnode.com/posts/pydantic-ai-anthropic-container-identifier-code-execution-400/6aee024c4386290813dcf000"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Pydantic AI + Anthropic: "Container identifier can only be provided when using the code execution tool" (400)](https://memorysync.hashnode.dev/pydantic-ai-anthropic-container-identifier-code-execution-400?utm_source=hashnode&utm_medium=feed)

A follow-up run used to reuse the code execution container from message history on requests without code execution. Upgrade to 2.65.0+, or on older releases set anthropic\_container=False / strip the id.

Nov 6 · 8 min read · memorysync.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#ai](https://hashnode.com/tag/ai)
-   [#llm](https://hashnode.com/tag/llm)
-   [#agents](https://hashnode.com/tag/agents)
-   [#pydantic](https://hashnode.com/tag/pydantic)

## Written by

[MemorySync](https://hashnode.com/@memorysync)

@memorysync · San Francisco, USA

  
[View profile](https://hashnode.com/@memorysync)

Building MemorySync (memorysync.io) — persistent memory infrastructure for AI agents, Cursor, and Claude Code.

Building MemorySync (memorysync.io) — persistent memory infrastructure for AI agents, Cursor, and Claude Code.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
