# Code editing in Ask mode, sed edits escape versioning

**URL:** <https://forum.cursor.com/t/code-editing-in-ask-mode-sed-edits-escape-versioning/154880>\
**Category:** Bug Reports\
**Tags:** terminal, ask-mode, composer, review\
**Created:** [March 16, 2026, 9:56am UTC](https://forum.cursor.com/t/code-editing-in-ask-mode-sed-edits-escape-versioning/154880 "2026-03-16T09:56:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bender250](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/bender250/32/98218_2.png) [@Bender250](https://forum.cursor.com/u/Bender250)\
**Post date:** [March 16, 2026, 9:56am UTC](https://forum.cursor.com/t/code-editing-in-ask-mode-sed-edits-escape-versioning/154880/1 "2026-03-16T09:56:10Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

Switching from Agent to Ask and back introduces weird behavior.

- In Ask, the model decided to edit something using `sed` and `cat` despite that I just asked about the code I created.
- After returning to Agent mode, it continued using `sed` and `cat` to edit files, which resulted in worse edits and lack of version control (“X Files for Review” does not include the files changed by by tools.

### Steps to Reproduce

Use Composer 1 on a task where “Ask” might involve some coding (but it was not needed in my case), model will implement the changes using `sed or `cat`. Then switch to Agent and see if it still edits code by `sed`and`cat`.

### Expected Behavior

1. In Ask mode, it should not use tools that edit code
2. Even if it uses tools to edit code, it should appear in the edited files such that we can revert the changes.

### Screenshots / Screen Recordings

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/3/6/36d12da88a671c8a537efd73db95a37ef9ef51e6.png)

### Operating System

MacOS

### Version Information

Version: 2.6.19  
VSCode Version: 1.105.1  
Commit: 224838f96445be37e3db643a163a817c15b36060  
Date: 2026-03-12T04:07:27.435Z (4 days ago)  
Build Type: Stable  
Release Track: Default  
Electron: 39.4.0  
Chromium: 142.0.7444.265  
Node.js: 22.22.0  
V8: 14.2.231.22-electron.0  
OS: Darwin arm64 24.6.0

### For AI issues: which model did you use?

Composer 1

### For AI issues: add Request ID with privacy disabled

984f4f71-3c78-40f1-b11e-d1eaa1385f3e

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [March 16, 2026, 10:06am UTC](https://forum.cursor.com/t/code-editing-in-ask-mode-sed-edits-escape-versioning/154880/4 "2026-03-16T10:06:09Z")

</div>

Hey, thanks for the detailed report. There are two separate bugs here, and both are known.

1. Ask mode uses sed or cat for edits  
This happens because the state can get out of sync when switching modes Agent to Ask to Agent inside the same chat. Composer 1 is especially prone to this. Similar reports:

- [Agent in ask mode trying to make edits infinite loop](https://forum.cursor.com/t/agent-in-ask-mode-trying-to-make-edits-infinite-loop/151781)
- [Switch Mode is Ignored, Cursor Reverts to Agent Behavior](https://forum.cursor.com/t/switch-mode-is-ignored-cursor-reverts-to-agent-behavior/153374)

Workaround: when you change modes, it’s better to start a new chat instead of switching inside the existing one. You can also try a different model, Sonnet 4.5 or Claude 4.6 tend to be more stable in Ask mode.

1. Edits made via sed or cat don’t show up in Files for Review  
This is an architectural limitation. The review panel only tracks changes made via the built-in edit tools. Terminal commands like sed and cat bypass that system. The team is aware.

Thanks for the Request ID, I’ve forwarded it along with the report. Let me know if starting a new chat helps.

---

<div class="post-metadata">

**Author:** ![mohitjain](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mohitjain/32/100229_2.png) [@mohitjain](https://forum.cursor.com/u/mohitjain)\
**Post date:** [April 7, 2026, 10:59am UTC](https://forum.cursor.com/t/code-editing-in-ask-mode-sed-edits-escape-versioning/154880/8 "2026-04-07T10:59:16Z")

</div>

Hey @Bender250!

The ask mode editing issue has been fixed in a recent Cursor update. Updating to the latest version should resolve this. If you’re still experiencing this on the latest version of Cursor, please raise a new thread and we’ll take a look.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [April 29, 2026, 10:59am UTC](https://forum.cursor.com/t/code-editing-in-ask-mode-sed-edits-escape-versioning/154880/9 "2026-04-29T10:59:59Z")

</div>

Closed on April 29, 2026, 10:59am UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
