Unified agent runner โ single entry point for spawning Claude
Code (or any future provider) used by BOTH the interactive agent
pane and the headless drone Agent block.
Shared, cross-version named-agent registry. File-per-agent JSON
tree at <shared_home>/agents/registry/. See
docs/specs/SPEC_SHARED_AGENT_REGISTRY_2026_05_12.md.
Delete log files (.log.) older than days to prevent unbounded growth.
Only touches files with .log. in the name โ pointer files and other data are safe.
Initialize tracing with dual output: JSON rolling file + human-readable stderr.
Returns a guard that must be held for the lifetime of the app to ensure log flushing.