Skip to content

The agent that grows with you

refactor(kanban): drop gc's redundant resolved relative_to check

kshitijk4poor7dfdef64bbb6
diff --git a/hermes_cli/kanban_ops.py b/hermes_cli/kanban_ops.py
index 401fce640a2..09007705e50 100644
--- a/hermes_cli/kanban_ops.py
+++ b/hermes_cli/kanban_ops.py
@@ -333,16 +333,7 @@ def _cmd_gc(args: argparse.Namespace) -> int:
# managed root, never the root itself (which holds every task's scratch dir).
if not kbw._is_managed_scratch_path(path):
continue
- try:
- path = path.resolve()
- except OSError:
- continue
- try:
- path.relative_to(scratch_root.resolve())
- except ValueError:
- # Safety: never delete outside the scratch root.
- continue
- if path.exists() and path.is_dir():
+ if path.is_dir():
shutil.rmtree(path, ignore_errors=True)
removed_ws += 1