[Bug] Desktop: text input freezes after long session — ProseMirror placeholder/cursor disappears
[Bug] Desktop: text input freezes after long session — ProseMirror placeholder/cursor disappears
Environment
- Claude Desktop (Windows App): 1.5354.0.0 X64
- Claude Code binary: 2.1.121
- OS: Windows 10 Pro 19045
- Display: 1920×1080, 144Hz, Mi 245 HF
- Deployment mode: 3p (third-party API, DeepSeek v4-pro)
Symptoms
After an extended session (~2 days, ~1300 message turns), the text input box stops working:
- Input placeholder text and cursor disappear entirely
- Cannot type any characters into the input area
- The "+" attachment button still works normally — clickable and functional
- Other UI elements (sidebar, conversation history, etc.) respond normally
- The issue persists across app restarts until caches are manually cleared
Log Evidence
From claude.ai-web.log (repeated across multiple sessions):
[warn] ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'.
It is recommended to load style/prosemirror.css from the prosemirror-view package.
And a TreeSitter WASM loading failure:
[error] wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly':
Incorrect response MIME type. Expected 'application/wasm'.
[error] falling back to ArrayBuffer instantiation
[error] failed to asynchronously prepare wasm: CompileError:
WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 64 6f @+0
[warn] [TreeSitter] Parser failed to initialize, falling back to plain text for all syntax highlighting
(3c 21 64 6f = <!do — the proxy returned an HTML page instead of the WASM binary)
Root Cause Analysis
The input box uses ProseMirror as its editor component. In long-running sessions, the ProseMirror editor view appears to lose its DOM connection — the CSS white-space: pre-wrap is expected but not applied, and the editor's internal state gets detached from the rendered element. The placeholder and cursor are ProseMirror-managed decorations, so they disappear when the editor disconnects.
The TreeSitter WASM failure means syntax highlighting falls back to plain text mode, which may exacerbate the ProseMirror rendering path.
Workaround / Fix
Clearing all Electron renderer caches resolves the issue:
# Path: %LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Local\Claude-3p\
rm -rf GPUCache DawnGraphiteCache DawnWebGPUCache "Code Cache"
rm -rf "Session Storage" "Local Storage" blob_storage
rm -rf Cache IndexedDB WebStorage SharedStorage "Shared Dictionary" Network
After cache clear + restart, input box works correctly again. The session audit data (in local-agent-mode-sessions/) is NOT affected and remains intact.
Suggested Fix
- Ensure
prosemirror.cssis always loaded before ProseMirror editor instantiation - Add a ProseMirror editor health check that detects detached DOM state and re-mounts the editor
- Handle TreeSitter WASM fetch failures gracefully — if the WASM response isn't valid WebAssembly (e.g., proxy HTML page), skip the ArrayBuffer fallback path
- Consider periodic cleanup of stale editor state in long-running sessions
Steps to Reproduce
- Have an active long session (2+ days, 1000+ turns)
- The input box placeholder gradually disappears, then typing stops
- The "+" attachment button still functions
- Restarting the app without clearing caches does NOT fix it
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗