Problem
AutoPR creates a directory under .autopr/ for each ticket as part of its run setup, but these directories are left empty after the run. They serve no apparent purpose and accumulate over time, polluting the repository's working directory with noise that confuses developers inspecting .autopr/.
Solution
- Trace the code path that creates per-ticket directories (likely in the worktree or state initialization logic).
- If the directory is not needed: remove the creation call entirely.
- If it is needed temporarily during a run: defer creation until first use and add cleanup logic (analogous to how worktrees are cleaned up) to remove it once the run completes or fails.
- Add a test or assertion that no empty directories remain after a completed run.
Problem
AutoPR creates a directory under
.autopr/for each ticket as part of its run setup, but these directories are left empty after the run. They serve no apparent purpose and accumulate over time, polluting the repository's working directory with noise that confuses developers inspecting.autopr/.Solution