mirror of
https://github.com/thedotmack/claude-mem
synced 2026-04-26 01:25:10 +02:00
SessionEnd has a 1.5s hardcoded cap from Claude Code (CLAUDE_CODE_SESSIONEND_HOOKS_TIMEOUT_MS), making it unsuitable for waiting on async work. Previously, the Stop hook would fire-and-forget the summarize request, then SessionEnd would immediately call deleteSession — aborting the SDK agent mid-summary. Now the Stop hook (120s timeout, no cap) owns the full lifecycle: 1. Queue summarize request 2. Poll new GET /api/sessions/status endpoint until queue drains 3. Call /api/sessions/complete after summary finishes SessionEnd is now a true fire-and-forget fallback (process.exit(0) immediately). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>