Files
hermes-agent/tests/hermes_cli
teknium1 cf5287b040 fix(kanban): remove worktree when the process cwd is already gone
The Path.cwd() guard added for Windows returned early on any OSError,
which also covers a cwd that no longer exists. That is exactly the
deferred parent-worktree cleanup path (#33774): a scratch-kind child
worker runs with cwd inside its scratch dir, _cleanup_workspace rmtree's
it, and _try_cleanup_parent_workspaces then calls this function from the
same process. main removed the clean, pushed parent worktree; the PR
head silently left it and its wt/<task> branch behind.

A deleted cwd cannot hold the worktree open, so chdir to repo_root and
proceed with `git worktree remove`. Only a failing chdir preserves the
worktree, and it now logs a warning instead of returning silently.
2026-09-16 16:51:45 -07:00
..