"There was a problem with the session" — React hydration crash (#418) from XML-like skill tags in large parallel-agent sessions

Resolved 💬 3 comments Opened Feb 21, 2026 by markwoitaszek Closed Feb 24, 2026

Summary

The Claude desktop app (Electron, v1.1.3918) repeatedly crashes with "There was a problem with the session" when loading conversations that were generated by multi-agent skills producing large volumes of parallel output.

The IDE extension is unaffected — same conversation opens fine in VS Code.

---

Environment

| Field | Value |
|-------|-------|
| OS | macOS 26.3 (Build 25D125) |
| Claude Desktop App Version | 1.1.3918 |
| Plugin | visionary-studios@vs-claude-marketplace v1.0.0-beta.1 |

---

Symptoms

  • Opening a specific conversation shows: "There was a problem with the session"
  • Conversation is completely unloadable — no content, no scroll, no retry
  • Error occurs immediately on open, before any input
  • Restarting the desktop app does not resolve it
  • Same session opens correctly in the VS Code IDE extension
  • Occurred 6+ times over two days, consistently on sessions using pr-code-review

---

Error Log Evidence

From ~/Library/Logs/Claude/claude.ai-web.log:

React #418 — Hydration Mismatch (primary crash)

2026-02-20 17:58:19 [error] Uncaught Error: Minified React error #418;  args[]=text&args[]=
2026-02-21 00:16:13 [error] Uncaught Error: Minified React error #418;  args[]=HTML&args[]=
2026-02-21 00:19:11 [error] Uncaught Error: Minified React error #418;  args[]=HTML&args[]=
2026-02-21 00:20:30 [error] Uncaught Error: Minified React error #418;  args[]=HTML&args[]=
2026-02-21 00:23:46 [error] Uncaught Error: Minified React error #418;  args[]=HTML&args[]=

React error #418 = "Text content does not match server-rendered HTML" — https://react.dev/errors/418

React #185 — Maximum Update Depth (secondary, during active sessions)

2026-02-21 00:13:47 [error] Error: Minified React error #185
2026-02-21 00:13:53 [error] Error: Minified React error #185
2026-02-21 00:13:59 [error] Error: Minified React error #185
2026-02-21 00:14:01 [error] Error: Minified React error #185
2026-02-21 00:14:04 [error] Error: Minified React error #185
2026-02-21 00:14:09 [error] Error: Minified React error #185

React error #185 = "Maximum update depth exceeded" — https://react.dev/errors/185

EventEmitter Memory Leak

2026-02-20 17:58:19 [warn] MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
  11 $eipc_message$_a97164db-..._$_AutoUpdater_$_updaterState_$store$_update listeners added.

Repeats on every session restart — IPC channel listeners not being cleaned up.

---

Root Cause Analysis

Cause 1: XML-like skill tags → React #418

Claude's skill invocation protocol embeds XML-like tags directly in user message content:

<command-message>visionary-studios:pr-code-review</command-message>
<command-name>/visionary-studios:pr-code-review</command-name>
<command-args>
https://github.com/markwoitaszek/gpu-photo-pipeline/pull/203
</command-args>

System events inject similar tags:

<ide_opened_file>The user opened the file /path/to/file.ext in the IDE...</ide_opened_file>

When the Electron desktop app performs SSR in the main process then hydrates in the renderer, the angle-bracket characters cause React to produce different DOM text nodes at SSR time vs. hydration time → error #418.

The args[]=HTML variant suggests React is attempting to parse these tags as HTML rather than escaping them as text — the serialization path differs between the two render passes.

Manual inspection of session ef714850.jsonl found 395 HTML-like patterns (<tag> sequences) in message content, confirming this vector.

Cause 2: Simultaneous multi-agent flushes → React #185

The pr-code-review skill launches 8 parallel audit agents simultaneously. When all resolve within a short window, rapid-fire setState calls exceed React's batching budget. Evidence: #185 errors in tight clusters (6 errors in 22 seconds at 00:13:47–00:14:09).

Cause 3: IPC Listener Accumulation → Memory Leak

AutoUpdater IPC channel accumulates listeners with each new session without cleanup. Not a direct crash cause, but increases renderer instability.

---

Session Evidence

| Session ID | Date | Size | Trigger |
|------------|------|------|---------|
| ef714850 | 2026-02-21 00:24 | 4.5 MB | pr-code-review PR #203 — crashed |
| c51c28ff | 2026-02-21 00:14 | 2.7 MB | pr-code-review PR #203 — crashed |
| 2ce34ca7 | 2026-02-20 23:23 | 8.4 MB | test-audit PR #201 |
| 26aded10 | 2026-02-20 18:26 | 15.4 MB | Enterprise branch audit — first crash at 17:58 |

---

Reproduction Steps

  1. Install a skill that launches multiple parallel agents (e.g., visionary-studios:pr-code-review)
  2. Run the skill against a large PR (50+ changed files)
  3. Allow 2–3 full runs to accumulate (each session will be 1–5 MB)
  4. Open the desktop app and click any of those sessions in the sidebar
  5. Observe: "There was a problem with the session" — conversation is blank and unloadable

Fastest repro: Load session ef714850-2528-4e07-8b18-a40df9fcee1e from backup if accessible.

---

Impact

  • Conversations permanently lost through the UI — no retry, scroll, or fallback
  • No warning before crash — sessions appear normal in sidebar until opened
  • Repeated occurrence — any project using high-parallelism skills hits this within 2–3 sessions on a large codebase
  • Desktop-only — VS Code IDE extension completely unaffected

---

Suggested Fixes

Fix 1: Escape angle-bracket content at the SSR serialization layer (addresses #418)

Before SSR-serializing user message content, ensure text nodes containing < and > are HTML-escaped so both render passes produce identical DOM output. The key invariant: text nodes that contain angle-bracket characters must be treated as plain text in both the SSR pass and the hydration pass, not as HTML markup.

Fix 2: Batch multi-agent state updates (addresses #185)

Wrap concurrent agent completion state flushes in React's batched update mechanism (startTransition or equivalent) to bound render depth during large bursts.

Fix 3: Clean up IPC listeners on session teardown (addresses memory leak)

Track listeners at registration time and explicitly remove them during session teardown rather than relying on garbage collection.

Fix 4: Graceful degradation for large or corrupted sessions

If hydration fails, fall back to a plain-text or simplified rendering mode rather than showing a blank error screen. The raw JSONL is always intact on disk — a text-only fallback would allow users to read their conversations even when the rich renderer fails.

---

Workaround

A recovery utility has been built as a result of this bug:
https://github.com/markwoitaszek/claude-session-recovery

git clone https://github.com/markwoitaszek/claude-session-recovery.git
python3 session_recovery.py --project myproject --last 2

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗