fix(delegate-task): ensure subagentSessions cleanup on all exit paths
Added outer finally block so subagentSessions.delete(syncSessionID) runs even on early return from sendSyncPrompt error.
This commit is contained in:
parent
ea1b22454d
commit
7427922e6f
@ -133,9 +133,6 @@ session_id: ${sessionID}
|
||||
if (toastManager && taskId !== undefined) {
|
||||
toastManager.removeTask(taskId)
|
||||
}
|
||||
if (syncSessionID) {
|
||||
subagentSessions.delete(syncSessionID)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
return formatDetailedError(error, {
|
||||
@ -145,5 +142,9 @@ session_id: ${sessionID}
|
||||
agent: agentToUse,
|
||||
category: args.category,
|
||||
})
|
||||
} finally {
|
||||
if (syncSessionID) {
|
||||
subagentSessions.delete(syncSessionID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user