| name | verified-script-execution |
| description | Fallback workflow for reliable file creation and verification when automated code execution fails |
Verified Script Execution Workflow
When execute_code_sandbox or shell_agent fails repeatedly, use this manual fallback pattern to reliably create and verify files through explicit shell commands.
When to Activate This Pattern
- After 3+ consecutive failures with
execute_code_sandbox
- When
shell_agent produces repeated errors without progress
- For critical deliverables (PDFs, Word docs, reports) that must be created reliably
- When working directory confusion causes file creation failures
Step 1: Verify Working Directory
Always confirm your current location before creating any files:
pwd
ls -la
This ensures you're writing to the correct workspace directory and reveals any existing files that might conflict.
Step 2: Create Scripts via Heredoc
Use shell heredoc syntax to create scripts with proper escaping. Choose the heredoc delimiter style based on your needs:
For literal content (no variable expansion):
cat > script_name.sh << 'EOF'
echo "Literal text with $symbols"
EOF
For content requiring variable expansion: