Commit 649e906
committed
fix(proposal-a): session_end hook clean composite keys to prevent memory leak
When config.autoCapture === false, the auto-capture session_end (priority 10)
was skipped, leaving only the Phase 1 session_end (priority 20) to clean up.
The old code only deleted pendingRecall[sessionKey] - a simple key - but not
composite keys (sessionKey:agentId). Now uses pattern matching (startsWith)
to clean all related keys regardless of format.
Fixes: P1 issue from Phase 1 audit1 parent bd0c582 commit 649e906
1 file changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3206 | 3206 | | |
3207 | 3207 | | |
3208 | 3208 | | |
3209 | | - | |
3210 | | - | |
3211 | | - | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
| 3218 | + | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
3212 | 3223 | | |
3213 | 3224 | | |
3214 | 3225 | | |
| |||
0 commit comments