claude-code - 💡(How to fix) Fix [BUG] Mac desktop app: 'Your previous message wasn't sent' toast fires after successful response, caused by postMessage origin mismatch to claudeusercontent.com [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58623Fetched 2026-05-14 03:43:28
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
1
Timeline (top)
labeled ×3commented ×2cross-referenced ×1

Error Message

[warn] Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.claudeusercontent.com') does not match the recipient window's origin ('https://claude.ai'). [error] Unrecognized Content-Security-Policy directive 'webrtc'. The postMessage origin mismatch fires after the response stream completes, which is why the toast appears post-completion rather than on send. The error-handling path appears to misclassify this iframe handshake failure as a chat send failure. [warn] MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ...claude.web_AutoUpdater_updaterState_store_update listeners added.

Error Messages/Logs

Root Cause

Log signature from ~/Library/Logs/Claude/claude.ai-web.log shows the root cause is a failed cross-origin postMessage from claude.ai to the artifacts iframe at claudeusercontent.com, after which the renderer logs an [ARTIFACTS] malformed message and the toast surfaces:

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The Mac desktop app shows a "Your previous message wasn't sent. You can try again." toast after responses that actually completed successfully. The chat message sends, the response streams in fully, the turn is saved — and then the toast appears anyway. It is a false alarm, not an actual send failure.

This happens consistently across multiple chats over the past several days, including in brand-new chats with no history. It is not tied to long conversations, large pastes, or attachments. Cache clear (Cache, Code Cache, GPUCache, Session Storage), full quit/relaunch, and app update did not resolve it.

Log signature from ~/Library/Logs/Claude/claude.ai-web.log shows the root cause is a failed cross-origin postMessage from claude.ai to the artifacts iframe at claudeusercontent.com, after which the renderer logs an [ARTIFACTS] malformed message and the toast surfaces:

[warn] Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.claudeusercontent.com') does not match the recipient window's origin ('https://claude.ai'). [ARTIFACTS] Received message does not conform to basic message shape, ignoring [error] Unrecognized Content-Security-Policy directive 'webrtc'.

The postMessage origin mismatch fires after the response stream completes, which is why the toast appears post-completion rather than on send. The error-handling path appears to misclassify this iframe handshake failure as a chat send failure.

Also visible in the same log, likely separate but worth flagging: [warn] MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ...claude.web_AutoUpdater_updaterState_store_update listeners added.

Environment:

  • Claude Mac desktop app version [VERSION]
  • macOS [your version]
  • Model: Opus 4.7
  • Reproduces in fresh chats, with and without artifacts in the response
  • Web client (claude.ai in Chrome/Safari) does not show this toast

What Should Happen?

The toast should only fire when a chat message actually fails to send. A failed cross-origin postMessage to the artifacts iframe should be handled within the artifacts subsystem and not surface as a chat send-failure warning to the user.

Error Messages/Logs

Steps to Reproduce

  1. Open the Claude Mac desktop app
  2. Start a new chat
  3. Send any prompt that produces a response containing an artifact (e.g. "create a simple HTML hello-world artifact") — though note that the bug also reproduces on responses without artifacts
  4. Wait for the response to fully stream in and complete
  5. Observe: the "Your previous message wasn't sent. You can try again." toast appears in the top-right shortly after the response finishes rendering, even though the message clearly sent and the response is fully visible

Reproduces:

  • Across multiple chats, including brand-new ones with no history
  • With and without attachments in the user message
  • On Opus 4.7 (have not tested other models systematically)
  • Consistently over the past several days

Does NOT reproduce:

  • In claude.ai opened in Chrome/Safari (same account, same network)

Tail of ~/Library/Logs/Claude/claude.ai-web.log while reproducing shows the postMessage origin mismatch to claudeusercontent.com firing right around when the toast appears (full log snippet in the "What's Wrong?" section above; screenshot attached).

Cache clear, full quit/relaunch, and app update did not resolve.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.138

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING