coding-worktree-recovery

Recovers interrupted coding-agent work in dirty Git checkouts with writer arbitration and verified closeout.

115|9|Updated Aug 5, 2026
One-click install
npx skills add https://github.com/AtlasOmnia/donna-starter --skill coding-worktree-recovery-atlasomnia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coding-worktree-recovery
Source: https://github.com/AtlasOmnia/donna-starter/tree/main/skills/software-development/coding-worktree-recovery
Command: npx skills add https://github.com/AtlasOmnia/donna-starter --skill coding-worktree-recovery-atlasomnia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a coding agent crashes, times out, or overlaps with another agent on the same Git checkout, you are left with a dirty tree, unclear ownership, and no trustworthy record of what actually happened. This Skill provides a disciplined recovery workflow that preserves valid work, restores a single trustworthy writer, and verifies completion instead of trusting exit codes. ## Core Features & Use Cases - Concurrent-writer arbitration: Enumerate live processes by full command, classify writers versus read-only reviewers, stop duplicate writers, and enforce one checkout, one writer. - Dirty-tree preservation and handoff: Inventory staged, unstaged, and untracked changes, preserve exact diffs and hashes, and create bounded handoffs with explicit file allowlists for a fresh worker. - macOS cloud-sync recovery: Detect dataless File Provider placeholders that corrupt checkouts and relocate work to a stable non-synced checkout. - Verified closeout: Re-run controller gates after final commits, bind desktop package identity to source, and reject self-reported PASS without independent evidence. - Use Case: An agent exits mid-task leaving uncommitted changes and a possibly orphaned background worker. Use this Skill to freeze new writers, inventory the checkout, preserve the diff, hand off to a fresh model with exact remaining blockers, and verify the final commit. ## Quick Start Ask the agent to recover the interrupted coding work in this Git checkout, verify no other writer is active, and preserve the dirty tree before continuing.

Frequently Asked Questions about coding-worktree-recovery

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I recover work after a coding agent crashes mid-task?

Freeze new writers, enumerate live processes referencing the checkout, and inventory the dirty tree with git status and diff checks. Preserve the exact diff and hashes, then hand off to a fresh worker with the baseline HEAD, changed-file allowlist, and remaining blocker.

How do I handle multiple AI agents writing to the same Git checkout?

Classify every process by its full command as write-capable or read-only, keep the earliest legitimate writer, and stop later duplicates including their child processes. Verify the stopped processes and descendants are gone before letting any writer touch the checkout.

Why does my Git checkout fail on macOS with Resource deadlock avoided?

This usually indicates cloud-synced File Provider placeholders where files are dataless. Check with stat -f for compressed,dataless flags, and if source or Git metadata is affected, stop using that checkout and relocate to a stable non-synced path.

Can I trust exit code 0 from a coding agent as task completion?

No. Exit code 0 and self-reported PASS are not proof; the CLI can exit cleanly while cancelling an asynchronous child, leaving a partial dirty tree. Independently inspect the live checkout, rerun the authoritative gates, and verify the commit object and clean tree.

Should I stash a dirty tree to reproduce a failing test baseline?

No. A stash/pop cycle violates preservation provenance and can silently drop untracked work or alter staged state. Instead run the already-failing focused gate and preserve its raw log, or add an expected-RED test directly and record its diff fingerprint.