Fix: cross execution environment file transfer #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Skills directory not transferring to sub-agents
Problem
When a supervisor agent with a skills_dir delegated tasks to sub-agents, the skills directory was not being
transferred to the sub-agent's execution environment for cross-environment transfers.
Root Cause
The
upload_filesmethod in CodeExecToolProvider only supported single file transfers for cross-environmentoperations (e.g., E2B sandbox to E2B sandbox). When the agent tried to transfer the skills directory:
The code would call read_file_bytes("skills") which fails because you can't read a directory as bytes. The
transfer silently failed, leaving sub-agents without access to skills.
Additionally, files were being placed in the wrong location (data_analysis/SKILL.md instead of skills/data_analysis/SKILL.md) because the source directory name wasn't being preserved.
Solution
Added two new abstract methods to CodeExecToolProvider:
Updated upload_files to handle directories in cross-environment transfers:
Other
This PR also updates the tasks in the following examples:
examples/browser_use_example.pyexamples/open_responses_example.py