Skip to content

fix(code-executor): resolve deepcopy recursion in VertexAiCodeExecutor #1762

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slaterlucas
Copy link

When running code like attached in the first screenshot where we are trying to use an agent engine with the vertex ai code executor, we encountered a recursion issue because the extension object couldn't be deep copied. Added a deepcopy
method that temporarily removes the extension during copy and re-initializes it when needed. This fixed the issue and allowed for creation of an agent engine with the VertexAICodeExecutor. Started working on it after experiencing it myself and seeing this issue #1730 .

Screenshot 2025-07-02 at 12 11 53 PM

Screenshot 2025-07-02 at 12 10 37 PM

Screenshot 2025-07-02 at 12 11 00 PM

@slaterlucas slaterlucas changed the title fixed recursion issue with vertex_ai_code_executor (Issue 1730) fixed recursion issue with vertex_ai_code_executor Jul 2, 2025
Add __deepcopy__ method to handle extension serialization during agent
deployment. Extension gets re-initialized automatically when needed.

Fixes agent engine deployment failures.
@slaterlucas slaterlucas changed the title fixed recursion issue with vertex_ai_code_executor fix(code-executor): resolve deepcopy recursion in VertexAiCodeExecutor Jul 2, 2025
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.

1 participant