The 'Failed to connect to Cursor AI service' error means Cursor cannot reach its AI backend servers. In about 70% of cases, the cause is HTTP/2 protocol incompatibility with VPNs or corporate proxies. Enable HTTP/1.1 mode in Cursor settings, check your internet connection, and disable any VPN temporarily to test. Also check Cursor's status page for outages.
What does "Failed to connect to Cursor AI service" mean?
When Cursor shows this error, it cannot establish a connection to the AI model provider's servers. All AI features stop working: tab completion, chat, Composer, and Agent mode all depend on this connection. The error typically appears as a notification toast with a Request ID.
The root cause in approximately 70% of corporate environments is HTTP/2 protocol incompatibility. Cursor uses HTTP/2 by default for AI communication, but many VPNs and corporate proxies (especially Zscaler) do not properly support HTTP/2, causing the connection to fail. Switching to HTTP/1.1 resolves this.
The DevTools console (Help > Toggle Developer Tools) may show additional details like ERROR_PROVIDER_ERROR, resource_exhausted, or connect error messages that help narrow down whether the issue is network-level, authentication-level, or capacity-level.
Common causes
A VPN or corporate proxy (especially Zscaler) blocks or
corrupts HTTP/2 connections to Cursor's AI backend
Cursor's AI service is experiencing an outage or
capacity issues on their backend servers
A local firewall or security appliance is
blocking outbound connections to Cursor's API endpoints on port 443
The DNS server cannot resolve
Cursor's API hostname, preventing the connection from being established
The Cursor authentication token has
expired and the automatic refresh failed silently
Accumulated context from a long
chat session caused a resource_exhausted error, which presents as a connection failure
How to fix "Failed to connect to Cursor AI service"
The most effective fix for corporate environments: open Cursor Settings (Cmd+, / Ctrl+,), search for 'HTTP', and enable 'Cursor: Use HTTP/1.1'. Restart Cursor. This resolves the HTTP/2 incompatibility that causes most connection failures.
If HTTP/1.1 mode does not help, check your internet connection. Try opening https://api.openai.com and https://api.anthropic.com in your browser to verify you can reach AI provider endpoints. If these fail, the issue is network-level.
Disconnect your VPN temporarily to test whether it is the cause. If Cursor works without the VPN, configure your VPN to split-tunnel Cursor's AI traffic or whitelist Cursor's API endpoints.
Cursor has built-in network diagnostics. Open the command palette (Cmd+Shift+P) and search for 'Cursor: Network Diagnostics'. This checks DNS, SSL, API, Chat, and Agent streaming connectivity and reports which specific checks fail.
If the error appears after extended use, try starting a fresh chat. Accumulated context from long sessions can trigger resource_exhausted errors. Switch from 'Auto' model selection to a specific model in the chat settings.
For persistent issues, sign out and back in (Settings > Account > Sign Out) to refresh your authentication token. Clear the Cursor cache if needed.
Prevention tips
- Enable HTTP/1.1 mode in Cursor settings as the first fix — this resolves the most common cause of connection failures in corporate environments
- Use Cursor's built-in network diagnostics (command palette > 'Network Diagnostics') to pinpoint which specific connection is failing
- Start fresh chats frequently to avoid resource_exhausted errors from accumulated context in long sessions
- Check Cursor's status page before extensive troubleshooting — outages can cause connection failures that no local fix will resolve
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
Cursor shows 'Failed to connect to Cursor AI service' and none of the AI features work. I'm on a corporate network with Zscaler VPN. How do I configure Cursor to work with corporate proxy settings?
My Cursor editor shows 'Error: Failed to connect to Cursor AI service'. I've tried restarting Cursor. I'm behind a corporate proxy. Walk me through every diagnostic step including HTTP/1.1 mode and network diagnostics.
Frequently asked questions
Why does Cursor show "Error: Failed to connect to Cursor AI service"?
The most common cause (70% of corporate cases) is HTTP/2 incompatibility with VPNs and proxies. Enable HTTP/1.1 mode in Cursor Settings. Other causes include Cursor service outages, firewall blocking, and expired authentication tokens.
How do I enable HTTP/1.1 mode in Cursor?
Open Settings (Cmd+, or Ctrl+,), search for 'HTTP', and toggle on 'Cursor: Use HTTP/1.1'. Restart Cursor for the change to take effect. This switches from HTTP/2 to HTTP/1.1 for AI communication.
Does this error mean Cursor's servers are down?
Not necessarily. While Cursor outages do cause this error, the majority of cases are local network issues (VPN, proxy, firewall). Check Cursor's status page first, then try the HTTP/1.1 fix if no outage is reported.
Can I use Cursor's AI features behind a corporate proxy?
Yes, but you may need to enable HTTP/1.1 mode and configure your proxy settings. If your proxy requires authentication, configure the proxy in Cursor's settings. For strict firewalls, ask your IT team to whitelist Cursor's API endpoints.
Why does the connection fail after a long chat session?
Long sessions accumulate context that can trigger resource_exhausted errors on the AI provider side. Start a fresh chat to reset the context. Also switch from 'Auto' model to a specific model selection.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your issue.
Book a free consultation