sandbox-exec-fallback

sandbox-exec-fallback is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 26 tokens per session (564 once invoked), scanned A, original, MIT.

A recovery procedure for running Python code through a shell when a code sandbox fails. It saves the script first, then runs and checks it.

In plain words
What is it for?
Running Python for spreadsheets, data processing, file output, or library-based calculations after a sandbox failure.
Why use it?
It provides a backup when sandbox execution cannot complete or create expected files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Running Python for spreadsheets, data processing, file output, or library-based calculations after a sandbox failure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/sandbox-exec-fallback
About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 7,544 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HKUDS/OpenSpace --skill sandbox-exec-fallback
Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sandbox-exec-fallback

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/sandbox-exec-fallback/github.svg)](https://agentmods.dev/skills/hkuds/openspace/sandbox-exec-fallback)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/sandbox-exec-fallback"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/sandbox-exec-fallback/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sandbox-exec-fallback

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/sandbox-exec-fallback"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/sandbox-exec-fallback.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 26 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 564 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00026 $0.00564
Opus 5 $0.00013 $0.00282
Sonnet 5 $0.00005 $0.00113
Haiku 4.5 $0.00003 $0.00056

Measured 5d ago against content hash 8ef768e5e454, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

sandbox-exec-fallback scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

benchmarks/gdpval/skills/sandbox-exec-fallback/SKILL.md · 82 lines

How it starts

The opening of the file, as written. The whole thing — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sandbox Execution Fallback

When to Use

Use this skill when execute_code_sandbox fails during Python code execution, particularly for tasks involving:

  • Spreadsheet generation (xlsx, csv)
  • Data processing and transformations
  • File output operations
  • Complex computations requiring libraries

Recovery Pattern

When execute_code_sandbox returns an error or fails to produce expected output:

Step 1: Write Python Code to File

Use write_file to save your Python script to a file:

# Use write_file tool with:
path: "script.py"
content: <your complete Python code as a string>

Step 2: Execute via Shell

Use run_shell to execute the script:

# Use run_shell tool with:
command: "python3 script.py"
timeout: <appropriate timeout, e.g., 300 for long-running tasks>

Step 3: Verify Output

Check the shell output for:

  • Success messages or printed results
  • Error messages (if any, diagnose and fix the script)
  • File creation confirmations

Step 4: Access Generated Files

If the script creates output files (e.g., spreadsheets), they will be in the current working directory. Use list_dir to confirm, then read_file to access if needed.

Why This Works

  • Same Python Environment: python3 in the shell uses the same environment as the sandbox
  • More Robust: Shell execution handles long-running or memory-intensive tasks better
  • Debuggable: Errors are captured in stdout/stderr for easier diagnosis
  • Identical Results: Produces the same output as sandbox execution when successful

Example: Spreadsheet Generation

Original code that failed in execute_code_sandbox:

import pandas as pd

data = {'A': [1, 2, 3], 'B': [4, 5, 6]}
df = pd.DataFrame(data)
df.to_excel('output.xlsx', index=False)
print("File created successfully")

Recovery Execution:

  1. write_file with path="generate_spreadsheet.py" and the code above as content
  2. run_shell with command="python3 generate_spreadsheet.py"
  3. Verify output.xlsx was created with list_dir

Read the full file on GitHub · 82 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 82 lines · 26 tokens per session scan A 8ef768e5e454

Subscribe to this mod's changes

sandbox-exec-fallback is a skill published in the GitHub repository HKUDS/OpenSpace (7,544 stars, last pushed 27d ago), licensed MIT. It adds 26 tokens to every session and 564 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.