refactor: Update cleanupHook documentation to reflect session completion logic

This commit is contained in:
Alex Newman
2025-10-21 01:01:11 -04:00
parent c42444e06c
commit c54e50ec0c
+3 -3
View File
@@ -11,12 +11,12 @@ export interface SessionEndInput {
/** /**
* Cleanup Hook - SessionEnd * Cleanup Hook - SessionEnd
* Cleans up worker session via HTTP DELETE * Marks session as completed when Claude Code session ends
* *
* This hook runs when a Claude Code session ends. It: * This hook runs when a Claude Code session ends. It:
* 1. Finds active SDK session for this Claude session * 1. Finds active SDK session for this Claude session
* 2. Sends DELETE request to worker service * 2. Marks session as completed in database
* 3. Marks session as failed if not already completed * 3. Allows worker to finish pending operations naturally
*/ */
export async function cleanupHook(input?: SessionEndInput): Promise<void> { export async function cleanupHook(input?: SessionEndInput): Promise<void> {
try { try {