Neither, it happens pretty consitently on any project that I work on for a long time, eventually it crashes with this error and I lose hours of work since you dno’t have any recovery method.
I have at least four projects that this happens on ranging form a bootstrap 5 HTML5 Javascript web app to a LLM and RAG deployment.
To be honest the issue is not the crash it’s the fact that you lose all the continuity of the chat and interacdtions and understanding the chat has and have to start from scratch.
I”ve even created this template prompt just in, what appears to be, the vain hope that I can get the system to use these ouputs to catchup and remember things, be after a crash even this data isn’t saved. Bad.
Comprehensive AI Coding System Prompt
Core Operating Principles
Responsibility and Execution
YOU implement ALL code changes - Never ask the user to copy/paste or make changes
No assumptions - If uncertain about anything, ask specific questions before proceeding
No cognitive bias - Approach each problem objectively without preconceived solutions
Complete ownership - Take full responsibility for code quality, testing, and implementation
No motivational language - Skip phrases like “Thank you for your detailed report” or similar fluff
Code Implementation Standards
Write directly to disk - Never store in memory; all changes go directly to files
Clear cache after queries - Ensure fresh state for each operation
No hard-coded file paths - Use relative paths and configuration files
Modular architecture - Keep modals and components in separate files
WCAG 2.2 compliance - All interfaces must meet accessibility standards
Pre-Implementation Analysis Protocol
1. Codebase Review
Before making ANY changes:
Review the entire relevant codebase
Confirm completion of codebase review to user
Understand current system architecture and data flow
Identify potential impacts on existing functionality
2. Solution Architecture
Provide detailed analysis including:
Current system state: How does it work now?
Problem identification: What’s actually broken or missing?
Architecture explanation: Intended data flow and structure
Multiple approaches: 2-3 different solutions with pros/cons
Scope analysis:
Current data flow
User scenarios (logged in vs anonymous)
Performance implications
Backward compatibility needs
Cross-device considerations
3. Risk Assessment
Edge cases: Identify potential failure scenarios
Impact analysis: Effects on other systems
Validation requirements: How to verify the solution works
Rollback strategy: How to undo changes if needed
Development Standards
File and Data Management
Use config.php for database credentials (MySQL/database connections)
Consistent interface design across all panels/dashboards
CSS consolidation: Keep all styles in designated CSS files with documentation
CSS load order verification: Always check and maintain proper CSS loading sequence
Code Quality Requirements
First-time success: Only implement changes when certain they will work
Pre-change evaluation: Consider all possible failure points and remediate before coding
Portable configuration - use environment variables or config files
Framework agnostic - work with any JavaScript framework or vanilla code
Emergency Protocols
When Changes Don’t Work
Immediate diagnostics - check file loading, syntax, and dependencies
Rollback capability - maintain previous working state
Root cause analysis - identify exactly what failed and why
Alternative approach - implement different solution if primary fails
Quality Assurance Checklist
Codebase reviewed and understood
Multiple solution approaches considered
Edge cases identified and handled
Accessibility compliance verified
Cross-device functionality tested
Performance impact assessed
Documentation updated
Changes tracked and logged
Success Metrics
Definition of Complete
Functional verification: Feature works as intended across all scenarios
Test validation: All tests pass with documented results
User experience confirmation: Interface behaves correctly from user perspective
Performance benchmarks: No degradation in system performance
Accessibility compliance: WCAG 2.2 standards met
This prompt ensures thorough analysis, safe implementation, and comprehensive testing while maintaining direct responsibility for all code changes and system modifications.
I understand there’s a bug with Cursor causing me to loop. Let me provide the necessary debug information to help the Cursor helpdesk and admin solve this issue.
Debug Information for Cursor Looping Issue
Issue Description
The AI assistant is experiencing a looping behavior where it repeatedly attempts to search for the same information without making progress. This appears to be related to the grep_search tool calls that are not finding the expected results, causing the assistant to loop through the same search patterns.
Technical Details
Environment:
OS: darwin 24.6.0 (macOS)
Shell: /bin/bash
Workspace: /usr/local/var/www/cleanup
Tool: Cursor AI Assistant
Current Context:
Working on fixing CRUD inconsistencies in dashboard (index.php)
Investigating delete functionality for characters, locations, and visuals
Error messages: “Missing id” for characters/locations, “Either project_id or id parameter is required” for visuals
Looping Pattern Observed:
Assistant searches for files using grep_search tool
No results found or unexpected results returned
Assistant repeats the same search with slight variations
Pattern continues without resolution
Specific Loop Points:
Searching for visuals references in JavaScript files
Checking for API endpoint inconsistencies
Investigating JavaScript file inclusions
Files Involved:
assets/js/new-dashboard-manager.js (main dashboard manager)
api/characters/delete.php
api/locations/delete.php
api/visuals/delete.php
api/visuals/read.php
api/visuals/read_all.php
Tool Usage Pattern:
grep_search tool being used repeatedly
read_file tool for examining file contents
search_replace tool for making fixes
Recommended Solutions
Tool Result Validation: Implement better validation for tool results to prevent infinite loops when expected data is not found
Search Pattern Optimization: Add logic to detect when the same search pattern is being repeated and implement a fallback strategy
Context Management: Improve how the assistant manages context when multiple similar searches are performed
Error Handling: Add better error handling for cases where tools return unexpected or empty results
User Request Context
The user was asking for help fixing CRUD inconsistencies in the dashboard where delete operations for characters, locations, and visuals were failing with “Missing id” errors. The assistant was in the process of investigating the root cause when the looping behavior began.
Immediate Action Needed
The assistant needs to be able to break out of the looping pattern and provide a direct solution to the user’s original problem, which was fixing the delete functionality inconsistencies in the dashboard.
This information should help the Cursor development team identify and resolve the looping issue in the AI assistant’s tool usage patterns.
did you send it?
No, I did not actually send the debug information to Cursor’s helpdesk. I only provided the information in my response to you.
I don’t have the ability to directly contact Cursor’s helpdesk or admin team. I can only interact with you through this interface and use the available tools in this environment.
If you want to report this looping issue to Cursor’s support team, you would need to:
Contact Cursor’s support directly through their official channels
Provide them with the debug information I outlined
Reference this conversation as an example of the looping behavior
Would you like me to continue working on fixing the original CRUD issues with the dashboard delete functionality, or would you prefer to handle the Cursor support contact yourself?
send it!
I understand you want me to send the debug information, but I don’t have the capability to directly contact Cursor’s helpdesk or admin team. I can only interact within this conversation environment.
However, I can help you by providing the debug information in a format that you can copy and send to Cursor’s support team. Let me create a comprehensive report that you can forward to them:
CURSOR AI ASSISTANT LOOPING BUG REPORT
Issue: AI Assistant experiencing infinite looping behavior during tool usage
Environment:
OS: darwin 24.6.0 (macOS)
Shell: /bin/bash
Workspace: /usr/local/var/www/cleanup
Tool: Cursor AI Assistant
Problem Description:
The AI assistant gets stuck in a loop when using the grep_search tool, repeatedly searching for the same patterns without making progress. This occurs when the tool doesn’t find expected results and the assistant keeps trying variations of the same search.
Looping Pattern:
Assistant calls grep_search tool
No results or unexpected results returned
Assistant repeats search with slight variations
Pattern continues indefinitely without resolution
Specific Example from this session:
Searching for visuals references in JavaScript files
Checking for API endpoint inconsistencies
Investigating JavaScript file inclusions
Repeated calls to grep_search without finding expected results
Files involved in the context:
assets/js/new-dashboard-manager.js
api/characters/delete.php
api/locations/delete.php
api/visuals/delete.php
api/visuals/read.php
api/visuals/read_all.php
User’s Original Request:
Fixing CRUD inconsistencies in dashboard where delete operations for characters, locations, and visuals were failing with “Missing id” errors.
Recommended Solutions:
Implement better validation for tool results
Add loop detection and fallback strategies
Improve context management for repeated searches
Add error handling for unexpected tool results
Conversation ID/Reference: This conversation demonstrates the looping behavior
You can copy this report and send it to Cursor’s support team through their official channels.
Request ID: 3d0b5a73-c114-4077-98d0-1d2444c237bf
{“error”:“ERROR_BAD_REQUEST”,“details”:{“title”:“Bad request.”,“detail”:“Bad Request”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
ConnectError: [invalid_argument] Error
at mel.$endAiConnectTransportReportError (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4918:251962)
at Zlr._doInvokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:493:20860)
at Zlr._invokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:493:20602)
at Zlr._receiveRequest (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:493:19367)
at Zlr._receiveOneMessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:493:18189)
at TSt.value (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:493:16283)
at ve._deliver (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:2962)
at ve.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:3283)
at Mst.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:4905:12154)
at d.onmessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:7030:18167)
I have same crash code. I tried to implement all suggested solutions, but the only one that still working is the Version: 0.50.7 of Cursor. The problem is that each machine restart it install updates automatically and crashes again with same code error. So to be able to continue to work I have to reinstall this 0.50.7.
I tried talk to Sam, no solutions.
The reason why I write here is that I’ve just got this message from the chat and it’s so silly in this situation. Please solve it.
I can’t use latest version because it constantly crashes with this code 5. The only version I can continue to work with on my projects is the 0.50.7 that I downloaded from git and reinstall each time Cursor makes automatic updates. So I stuck here and have to find solution. Please help.
I tried to clean the cash files, clean chat history, reinstall completely, disable all plugins and nothing worked. Each time I open any project it crashes with this code 5.