Skip to content

fix: unbounded maps and memory leaks — Issue #357#382

Merged
OneStepAt4time merged 1 commit intomainfrom
fix/357-memory-leaks
Mar 28, 2026
Merged

fix: unbounded maps and memory leaks — Issue #357#382
OneStepAt4time merged 1 commit intomainfrom
fix/357-memory-leaks

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Fixes #357

Changes (7 files, +194/-61)

  1. Periodic prune of ipRateLimits map entries with expired timestamps
  2. Delete eventBuffers entry in emitEnded alongside emitter
  3. MetricsCollector.cleanupSession() on session kill
  4. Cache parsed JSONL entries — read delta only from byteOffset
  5. Debounced save for readMessages (5s coalesce, immediate on kill)
  6. Replace fixed sleeps with pollUntil in tmux
  7. Window existence cache with 2s TTL
  8. Set for activeSubagents (O(1) has/delete)
  9. Decrement sseTokenCounts when consuming SSE token

1176 tests passing.

@OneStepAt4time OneStepAt4time merged commit b3983c3 into main Mar 28, 2026
3 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/357-memory-leaks branch March 29, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance: Unbounded maps and memory leaks across modules

1 participant