P8-014: Gateway Phase 6 — SessionGCService, all three GC tiers, /gc command #167
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Create SessionGCService implementing collect(sessionId), sweepOrphans(), and fullCollect(). Wire collect() into AgentService.destroySession(), /clear, and /new fresh. Run fullCollect() in onModuleInit (cold start). Add sweep GC cron job to CronService (SESSION_GC_CRON, default 0 4 * * *). Implement /gc slash command. Add GCResult/GCSweepResult/FullGCResult types.
Ref: docs/plans/2026-03-15-agent-platform-architecture.md (Session Garbage Collection section)
Wave 5 — depends on P8-010.