clawwork-ai/ClawWork
View on GitHub[Bug] taskGateways Map in room-store never cleaned up
Open
#212 opened on Mar 31, 2026
area/coregood first issuehelp wantedkind/bug
Repository metrics
- Stars
- (519 stars)
- PR merge metrics
- (PR metrics pending)
Description
Summary
packages/core/src/stores/room-store.ts — the module-scoped taskGateways Map grows indefinitely. When a room is created via initConductor(), a taskGateways.set(taskId, gatewayId) entry is added, but it is never removed when the room is stopped, archived, or deleted.
Expected behavior
Add cleanup logic in setRoomStatus() when status transitions to a terminal state (stopped, error), or provide an explicit removeRoom() action.
Files
packages/core/src/stores/room-store.ts—taskGatewaysMap (line ~66)
Context
Introduced in PR #210.