claude-code - 💡(How to fix) Fix [BUG] Dispatch blocked by CSP: a-api.anthropic.com missing from connect-src in Electron webview [1 comments, 2 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#45278Fetched 2026-04-09 08:09:05
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×5commented ×1

Error Message

Error Messages/Logs

2026-02-25 06:04:21 [error] Connecting to 'https://a-api.anthropic.com/v1/m' violates

Root Cause

Root cause: a-api.anthropic.com is not included in the connect-src CSP directive for the Electron webview. Every Dispatch session triggers a CSP violation that blocks the API call, leaving dispatch_agent_name as null.

Fix Action

Fix / Workaround

Dispatch (Cowork) is unresponsive — messages sent from the Claude iOS app receive no response. The desktop session initializes but stays idle indefinitely. Regular Chat and Claude Code CLI both work fine on the same account.

Root cause: a-api.anthropic.com is not included in the connect-src CSP directive for the Electron webview. Every Dispatch session triggers a CSP violation that blocks the API call, leaving dispatch_agent_name as null.

~/Library/Logs/Claude/main.log

2026-03-28 10:15:38 [info] [transport:ccr] reportMetadata {"permission_mode":"default","dispatch_agent_name":null}

Code Example

# ~/Library/Logs/Claude/claude.ai-web.log
2026-02-25 06:04:21 [error] Connecting to 'https://a-api.anthropic.com/v1/m' violates
the following Content Security Policy directive: "connect-src 'self'
https://api.segment.io https://*.segment.io https://*.segment.com
https://a-cdn.anthropic.com https://*.google.com https://*.facebook.com
https://*.facebook.net https://*.doubleclick.net". The action has been blocked.

# ~/Library/Logs/Claude/main.log
2026-03-28 10:15:38 [info] [transport:ccr] reportMetadata {"permission_mode":"default","dispatch_agent_name":null}
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?

Dispatch (Cowork) is unresponsive — messages sent from the Claude iOS app receive no response. The desktop session initializes but stays idle indefinitely. Regular Chat and Claude Code CLI both work fine on the same account.

Root cause: a-api.anthropic.com is not included in the connect-src CSP directive for the Electron webview. Every Dispatch session triggers a CSP violation that blocks the API call, leaving dispatch_agent_name as null.

Note: a-cdn.anthropic.com IS in the allowlist, but a-api.anthropic.com is NOT.

Error Messages/Logs

# ~/Library/Logs/Claude/claude.ai-web.log
2026-02-25 06:04:21 [error] Connecting to 'https://a-api.anthropic.com/v1/m' violates
the following Content Security Policy directive: "connect-src 'self'
https://api.segment.io https://*.segment.io https://*.segment.com
https://a-cdn.anthropic.com https://*.google.com https://*.facebook.com
https://*.facebook.net https://*.doubleclick.net". The action has been blocked.

# ~/Library/Logs/Claude/main.log
2026-03-28 10:15:38 [info] [transport:ccr] reportMetadata {"permission_mode":"default","dispatch_agent_name":null}

Suggested Fix

Add https://a-api.anthropic.com to the Electron webview CSP connect-src directive.

Steps to Reproduce

  1. Open Claude Desktop → Cowork tab → Dispatch
  2. Pair with Claude iOS app via QR code
  3. Send any message from iPhone
  4. Observe: no response on desktop or iPhone
  5. Check ~/Library/Logs/Claude/claude.ai-web.log for CSP violation

Claude Model

Opus

Is this a regression?

No, this never worked

Claude Code Version

Latest (Claude Desktop)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

N/A (Claude Desktop)

Additional Information

Previously reported in #40083, which was incorrectly auto-closed as a duplicate of #39270 (an unrelated process crash issue) and subsequently auto-locked.

extent analysis

TL;DR

Add https://a-api.anthropic.com to the Electron webview CSP connect-src directive to resolve the Dispatch unresponsiveness issue.

Guidance

  • Verify the CSP violation in the ~/Library/Logs/Claude/claude.ai-web.log file to confirm the root cause.
  • Update the Electron webview configuration to include https://a-api.anthropic.com in the connect-src directive.
  • Test the Dispatch functionality after applying the fix to ensure messages are sent and received correctly.
  • Check the dispatch_agent_name value in the ~/Library/Logs/Claude/main.log file to confirm it is no longer null after the fix.

Example

No code snippet is provided as the fix involves updating the Electron webview configuration, which is not explicitly shown in the issue.

Notes

The issue is specific to the Claude Desktop application on macOS, and the fix should be applied to the Electron webview configuration. The a-api.anthropic.com domain must be added to the connect-src directive to allow the API call and resolve the CSP violation.

Recommendation

Apply the workaround by adding https://a-api.anthropic.com to the Electron webview CSP connect-src directive, as this directly addresses the identified root cause of the issue.

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