verify-success-after-unknown-error
하는 일
이 스킬은 불분명한 오류 뒤에 다시 시도하기 전에 AI 에이전트가 실제로 작업을 끝냈는지 확인하도록 합니다. 파일이 만들어졌는데도 도구가 알 수 없는 오류를 보고하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓코드 샌드박스가 알 수 없는 오류를 냈지만 코드는 끝났을 수 있을 때.
- ✓파일 작업에서 셸 명령이 불분명한 메시지와 함께 실패할 때.
- ✓파일 생성이나 변경이 오류를 보고했지만 실제로는 잘못된 오류일 수 있을 때.
스킬 링크
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/verify-success-after-unknown-error/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“PDF를 만드는 중 도구가 알 수 없는 오류라고 했지만 파일이 있을 수도 있습니다. 다시 시도하기 전에 파일이 만들어졌고 읽을 수 있는지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 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
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
agentpilot
7.8k작업을 준비하고 AgentPilot 루프를 실행해 변경을 제안, 테스트, 점수화하면서 프로젝트를 단계적으로 개선하도록 돕습니다.
openspace
7.8k에이전트 스킬을 저장하고 가져오는 도구인 OpenSpace를 설정하고, MCP를 통해 AI 앱에 연결하도록 돕습니다.
rsi-arena
7.8kAIME나 Terminal-Bench 같은 표준 AI 벤치마크 테스트를 설정하고 실행해 서로 다른 개선 방법을 비교하도록 돕습니다.
experiment-guide
7.8k프로그램을 개선하는 방법을 조사하면서 작은 실험을 계획하고, 결과를 읽고, 발견 사항을 기록하도록 돕습니다.