fix(plan): clean up session directories and plans on deletion (#20914)

This commit is contained in:
Jerop Kipruto
2026-03-03 09:11:25 -05:00
committed by GitHub
parent 1e2afbb514
commit fca29b0bd8
6 changed files with 105 additions and 15 deletions

View File

@@ -115,6 +115,17 @@ export async function cleanupExpiredSessions(
} catch {
/* ignore if doesn't exist */
}
// ALSO cleanup the session-specific directory (contains plans, tasks, etc.)
const sessionDir = path.join(
config.storage.getProjectTempDir(),
sessionId,
);
try {
await fs.rm(sessionDir, { recursive: true, force: true });
} catch {
/* ignore if doesn't exist */
}
}
if (config.getDebugMode()) {