# Delete orphaned worktree when deleting a thread · screen/t3code-personal

[View on GitCafe](https://git.cafe/screen/t3code-personal/commit/dd912666f2d1d96081febd52000f01c80aa21420)

Repository: [screen/t3code-personal](https://git.cafe/screen/t3code-personal)

Visibility: public

Requested revision: dd912666f2d1d96081febd52000f01c80aa21420

Requested commit: dd912666f2d1d96081febd52000f01c80aa21420

Commit: dd912666f2d1d96081febd52000f01c80aa21420

Tree: cfbf14d547f8e066e6ae11f75c2db71597d6c87b

Author: Julius Marminge

Committer: Julius Marminge

## Message

```
Delete orphaned worktree when deleting a thread

- Prompt to remove the worktree when a deleted thread is its only reference
- Best-effort cleanup via `api.git.removeWorktree` after thread deletion
- Add `getOrphanedWorktreePathForThread` helper with unit tests

```

## Parents

- [521238cf8e1daf041e7541bb1acef8c347431079](https://git.cafe/screen/t3code-personal/commit/521238cf8e1daf041e7541bb1acef8c347431079?format=markdown)

[Source at this commit](https://git.cafe/screen/t3code-personal/tree/dd912666f2d1d96081febd52000f01c80aa21420?format=markdown)
