What problem does it solve? OpenCode desktop breaks when a project folder is renamed or deleted: the app keeps reopening a dead "ghost" directory, sessions hang with no assistant reply, ENOENT/realPath errors appear, or projects vanish from the sidebar on every launch. This Skill diagnoses the root cause in the app's SQLite database and JSON state files and applies targeted fixes. ## Core Features & Use Cases - Log-driven diagnosis: Read opencode.log to identify the poisoned project ID, dead worktree paths, and corrupt session rows before changing anything. - Database repair scripts: Remove poisoned project rows, ghost sessions, and corrupt session entries from opencode.db with automatic backups and integrity checks. - State file encoding fixes: Detect and strip UTF-8 BOMs from opencode.global.dat and window state files that cause projects to disappear every launch. - Use Case: You renamed a folder from .agents-old to .agents and now OpenCode spawns the deleted directory and hangs on new sessions. The Skill inspects the DB copy, finds the poisoned project row, and hands you a PowerShell script to run after quitting the app. ## Quick Start Ask the agent to diagnose why OpenCode desktop keeps reopening a deleted project folder and hanging on new sessions.