DeepSeek Harness: Diagnose Session Projection OOM
A startup heap exhaustion can coincide with session projection, but the reported crash in discussion #10182 does not establish that ordinary session-card listing reads every log. First identify what opened content search, the index state, and the actual allocation path.
DeepSeek Harness: what was reported?
In discussion #10182, a user reported a Windows desktop host repeatedly exhausting the JavaScript heap and being restarted by its parent. The reported environment included @deepseek-ai/dsh-desktop 0.2.1-rc.2, Electron 44.7.0 and Node 24.21.0. The signature included FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory. The report associated the symptom with accumulated session history and a cold projection at startup.
A follow-up investigation in the same discussion traced that particular release and corrected the initial attribution. The ordinary session-card list uses header-oriented persistence listing and cached projection values; the investigator found no path from that list to the whole-log cold read. The relevant SQLite reconcile was reached from session content search. A crash near startup therefore requires identifying what actually issued a search in that composition. This is a version-specific investigation, not proof that every heap exhaustion shares the same cause.
| Evidence | What it supports | What it cannot establish alone |
|---|---|---|
| Heap allocation failure | The process ran out of available JavaScript heap | Which component allocated it |
| Crash near launch | Timing of the failure | That the card list issued a full-log read |
| Search request and cold index | The reported reconcile path may be relevant | That a newer build has identical behavior |
| Header-matched projection cache | A possibly stale list value is available | A complete content-search index exists |
| Largest log and total history size | Useful dimensions of the workload | An exact memory requirement |
DeepSeek Harness: why can search consume so much memory?
The discussion's investigator found that the SQLite reconciliation loop calls readColdSessionLog for persisted sessions that are not live and whose stored revision differs from the indexed row. The helper reads the whole contiguous log. An index with no rows makes many sessions eligible; an index whose revisions already match can skip unchanged sessions. The investigation described sequential reads, but also retained data across the reconcile transaction, so sequential input alone did not bound total retained memory.
For the investigated build, the reply describes full event data, a detached clone, extracted search documents and a serialized representation used for a fingerprint. Those representations can amplify memory beyond the size of a compressed log. The report does not supply a universal multiplier or a safe maximum history size. A single very large session and a large collection of smaller sessions are different workload shapes, so record both the largest log and the total history size.
The reply identifies the bundled :memory: index with openAt: never in the cited base and web rows, and an experimental search row using openAt: first-search. An in-memory index loses its contents on process restart. In the reported scenario, enabling search with that index can make the first search rebuild the cold index again. Do not assume that those settings describe your installed profile; inspect your own composition and version.
DeepSeek Harness: how do projections differ from the search index?
The current session projection reference describes a registry that folds events into whole current values and an optional persisted cache. A listing can use a header-matched cached snapshot without reading the log, and the value may be stale. A cold snapshot API, by contrast, receives the complete log from its caller; it can use valid cache rows to skip the already-folded prefix. These contracts describe projection values, not a guarantee that a separate full-text search index contains the session's message text.
This distinction explains the correction in the discussion. Reading only a session header may be sufficient for a card, but the investigator explains that search documents come from events. Replacing the search reconcile with a header-only read would produce an empty content index. The user's proposed header-only approach was a proposal, not an established fix. A cached card, a searchable history and a fully loaded session are different outputs with different data needs.
DeepSeek Harness: how should I collect evidence?
- Record the exact desktop and runtime versions, operating system, crash time and heap failure text. Note whether the failure occurs before input, when the first search is submitted, or at another point.
- Identify the selected profile and any search-related plugin or override. Check whether content search is enabled, when the index opens and whether its storage is persistent or in memory. Preserve existing configuration before making changes.
- Compare the event sequence with the report: was a content-search request actually issued, and is the relevant stack in the SQLite reconciliation or cold-read path? If evidence points elsewhere, investigate that path rather than forcing the report's explanation onto it.
- Measure aggregate session history and the largest individual log using your environment's ordinary inspection tools. Record available memory and whether the index is cold or already populated. Avoid publishing session contents.
- Capture a redacted diagnostic record and compare with the installed version's documentation and current issue status. Reproduce only in an appropriate environment with a protected backup and a clear recovery plan.
The discussion includes a later user report on 0.2.1-rc.3 with a similar heap signature during running rather than confirmed startup, and without an explicitly observed search plugin. That reporter explicitly did not establish a shared cause, although another 0.2.1-rc.3 reply with heap-profiler data (about 900 MB attributed to structuredClone) says its data is consistent with the earlier analysis. A matching error message is a reason to compare evidence, not to merge the two incidents.
DeepSeek Harness: what mitigations were proposed, and what are their limits?
The investigator proposed a durable search-index path with openAt: first-search, so unchanged revisions can be skipped on subsequent launches. This is a proposal for the investigated code path, not a guaranteed recovery: a first build can still have the same peak. The same reply proposes bounding reconciliation by bytes or sessions, retaining progress and accepting temporarily partial search results. It also suggests reducing redundant full-log materialization. These are engineering proposals in the discussion, not evidence that a released version implements them.
Before changing index configuration, confirm the applicable product version and support procedure. Disabling or delaying search changes available behavior; a persistent index consumes storage and may contain sensitive searchable content. Avoid deleting session logs or an index merely to make the application start. Preserve data and involve the operator responsible for the deployment when the history or index must be repaired.
When collecting timing, distinguish opening the application from opening the search backend. The reply notes that the ordinary search box sends a request after non-empty input; if a crash happens before that, look for another component in the installed composition that issued a search. A timestamped request trail is stronger evidence than assuming that the screen currently visible caused the allocation.
The proposed durable index is useful only when the deployment actually uses the investigated reconciliation behavior. Its first population still needs resources, and an index path must be managed as application data. Before adopting the proposal, establish where it would be stored, how it is backed up, what content it contains, and how search behavior would be tested after the change. The discussion does not provide a universal copy-and-paste configuration for every profile.
DeepSeek Harness: what are the safety and diagnostic limits?
The error signature does not identify a root cause, and the discussion is not a universal sizing guide. The current projection documentation and the release-specific report describe related but distinct mechanisms. Do not infer that normal card listing loads every event, that every first search must fail, or that a particular config change is a released fix.
Session logs, index contents, paths and diagnostics may expose private messages and tool results. Keep copies protected, redact shared reports and do not edit live storage. If service recovery requires a restart, coordinate it with the owner and first assess work that could be interrupted.
DeepSeek Harness: what do these terms mean?
- Cold index: a search index without the relevant previously indexed session revisions.
- Reconciliation: the search backend's process of bringing index records in line with observed sessions.
- Projection cache: stored derived session values used for a view, distinct from full-text search.
- Heap exhaustion: an allocation failure in the JavaScript process; its message alone does not identify the allocation source.
- Revision: the stored change marker used in the reported index comparison.
Frequently asked questions
Does startup OOM prove the card list reads all logs?
No. The discussion investigation traced the full-log read to content-search reconciliation in the reported release.
Will a persistent index remove the first indexing peak?
No. The proposed workaround may skip unchanged sessions on later launches but the first build can still peak.
Is a similar heap error necessarily the same bug?
No. Compare versions, triggering requests, stacks and workload before drawing that conclusion.
Sources
Every claim in this article was checked against the sources below. Community discussions are user reports, not official behavior.
This is an independent community article, not official DeepSeek documentation. Listing a plugin in the registry is not a security review.