# Script Exec Blocked

> Sandbox approval policy blocks execute_code and python3 -c; use read_file/write_file + manual transforms instead of retrying both runners.

- Skill: `ashutoshsinghpr7/script-exec-blocked` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ashutoshsinghpr7/script-exec-blocked`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ashutoshsinghpr7/script-exec-blocked/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: ashutoshsinghpr7 (https://skillmd.com/u/ashutoshsinghpr7)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ashutoshsinghpr7/script-exec-blocked

---


# Script Execution Blocked in Sandbox

## Problem

`execute_code` and `python3 -c` fail with "BLOCKED … single-query mode (-q)
runs without a user present to approve it". Plain terminal commands (grep,
ls, file, xxd) and file tools (read_file, write_file) still work.

## Fix

- Do NOT retry both runners back-to-back: a real task burned two turns on
  `python3 -c` then `execute_code` before falling back.
- Compute small transforms manually from the files you read; write the
  deliverable with write_file; verify by re-reading it.
- Keep parsing/sorting simple enough to verify by hand.

## Evidence

- Hit in 3/4 analyzed traces; all three recovered this way; the one failure
  was a spec-interpretation bug, not a tooling problem.

