본문으로 건너뛰기
Skillpedia
일반 코딩7.8k · #12988

sandbox-fallback-execution-048d5a

하는 일

이 스킬은 샌드박스 오류가 반복된 뒤 AI 에이전트가 샌드박스 밖에서 Python을 실행하도록 안내합니다. 샌드박스의 격리가 꼭 필요하지 않은 코드를 위한 스킬입니다.

사용하는 경우

  • ✓여러 번 시도한 뒤에도 코드 샌드박스가 e2b 관련 오류로 실패할 때.
  • ✓코드가 안전하게 실행되기 위해 샌드박스 격리가 필요하지 않을 때.
  • ✓Python으로 만든 스프레드시트가 필요한데 샌드박스가 여전히 작동하지 않을 때.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/sandbox-fallback-execution-048d5a/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/sandbox-fallback-execution-048d5a/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“샌드박스가 e2b 오류로 세 번 실패했습니다. 대신 셸에서 제 Excel 스크립트를 직접 실행해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 Python 코드를 작업 공간 폴더의 파일로 쓴 다음, 시간 제한을 두고 셸에서 python3로 실행합니다. 그다음 출력을 읽어 오류나 파일 생성 메시지가 있는지 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Sandbox Fallback Execution

When execute_code_sandbox repeatedly fails with e2b sandbox errors, use this fallback pattern to execute Python code directly on the host system.

When to Use

Use this skill when:

  • execute_code_sandbox fails with e2b-related errors
  • Multiple retry attempts (3+) have not resolved the issue
  • The code does not require sandbox isolation

Steps

Step 1: Write Python Script to File

Use 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 code

Step 2: Execute via Shell

Use run_shell with explicit python3 path:

Tool: run_shell
command: python3 /workspace/script_name.py
timeout: 120

Step 3: Verify Output

Check the stdout/stderr from run_shell for:

  • Successful execution messages
  • Expected output or file creation confirmations
  • Any errors that need debugging

Complete Example

# 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: 120

Tips

  1. Use absolute paths in your Python script when reading/writing files
  2. Add print statements for debugging since you won't get interactive output
  3. Increase timeout if the script performs heavy computation
  4. Check working directory - scripts run from the workspace root by default
  5. Handle errors explicitly with try/except blocks and meaningful error messages

Common e2b Errors That Trigger This Fallback

  • E2B execution error
  • Sandbox timeout
  • Connection refused
  • Sandbox initialization failed
  • Repeated retry failures (3+ attempts)

When NOT to Use This Fallback

  • When sandbox isolation is required for security
  • When the code needs specific sandbox environment variables
  • On first failure only - try execute_code_sandbox retry first
자주 묻는 질문

e2b는 여기서 무엇을 뜻하나요?

샌드박스 서비스의 이름이며, 스킬은 이 서비스의 오류를 전환 신호로 봅니다.

샌드박스 밖에서 코드를 실행해도 안전한가요?

스킬은 격리가 필요 없는 코드에만 쓰라고 안내합니다. 신뢰할 수 있는 코드에만 사용해야 합니다.

스크립트는 어디에 저장해야 하나요?

스킬은 작업 공간 폴더와 전체 경로를 사용해, 출력 파일이 알려진 위치에 생기도록 합니다.

상세 정보

작성자의 원본 설명

Fallback method to execute Python code when execute_code_sandbox fails with e2b errors

repo: HKUDS/AgentPilot

인기도

GitHub 스타
7.8k
순위
#12988
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬