Incremental audio production with duration mismatch handling, adaptive stem extension, and pre-mix alignment verification
日本語の概要は準備中です。原文の説明を表示しています。
Verify task completion by checking filesystem state when execute_code_sandbox or run_shell return misleading unknown errors
インストールする前に、エージェントに与えられる指示の中身を確認できます。
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.
Use this pattern when:
execute_code_sandbox returns "unknown error" but your code may have completedrun_shell fails with unclear error messagesAfter 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")
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
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
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")}
# 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
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まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Incremental audio production with duration mismatch handling, adaptive stem extension, and pre-mix alignment verification
日本語の概要は準備中です。原文の説明を表示しています。
Incremental audio production with duration alignment handling, per-stem verification, and adaptive extension strategies
日本語の概要は準備中です。原文の説明を表示しています。
Create serverless API proxy endpoints that hide API keys and provide a unified backend for the dashboard frontend. Designed for Vercel deployment.
日本語の概要は準備中です。原文の説明を表示しています。
End-to-end audio production workflow with stems, effects, archiving, and verification
日本語の概要は準備中です。原文の説明を表示しています。
Handle cascading data retrieval tool failures by falling back to embedded knowledge generation
日本語の概要は準備中です。原文の説明を表示しています。
Fallback pattern for executing Python code when execute_code_sandbox fails
日本語の概要は準備中です。原文の説明を表示しています。