Resilient multi-step workflow for spreadsheet processing when execute_code_sandbox fails, using shell_agent exploration, file-based scripts, and verification steps
This skill provides a robust workflow for processing spreadsheet files (CSV, XLSX) when execute_code_sandbox encounters failures. It uses a combination of tools to ensure reliable execution and clear error diagnosis.
execute_code_sandbox returns unknown errorsStart by using shell_agent to explore the file structure and understand what files exist:
Use shell_agent to:
- List files in the working directory
- Identify spreadsheet files (CSV, XLSX)
- Examine file sizes and basic structure
Example task for shell_agent:
Explore the current directory to find all spreadsheet files (CSV, XLSX).
List their sizes and identify which files need processing.
Create a standalone script file rather than executing inline code:
# Use write_file to create a script like "process_sheet.py"
content = """
import pandas as pd
import sys