3e54f0ca20
Root cause: Claude Code recreates ~/.claude/debug/latest (a dangling symlink to the current debug session) almost immediately after it is deleted. The old cleanup ran once before the retry loop, so any retry after a 2s sleep would hit a freshly recreated symlink. Fix: move _ssr_mackup_preclean() inside the retry loop so it runs immediately before each mackup attempt, leaving no window for apps to recreate problematic files. Also remove known transient subdirectories by path before the generic socket/dangling-link sweep: .claude/debug .cursor/logs .vscode/logs .npm/_logs Configurable via SSR_MACKUP_PRECLEAN_PATHS (space-separated, $HOME-relative). Co-authored-by: Cursor <cursoragent@cursor.com>