Skip to content

Delete tasks and recover cleanup failures

runbookverifiedEvidence reviewed 2026-10-07

For Shipyard API and dashboard tasks, Delete means remove all identified exclusive resources. There is no keep-database option. Commit or publish any work you need before deleting, including changes in the separate dashboard repository.

Removed with the taskKept because shared
Outer checkout, dependencies, builds and .worktree/tmp scratchPrimary checkouts and local seed database
API-owned nested dashboard checkout, even with uncommitted editsA separately existing dashboard checkout
Owned processes and descendants, containers, networks, labelled named volumes and anonymous volumesOther tasks, Docker images and shared package/build caches
Claude project transcripts, identified session artifacts and task scratch directories; Codex rollouts and matching shell snapshots identified by session metadataAgent credentials/settings, global history/index databases, shared browser/profile and SSH relay
Exclusive local task branches and dashboard ownership recordmain, master, configured default branches and branches checked out elsewhere

The hook records ownership outside the checkout before deleting resources. Orca removes the outer checkout after the hook succeeds. A small deletion journal remains for retries; it contains identifiers, not database contents or transcripts. Stop/restart still preserves task data.

Put agent scratch files under .worktree/tmp. Arbitrary files outside task directories without ownership metadata cannot safely be attributed and removed. External named volumes without ownership labels are also kept; investigate their owner rather than assuming they are disposable. Global agent history/index files are shared and may retain metadata for a deleted session.

Use Orca desktop Delete for the selected task. The SSH CLI worktree rm --run-hooks currently refuses remote hook execution. Do not bypass hooks with Delete Anyway.

After deletion verify that the outer checkout and companion are absent, their branches and Git worktree registrations are gone, and the recorded containers, networks, named and anonymous volumes no longer exist. Check task processes and agent artifacts as well. Shared resources must remain healthy. Read only scoped identifiers; never publish raw agent transcripts or application configuration.

Read the hook error first. A failure can leave a partially completed cleanup; Orca’s generic message is not proof that nothing changed. The retry plan lives under ~/dev-environment/state/orca/deleting/<task-id>.json; registration lives under state/orca/tasks/. Preserve these records until the problem is understood.

Resolve the reported conflict, then retry desktop Delete. The hook supports retries after containers or a companion have already been removed. A resource mounted by another task, a symlinked cleanup path, an unlabelled task container or unexpected checkout ownership blocks deletion. Do not force-remove shared resources or run global prune.

A missing outer checkout is accepted only when a deletion journal exists. Older deletions without journals need an explicit ownership audit; names alone are insufficient. Do not claim old orphaned resources were cleaned merely because the new hooks are installed.

This policy is installed for API/dashboard on Shipyard. Appliance archive still retains volumes, configuration and logs in the common Git directory. Its separate lifecycle is unchanged. Mac task hooks are also unchanged.