fix: SDK event listeners not cleaned up on TUI unmount #9429

Closed
opened 2026-02-16 18:12:26 -05:00 by yindo · 2 comments
Owner

Originally created by @sauerdaniel on GitHub (Feb 15, 2026).

Originally assigned to: @rekram1-node on GitHub.

When TUI components using the SDK sync context unmount, registered event listeners are not removed. Over time this causes listener accumulation.

Expected: Listeners are removed on unmount.
Actual: Listeners persist after unmount.

Originally created by @sauerdaniel on GitHub (Feb 15, 2026). Originally assigned to: @rekram1-node on GitHub. When TUI components using the SDK sync context unmount, registered event listeners are not removed. Over time this causes listener accumulation. **Expected:** Listeners are removed on unmount. **Actual:** Listeners persist after unmount.
yindo closed this issue 2026-02-16 18:12:26 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 15, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #9155: Memory leak: TUI and Slack bot event listeners not cleaned up
  • #13775: Event listener leaks in TUI and Slack bot
  • #8258: Memory leak: SDK event listeners never unsubscribed in App component

All three issues describe the same root cause (SDK event listeners not being cleaned up). Please verify which issue should be the primary one to avoid duplicate effort.

@github-actions[bot] commented on GitHub (Feb 15, 2026): This issue might be a duplicate of existing issues. Please check: - #9155: Memory leak: TUI and Slack bot event listeners not cleaned up - #13775: Event listener leaks in TUI and Slack bot - #8258: Memory leak: SDK event listeners never unsubscribed in App component All three issues describe the same root cause (SDK event listeners not being cleaned up). Please verify which issue should be the primary one to avoid duplicate effort.
Author
Owner

@sauerdaniel commented on GitHub (Feb 15, 2026):

Duplicate — closing in favor of the original issue.

@sauerdaniel commented on GitHub (Feb 15, 2026): Duplicate — closing in favor of the original issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9429