Repository navigation
Description
Description
Closing a session tab does not release its cached transcript. createData lives for the server controller's lifetime, and the app has no caller of its existing session.evict() method. Transcript arrays and message indexes therefore survive closed tabs and accumulate as sessions are visited. The bounded timeline-view cache does not bound this underlying data cache.
Priority: high. Reviewed CM-Split-v2 at dafdcd4171466050c984d524ca0d1a09d31f100e. Relevant code is unchanged from remote V2: tab close, server-owned data, existing family eviction.
Plugins
Reproduced in the shared Solid client data layer; no WPP plugin required.
OpenCode version
CookieMonster V2 2.0.29-cm.2; Bun 1.4.2.
Steps to reproduce
- Under a Solid
createRoot, instantiate the productioncreateDatawithOpenCode.make, an injected fetch returning a valid message-list page, and no-op event subscriptions (as inpackages/client/test/solid-eviction.test.ts). - For 100 distinct session IDs, return one user message with 1 MiB of text and call
data.session.message.sync(id). - Run
Bun.gc(true). Sum the cached message text lengths and compareprocess.memoryUsage().heapUsedwith baseline. - Call
data.session.evict(id)for each session and collect again.
Observed in the actual data implementation: about 100 MiB of retained transcript and 100.3 MiB heap growth before eviction; zero retained transcript and about 1.3 MiB heap growth afterward. The missing app-level eviction connection is established by source tracing, not a live tab-close heap capture. This does not prove the earlier CM shutdowns were OOM failures.
Acceptance criteria and verification
- Closed, inactive session families release heavy transcript data through a defined bounded-cache or lifecycle policy.
- Visible sessions, active work, attention state and optimistic submissions remain safe; closing a child must not evict a still-visible parent/sibling family.
- Reopening an evicted session reloads its transcript normally.
- An app-level regression test covers closing tabs and proves eviction is actually invoked; client helper tests alone are insufficient.
- In-flight reads or later events cannot permanently defeat eviction; add a churn test and compare retained heap after garbage collection.
The existing 4 client eviction tests and 30 core lifecycle/location tests pass. The smallest starting point is wiring the existing family-eviction API into the app's session lifecycle, rather than adding another cache layer. Closed issue #47 concerns native browser-tab resource management, not this transcript store.
Operating System
Ubuntu 26.04.1 LTS, amd64.
Activity
trmosala commentedon Oct 19, 2026
Additional incident context from the user: GNOME killed CookieMonster because it was using excessive memory.
This updates the earlier statement that the reason for shutdown was unknown. The termination is user-reported as memory-related; no OS/oom-killer log or live process heap profile was collected in this investigation.
The remaining question is attribution: which process and retention path drove the observed usage. The transcript cache's approximately 100 MiB retention in the synthetic probe and the detached-CDP-session bookkeeping defect are confirmed separately. Neither reproduction establishes its contribution to this particular incident.
trmosala commentedon Oct 19, 2026
Live follow-up on the installed CookieMonster
2.0.29-cm.1, 19 October 2026:Opening CM automatically resumed the previous code review and its subagents. Its browser-inspection subagent ran the legacy worktree's browser test suite. That Bun test process alone reached 8,529 MiB RSS / 8,514 MiB PSS; the VM fell below 1 GiB available memory. I interrupted that subagent and isolated the failing browser-preview test under a memory guard.
The isolated failure is a dropdown-presence assertion. Reporting the raw Happy DOM element consumed unbounded memory during the observed run. Keeping the exact null predicate but reporting a boolean in a temporary diagnostic copy produced a normal failure in 4.74 seconds at about 409 MiB sampled peak RSS. The raw-element diagnostic version crossed 1,456 MiB at 15.87 seconds and was stopped. No production source was modified.
The app renderer's baseline heap snapshot contained about 38 MiB of self-size, the Bun backend about 137 MiB, and one WPP subagent iframe about 145 MiB after collection. WPP browser processes and location-scoped MCP copies add substantial resident overhead, but the largest measured spike came from the review's test child process. Snapshotting itself adds transient memory overhead; process-level measurements distinguish that from the test runner.
This does not invalidate the independently reproduced transcript-retention or detached-CDP-session defects. It changes the priority of the incident investigation: the review-launched test failure is now a directly observed multi-GiB cause. The exact allocation path in Bun and attribution of the earlier GNOME kill were not captured at the time of that incident.
Tracked with reproduction and acceptance criteria in opencode #85.
fix(cm): integrate reviewed V2 reliability fixes [skip ci]
trmosala commentedon Oct 21, 2026
Merged into
CM-Split-v2as290d7d6353c0c7a4a356af780b5687f2dcfe5cfcthrough PR #96. Its tree exactly matches reviewed source68ab9205709350385471eb2d383b3cff3c18e678.Implemented in PR #96, reviewed source
68ab9205709350385471eb2d383b3cff3c18e678.The app now invokes existing session-family eviction after closed work becomes inactive, while preserving visible, active, attention and optimistic state. App-level checks cover parent/sibling safety, reopening, late reads/events and churn. The isolated post-GC heap regression passes and fails when eviction is disabled. The disclosed warm resized stabilization median was 57 ms slower in one small benchmark; p95 was similar. This is a source fix; the installed app was not updated.
Final verification is deferred at the user's explicit request to finish and close the implementation issues before one final test pass. This closure records implementation completion, not a claim that the final combined/platform checks have passed. Any failure in that pass will be recorded against the relevant issue.