verify-success-after-unknown-error
यह क्या करती है
यह स्किल AI एजेंट को अस्पष्ट त्रुटि के बाद दोबारा कोशिश करने से पहले जाँचने को कहती है कि काम सचमुच पूरा हुआ या नहीं। यह उन लोगों के लिए है जिनके टूल फ़ाइल बन जाने के बावजूद अज्ञात त्रुटि दिखाते हैं।
कब इस्तेमाल करें
- ✓जब कोड सैंडबॉक्स अज्ञात त्रुटि दे, जबकि कोड शायद पूरा हो चुका हो।
- ✓जब फ़ाइल वाले काम पर शेल कमांड अस्पष्ट संदेश के साथ फेल हो।
- ✓जब फ़ाइल बनाने या बदलने का काम गलत त्रुटि बताए।
Skill का लिंक
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/verify-success-after-unknown-error/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“PDF बनाते समय टूल ने अज्ञात त्रुटि बताई, पर शायद फ़ाइल बन चुकी है। दोबारा कोशिश करने से पहले जाँचिए कि वह बनी है और पढ़ी जा सकती है।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट अपेक्षित आउटपुट फ़ोल्डर की सूची देखता है और जाँचता है कि हर अपेक्षित फ़ाइल मौजूद है। फिर वह फ़ाइलें खोलकर पुष्टि करता है कि उनमें अपेक्षित सामग्री है, ताकि जो काम पहले सफल हो चुका है उसे दोबारा न किया जाए।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Verify Success After Unknown Error
Purpose
When execute_code_sandbox or run_shell return "unknown error" messages, the underlying task may have actually succeeded. This skill provides a systematic approach to verify actual completion before assuming failure and retrying unnecessarily.
When to Apply
Use this pattern when:
execute_code_sandboxreturns "unknown error" but your code may have completedrun_shellfails with unclear error messages- File creation, modification, or transformation tasks report errors
- The error message is generic/unspecified rather than a clear failure reason
Verification Steps
Step 1: Check Expected Output Files
After receiving an unknown error, immediately verify if expected files were created:
# Example: Verify file creation after execute_code_sandbox
from tools import list_dir, read_file
# List directory to check if files exist
files = list_dir(path="/workspace/output")
print(files)
# Check specific file existence
expected_files = ["report.pdf", "data.xlsx"]
for f in expected_files:
try:
content = read_file(filetype="pdf", file_path=f"/workspace/output/{f}")
print(f"✓ {f} exists and is readable")
except:
print(f"✗ {f} not found or unreadable")
Step 2: Validate File Content/State
Don't just check existence — verify the files have expected content:
# For spreadsheets
file_content = read_file(filetype="xlsx", file_path="/workspace/output/schedule.xlsx")
# Verify expected sheets, columns, or data exist
# For text/json files
file_content = read_file(filetype="txt", file_path="/workspace/output/result.json")
# Parse and validate structure
# For directories
dir_contents = list_dir(path="/workspace/output")
# Verify expected number of files or specific files exist
Step 3: Decision Logic
IF expected files exist AND content is valid:
→ Task succeeded despite error message
→ Proceed to next step without retry
ELIF files exist but content is incomplete:
→ Partial success, may need targeted fix
ELSE (files missing or corrupted):
→ True failure, retry or debug required
Code Example: Complete Pattern
def execute_with_verification(code, expected_files):
"""Execute code and verify success even if error returned."""
# Attempt execution
result = execute_code_sandbox(code=code)
# Check for unknown/generic errors
if "unknown error" in result.get("output", "").lower() or result.get("error"):
print("Received error, verifying actual outcome...")
# Verify filesystem state
all_present = True
for f in expected_files:
try:
list_dir(path=f"/workspace/{f}") # or appropriate path
print(f"✓ {f} verified")
except:
print(f"✗ {f} missing")
all_present = False
if all_present:
print("Task completed successfully despite error message")
return {"status": "success_verified", "files": expected_files}
else:
print("True failure - files not created")
return {"status": "failed", "error": result.get("error")}
return {"status": "success", "output": result.get("output")}
Shell Command Example
# After run_shell returns error, verify with:
ls -la /workspace/output/
test -f /workspace/output/result.pdf && echo "File exists" || echo "File missing"
file /workspace/output/result.pdf # Verify file type is correct
Benefits
- Saves iterations: Avoids unnecessary retries when task already succeeded
- Handles tool bugs: Works around sandbox/shell tool reporting issues
- Faster completion: Move forward immediately when verification passes
- Clearer debugging: Distinguishes true failures from false positives
Anti-Patterns to Avoid
- ✗ Immediately retrying on any error without verification
- ✗ Assuming "unknown error" means complete failure
- ✗ Only checking file existence without validating content
- ✗ Skipping verification for "minor" tasks (any file output should be verified)
Related Tools
list_dir— Check directory contentsread_file— Validate file content and accessibilityexecute_code_sandbox— Primary execution tool this pattern supportsrun_shell— Shell execution tool this pattern supports
अक्सर पूछे जाने वाले सवाल
दोबारा कोशिश से पहले क्यों जाँचें?
स्किल के अनुसार अज्ञात त्रुटि के बावजूद काम सफल हो सकता है, इसलिए दोबारा करने से मेहनत बर्बाद हो सकती है।
सामग्री जाँचने से क्या जुड़ता है?
फ़ाइल खोलकर पता चलता है कि उसमें अपेक्षित डेटा है, न कि सिर्फ इतना कि वह मौजूद है।
कौन सी फ़ाइलें जाँची जाती हैं?
वे आउटपुट फ़ाइलें जिन्हें काम से बनाने की उम्मीद थी।
जानकारी
लेखक का मूल विवरण
Verify task completion by checking filesystem state when execute_code_sandbox or run_shell return misleading unknown errors
repo: HKUDS/AgentPilot
लोकप्रियता
- GitHub स्टार
- 7.8k
- रैंकिंग में स्थान
- #13026
- लाइसेंस
- MIT
- अपडेट की गई
- 1/11/2026
कमेंट
- …
इस repository की और skills
agentpilot
7.8kआपके एजेंट को AgentPilot से प्रोजेक्ट को चरण-दर-चरण सुधारने में मदद करती है, जिसमें बदलाव सुझाए, परखे और स्कोर किए जाते हैं।
openspace
7.8kआपके एजेंट को OpenSpace सेट करने में मदद करती है, जो एजेंट स्किल्स सहेजता और वापस लाता है, और MCP के ज़रिए आपके AI ऐप से जुड़ता है।
rsi-arena
7.8kआपके एजेंट को AIME और Terminal-Bench जैसे मानक AI बेंचमार्क टेस्ट सेट करने और चलाने में मदद करती है, ताकि सुधार के तरीकों की तुलना हो सके।
experiment-guide
7.8kआपके एजेंट को छोटे प्रयोग बनाने, उनके नतीजे पढ़ने और जाँच के दौरान उपयोगी निष्कर्ष लिखने में मदद करती है।
मिलती-जुलती skills
diffs
394kयह आपके एजेंट को बदलावों का असली diff बनाने देती है, जिसे व्यूअर लिंक या इमेज फ़ाइल के रूप में साझा किया जा सकता है, हाथ से लिखे सारांश के बजाय।
coding-agent
394kयह आपके एजेंट को बड़े कोडिंग काम Codex, Claude Code या OpenCode को बैकग्राउंड वर्कर के रूप में सौंपने, फिर उसकी प्रगति जांचने में मदद करती है।
gh-issues
394kयह आपके एजेंट को GitHub issues खोजने, उनमें से काम करने लायक चुनने, और सुधार के साथ pull requests खोलने में मदद करती है, जिसमें समीक्षा टिप्पणियों का फ़ॉलो-अप भी शामिल है।