anthropics / anthropics/claude-agent-sdk-python

[Feature Request] Add Code Execution Tool Container Support to Agent SDK

未關閉
#647 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
8.1k
分支
1.3k
平均合併
2 天 31 分鐘
30 天內合併 PR
1

描述

Description:

The Messages API currently supports persistent container execution with the code execution tool (code_execution_20250825), including container ID reuse, file uploads via the Files API, and retrieval of generated files [2](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool).
This functionality is available on Microsoft Azure AI Foundry [2](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool).

The Agent SDK provides built-in tools, including Bash for terminal commands [3](https://platform.claude.com/docs/en/agent-sdk/overview), but lacks native support for the Messages API's code execution container functionality with container ID persistence.

Use Case:

I'm building agents that need to:

Execute code in persistent containers across multiple turns (maintaining state between executions)
Upload skill directories and files to containers
Retrieve generated files from container executions
Deploy on Microsoft Azure AI Foundry with container persistence
Integrate with the Microsoft Agent Framework
Current Workaround:

Currently considering wrapping the Messages API client as a custom tool in the Agent SDK, but this approach may not maintain the same container lifecycle guarantees or integrate cleanly with the Agent SDK's architecture.

Requested Feature:

Add native support for the code execution tool's container functionality to the Agent SDK, including:

Container ID persistence across agent turns
File upload capabilities (via Files API integration)
Generated file retrieval
Full compatibility with Microsoft Azure AI Foundry deployments [7](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#authentication)
Benefits:

Enables stateful code execution in Agent SDK workflows
Provides feature parity between Messages API and Agent SDK
Simplifies integration with Microsoft Agent Framework
Reduces need for custom workarounds that may not maintain proper container lifecycle
Additional Context:

Microsoft Agent Framework is already implementing support for code_execution_[2] (https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)02508252, and native Agent SDK support would enable better integration patterns for enterprise deployments on Azure.

https://github.com/microsoft/agent-framework/pull/4339

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。