I keep losing my work. it shows me "ERR_CONNECTION_REFUSED — Error Code: -102"

Hello,

So I have been working on a project for a few months and sometimes cursor seems to lose track of my project telling me:

ERR_CONNECTION_REFUSED — Error Code: -102
URL: http://localhost:8765/arbitration-case.html?priority=case-sc-2831&id=starling-council

I usually have to redesign the pages again. Can anyone help me to locate my work and maybe let me know how to prevent this in the future. I can still see a few pages from the project but others seem missing.

Hey, thanks for the report. Good news, your work is most likely not lost.

The ERR_CONNECTION_REFUSED (-102) error only means the local web server that shows your pages at localhost:8765 isn’t running right now. This often happens after restarting Cursor or your computer, or if the terminal where the agent started the server was closed. This doesn’t delete files, it just means the preview can’t load the page.

Your HTML files should still be on disk. Here’s how to find them:

  • Search your system for the filename, like arbitration-case.html, using Finder or File Explorer search.
  • Or in Cursor, go to File > Open Recent and reopen the project folder, then your pages should show up in the file list on the left.
  • To open them in the browser again, ask the agent to start the local server again, then reload the localhost link.

To avoid this in the future:

  • Keep the whole project in one folder and always reopen that exact folder via Open Recent.
  • Remember that after a restart, the preview needs the server to be started again.

If you search and the files really aren’t anywhere, tell me which folder you were working in and we’ll dig deeper.