# Ai generated context isnt applied to php code Claude Opus / Sonnet (maybe even others)

**URL:** <https://forum.cursor.com/t/ai-generated-context-isnt-applied-to-php-code-claude-opus-sonnet-maybe-even-others/37078>\
**Category:** Bug Reports\
**Created:** [December 24, 2024, 10:33am UTC](https://forum.cursor.com/t/ai-generated-context-isnt-applied-to-php-code-claude-opus-sonnet-maybe-even-others/37078 "2024-12-24T10:33:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![1sors1](https://avatars.discourse-cdn.com/v4/letter/1/b77776/32.png) [@1sors1](https://forum.cursor.com/u/1sors1)\
**Post date:** [December 24, 2024, 10:33am UTC](https://forum.cursor.com/t/ai-generated-context-isnt-applied-to-php-code-claude-opus-sonnet-maybe-even-others/37078/1 "2024-12-24T10:33:46Z")

</div>

### Describe the Bug

URGENT!! Any AI generated context replaces any code with empty… So after i apply changes all code is gone and there is nothing more… So its unusable at the moment…

### Steps to Reproduce

Just ask AI anything, just to add check if the array key exists for example and after i press apply all the code is gone. This happens EVERY Time… I’ve tried deleting Cursor cache but nothing helps

### Expected Behavior

Well it should only apply changes to code and leave the unchanged code as it was… but right now everything is gone

### Screenshots / Screen Recordings

 ![■■■■■■■■■■■■■■■■■■■■■■■■■](https://us1.discourse-cdn.com/cursor1/original/3X/3/1/311a0bccfbafb8c2517dbe4be17a35622309288f.jpeg)

### Operating System

Windows 10/11

### Current Cursor Version (Menu → About Cursor → Copy)

Version: 0.44.8  
VSCode Version: 1.93.1  
Commit: f3b5a63019e4e2283033b4db987a35f8413c7570  
Date: 2024-12-22T05:48:08.427Z  
Electron: 30.5.1  
Chromium: 124.0.6367.243  
Node.js: 20.16.0  
V8: 12.4.254.20-electron.0  
OS: Windows\_NT x64 10.0.19045

### Additional Information

I have an anthropic Api key setup but i don’t think it matters…

I’ve tried Claude opus and then Sonnet and then ChatGpt 4 always the result is the same… its something with cursor for sure

### Does this stop you from using Cursor

Yes - Cursor is unusable

---

<div class="post-metadata">

**Author:** ![sanjeed5](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/sanjeed5/32/9610_2.png) [@sanjeed5](https://forum.cursor.com/u/sanjeed5)\
**Post date:** [August 18, 2025, 5:45pm UTC](https://forum.cursor.com/t/ai-generated-context-isnt-applied-to-php-code-claude-opus-sonnet-maybe-even-others/37078/2 "2025-08-18T17:45:22Z")

</div>

Since this was posted long back, we’re closing this topic as the issue has likely been resolved in newer releases.

• Please update to the latest version from [Downloads | Cursor - The AI Code Editor](https://cursor.com/downloads)  
• If you still experience any issues after updating to the latest version, please share the details with us in a new forum post.

Please let us know how the latest version works for you!
