मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग7.8k · #12988

sandbox-fallback-execution-048d5a

यह क्या करती है

यह स्किल AI एजेंट को बार-बार सैंडबॉक्स एरर के बाद सैंडबॉक्स के बाहर Python चलाने का निर्देश देती है। यह उन कोड के लिए है जिन्हें सैंडबॉक्स की अलगाव सुरक्षा की ज़रूरत नहीं है।

कब इस्तेमाल करें

  • ✓जब कई प्रयासों के बाद कोड सैंडबॉक्स e2b से जुड़ी एरर से विफल हो।
  • ✓जब कोड को चलने के लिए सैंडबॉक्स की अलगाव सुरक्षा ज़रूरी न हो।
  • ✓जब Python से स्प्रेडशीट चाहिए और सैंडबॉक्स अब भी बंद हो।

Skill का लिंक

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

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/sandbox-fallback-execution-048d5a/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“सैंडबॉक्स तीन बार e2b एरर के साथ विफल हुआ है। इसकी जगह मेरी Excel स्क्रिप्ट सीधे शेल में चलाइए।”

हर हफ़्ते 5 नई skills, 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
अपडेट की गई
1/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills