create_skill) laboratory loop.
π The Self-Healing Validation Loop
To ensure new scripts donβt crash the background runtime, custom code generated by agents undergoes a multi-layered sandboxed compilation checklist before hot-reload promotion:- Syntax Verification: The engine writes code to a temporary sandbox directory and compiles it (e.g.
python -m py_compilefor Python) to trap syntax and formatting bugs. - Dry-run testing: Spawns the script under a strict 3-second timeout limit and feeds
{}to stdin to catch import errors or runtime exceptions. - Self-Correction: If verification steps return failure logs, the exceptions are fed back into the agentβs reasoning loop, prompting automatic self-healing edits.
- Soft-Reload Promotion: Once verified, the thread-safe mutex scans the skills directory and loads the new skill dynamically without needing a daemon reboot.