Fallback method to execute Python code when execute_code_sandbox fails with e2b errors
54
60%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Critical
Do not install without reviewing
Fix and improve this skill with Tessl
tessl review fix ./benchmarks/gdpval/skills/sandbox-fallback-execution-048d5a/SKILL.mdWhen execute_code_sandbox repeatedly fails with e2b sandbox errors, use this fallback pattern to execute Python code directly on the host system.
Use this skill when:
execute_code_sandbox fails with e2b-related errorsUse write_file to save your Python code as a .py file:
Tool: write_file
path: /workspace/script_name.py
content: |
# Your Python code here
import pandas as pd
# ... rest of codeUse run_shell with explicit python3 path:
Tool: run_shell
command: python3 /workspace/script_name.py
timeout: 120Check the stdout/stderr from run_shell for:
# Instead of this (failing):
Tool: execute_code_sandbox
code: |
import pandas as pd
df = pd.DataFrame({'a': [1,2,3]})
df.to_excel('output.xlsx')
# Use this fallback:
Tool: write_file
path: /workspace/generate_report.py
content: |
import pandas as pd
# Create sample data
df = pd.DataFrame({'a': [1,2,3], 'b': [4,5,6]})
# Save to Excel
df.to_excel('/workspace/output.xlsx', index=False)
print('File created successfully')
Tool: run_shell
command: python3 /workspace/generate_report.py
timeout: 120E2B execution errorSandbox timeoutConnection refusedSandbox initialization failedexecute_code_sandbox retry firstc5a9c4b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.