AI chats fail if Terminal is visible

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Since latest update, if the Terminal is visible at all, chatting with the AI gives a connection error:

Connection failed. If the problem persists, please check your internet connection or VPN

This is across all attempted models. This is regardless of ‘type’ of terminal window or any terminal activity. As soon as I close the terminal, or hide it by switching to view another bottom bar window like ‘output’ or ‘ports’, AI chats work just fine again.

Steps to Reproduce

Chat to AI while terminal is open.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.20 (user setup)
VSCode Version: 1.105.1
Commit: a8d8905b06c8da1739af6f789efd59c28ac2a680
Date: 2025-11-22T14:51:59.472Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the report. This kind of trigger related to terminal visibility is pretty unusual, and we need to investigate it.

Could you please do the following:

  • Open Dev Tools (Help > Toggle Developer Tools)
  • Go to the Console tab
  • Make the terminal visible
  • Try sending an AI chat message
  • Share any error messages that appear in the console

This will help us understand what’s causing the connection issue when the terminal is visible.

When terminal is visible:

[composer] submitChatMaybeAbortCurrent errored! Error: [UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character
    at J5d (workbench.desktop.main.js:50:67651)
    at new UAs (workbench.desktop.main.js:50:71867)
    at new GUe (workbench.desktop.main.js:50:73335)
    at GUe.with (workbench.desktop.main.js:50:72303)
    at SGf.resolveRelativePath (workbench.desktop.main.js:8928:42831)
    at workbench.desktop.main.js:4074:1250
    at Array.map (<anonymous>)
    at Ij.getPopulatedContext (workbench.desktop.main.js:4074:1213)
    at Ij.submitChatMaybeAbortCurrent (workbench.desktop.main.js:4058:8950)
    at async ro (workbench.desktop.main.js:6207:3514)
submitChatMaybeAbortCurrent @ workbench.desktop.main.js:4064
await in submitChatMaybeAbortCurrent
(anonymous) @ workbench.desktop.main.js:52
Srr @ workbench.desktop.main.js:52
C6d @ workbench.desktop.main.js:52
n.value @ workbench.desktop.main.js:52
ro @ workbench.desktop.main.js:6207
await in ro
onSubmit @ workbench.desktop.main.js:6207
he @ workbench.desktop.main.js:6134
onSubmit @ workbench.desktop.main.js:6134
handleSubmit @ workbench.desktop.main.js:6028
(anonymous) @ workbench.desktop.main.js:6028
Cal @ workbench.desktop.main.js:444
(anonymous) @ workbench.desktop.main.js:444
Eal @ workbench.desktop.main.js:444
yX @ workbench.desktop.main.js:444
update @ workbench.desktop.main.js:446
Cal @ workbench.desktop.main.js:444
au @ workbench.desktop.main.js:444
Jzd @ workbench.desktop.main.js:444
(anonymous) @ workbench.desktop.main.js:444
workbench.desktop.main.js:6880 [composer] submitChatMaybeAbortCurrent outer error Error: [UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character
    at J5d (workbench.desktop.main.js:50:67651)
    at new UAs (workbench.desktop.main.js:50:71867)
    at new GUe (workbench.desktop.main.js:50:73335)
    at GUe.with (workbench.desktop.main.js:50:72303)
    at SGf.resolveRelativePath (workbench.desktop.main.js:8928:42831)
    at workbench.desktop.main.js:4074:1250
    at Array.map (<anonymous>)
    at Ij.getPopulatedContext (workbench.desktop.main.js:4074:1213)
    at Ij.submitChatMaybeAbortCurrent (workbench.desktop.main.js:4058:8950)
    at async ro (workbench.desktop.main.js:6207:3514) {arch: 'x64', platform: 'win32', channel: 'stable', client_version: '2.1.20', requestId: 'dbaf4a7f-7052-491b-a31d-29bc25e861f8', …}
error @ workbench.desktop.main.js:6880
submitChatMaybeAbortCurrent @ workbench.desktop.main.js:4064
await in submitChatMaybeAbortCurrent
(anonymous) @ workbench.desktop.main.js:52
Srr @ workbench.desktop.main.js:52
C6d @ workbench.desktop.main.js:52
n.value @ workbench.desktop.main.js:52
ro @ workbench.desktop.main.js:6207
await in ro
onSubmit @ workbench.desktop.main.js:6207
he @ workbench.desktop.main.js:6134
onSubmit @ workbench.desktop.main.js:6134
handleSubmit @ workbench.desktop.main.js:6028
(anonymous) @ workbench.desktop.main.js:6028
Cal @ workbench.desktop.main.js:444
(anonymous) @ workbench.desktop.main.js:444
Eal @ workbench.desktop.main.js:444
yX @ workbench.desktop.main.js:444
update @ workbench.desktop.main.js:446
Cal @ workbench.desktop.main.js:444
au @ workbench.desktop.main.js:444
Jzd @ workbench.desktop.main.js:444
(anonymous) @ workbench.desktop.main.js:444
workbench.desktop.main.js:4064 [composer] Failed to get complete AI response
submitChatMaybeAbortCurrent @ workbench.desktop.main.js:4064
await in submitChatMaybeAbortCurrent
(anonymous) @ workbench.desktop.main.js:52
Srr @ workbench.desktop.main.js:52
C6d @ workbench.desktop.main.js:52
n.value @ workbench.desktop.main.js:52
ro @ workbench.desktop.main.js:6207
await in ro
onSubmit @ workbench.desktop.main.js:6207
he @ workbench.desktop.main.js:6134
onSubmit @ workbench.desktop.main.js:6134
handleSubmit @ workbench.desktop.main.js:6028
(anonymous) @ workbench.desktop.main.js:6028
Cal @ workbench.desktop.main.js:444
(anonymous) @ workbench.desktop.main.js:444
Eal @ workbench.desktop.main.js:444
yX @ workbench.desktop.main.js:444
update @ workbench.desktop.main.js:446
Cal @ workbench.desktop.main.js:444
au @ workbench.desktop.main.js:444
Jzd @ workbench.desktop.main.js:444
(anonymous) @ workbench.desktop.main.js:444
workbench.desktop.main.js:6880 [composer] Chat incomplete or aborted {arch: 'x64', platform: 'win32', channel: 'stable', client_version: '2.1.20', requestId: 'dbaf4a7f-7052-491b-a31d-29bc25e861f8', …}

When terminal is not visible:
No errors in console. AI Chat works.

Thanks for the logs. Great - the cause is clear now.

The UriError: “If a URI contains an authority component, then the path component must either be empty or begin with a slash” in resolveRelativePath is a parsing bug for Windows paths during terminal context collection. Cursor tries to include terminal info in chat context but mishandles paths.

Please try:

  • Update to the latest version: Help > Check for Updates (2.1.39+ is available you’re on 2.1.20)
  • If the issue persists after updating, temporarily work with the terminal closed or switch to the Output/Ports tab

This is a known Windows terminal integration bug in 2.1.20 - I’ll pass the logs to the team.

Let me know if updating fixed it.