Motivation
An orchestrator may need Worktrunk to run pre/post-remove hooks and remove a worktree while retaining responsibility for branch identity. Between preflight and deletion, a branch name can be reused or advanced.
Request
Add an optional expected branch OID token to removal or a safe branch-scoped cleanup operation. Worktrunk should fail closed if the branch no longer resolves to that OID.
This would permit atomic lifecycle cleanup without allowing --force to delete a changed branch and without requiring broad Worktrunk state cleanup.
Motivation
An orchestrator may need Worktrunk to run pre/post-remove hooks and remove a worktree while retaining responsibility for branch identity. Between preflight and deletion, a branch name can be reused or advanced.
Request
Add an optional expected branch OID token to removal or a safe branch-scoped cleanup operation. Worktrunk should fail closed if the branch no longer resolves to that OID.
This would permit atomic lifecycle cleanup without allowing
--forceto delete a changed branch and without requiring broad Worktrunk state cleanup.