This directory contains utility scripts for the OpenCode Agents system.
register-component.sh - Register a new component in the registryvalidate-component.sh - Validate component structure and metadatacleanup-stale-sessions.sh - Remove stale agent sessions older than 24 hoursSee tests/ subdirectory for test scripts.
Agent instances create temporary context files in .tmp/sessions/{session-id}/ for subagent delegation. These sessions are automatically cleaned up, but you can manually remove stale sessions:
# Clean up sessions older than 24 hours
./scripts/cleanup-stale-sessions.sh
# Or manually delete all sessions
rm -rf .tmp/sessions/
Sessions are safe to delete anytime - they only contain temporary context files for agent coordination.
./scripts/register-component.sh path/to/component
./scripts/validate-component.sh path/to/component
./scripts/cleanup-stale-sessions.sh