You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Workflow runs and workflow codex-home sessions are never pruned (1.3 GB) #1275
packages/workflow-mcp fileWorkflowStore deletes only tombstones and candidate dirs; /workflows/runs/ (623 MB, 134 runs) and workflows/codex-home/sessions/ (576 MB rollouts + 110 MB sqlite) are outside debugRetention with no TTL. Severity P2.
Found by the Stage 3 C6 hunt; lines are origin/main 9c6e48f. Findings file: temp/quality-loop/hunt-c6.md.
OWNER-APPROVED: finished workflow runs are kept 90 days; resumable runs are never deleted. Prefer infrequent deletion.
Owner, 2026-09-27T07:33:05Z: "just make these for me, just keep the fixtures in, they are innocent enough. do not delete stuff often" (manager applied it).
The package half is workflow-mcp#65 (deleteRun, trash rename, reclaim), which is merging now. The app half is ready on branch fix/workflow-run-retention (6441fd86, pushed), with no PR open, per the freeze (manager, 2026-09-27). Open it as a pointer-bump + app PR once the freeze lifts.
What the branch does (plan: docs/plans/2026-09-26-workflow-run-retention.md):
src/main/workflows/workflowRetention.ts: prunes old workflow run lineages and their Codex rollouts, in ancestry order, through the package's deleteRun. The pass reports unreclaimed deletions (runsUnreclaimed) and retries them with reclaimDeletedRuns().
Owner policy (temp/manager/owner-decisions-2026-09-27.md, item 5): a finished lineage is kept 90 days (override with AGENT_CODE_WORKFLOW_RUN_TTL_DAYS), and a resumable run is never deleted.
A lineage is kept while any member is resumable, not only its leaf (round 6 c: the leaf rule deleted a cancelled parent the package still resumes).
The rollout prune fails closed on any unreadable kept journal (q64/q66).
Wired in createWorkflowService.ts; workflowRetention.test.ts covers the policy, the ordering, fail-closed and the any-member rule.
Retention cost, ACCEPTED for the owner (manager-verify-c of wfm#65): a lineage that ever failed, was cancelled or was interrupted is kept forever, even after a resumed run completed it. Tightening that needs the package to refuse such resumes first. The app PR body must state this.
Still owed when the PR opens:
Bump packages/workflow-mcp to wfm#65's merge commit (the branch still pins b4b98f8d), and resync the lockfile if the manifest changed.
Merge origin/main.
Run 3 fresh reviews on the combined head; the app half has only had reviewer c (round 6).
Activity
fix(store): unindex a deleted run only after its directory is gone
feat(workflows): prune old workflow run lineages and their Codex roll…
fix(workflows): prune in ancestry order and keep resumable lineages f…
fix(store): serialize deleteRun with the run's appends and keep reade…
Juliusolsson05 commentedon Sep 27, 2026
OWNER-APPROVED: finished workflow runs are kept 90 days; resumable runs are never deleted. Prefer infrequent deletion.
Owner, 2026-09-27T07:33:05Z: "just make these for me, just keep the fixtures in, they are innocent enough. do not delete stuff often" (manager applied it).
Juliusolsson05 commentedon Sep 27, 2026
App follow-up (held under the owner's PR freeze)
The package half is workflow-mcp#65 (
deleteRun, trash rename, reclaim), which is merging now. The app half is ready on branchfix/workflow-run-retention(6441fd86, pushed), with no PR open, per the freeze (manager, 2026-09-27). Open it as a pointer-bump + app PR once the freeze lifts.What the branch does (plan:
docs/plans/2026-09-26-workflow-run-retention.md):src/main/workflows/workflowRetention.ts: prunes old workflow run lineages and their Codex rollouts, in ancestry order, through the package'sdeleteRun. The pass reports unreclaimed deletions (runsUnreclaimed) and retries them withreclaimDeletedRuns().temp/manager/owner-decisions-2026-09-27.md, item 5): a finished lineage is kept 90 days (override withAGENT_CODE_WORKFLOW_RUN_TTL_DAYS), and a resumable run is never deleted.createWorkflowService.ts;workflowRetention.test.tscovers the policy, the ordering, fail-closed and the any-member rule.Retention cost, ACCEPTED for the owner (manager-verify-c of wfm#65): a lineage that ever failed, was cancelled or was interrupted is kept forever, even after a resumed run completed it. Tightening that needs the package to refuse such resumes first. The app PR body must state this.
Still owed when the PR opens:
packages/workflow-mcpto wfm#65's merge commit (the branch still pinsb4b98f8d), and resync the lockfile if the manifest changed.origin/main.npx tsc -b(0 lines) and the retention suite.Follow-ups already filed: #1344, #1348.
🤖 Generated with Claude Code