Feature request: Keep tool metadata when a permission is rejected #1241

Closed
opened 2026-02-16 17:30:08 -05:00 by yindo · 4 comments
Owner

Originally created by @AYM1607 on GitHub (Aug 11, 2025).

Originally assigned to: @adamdotdevin on GitHub.

The current behavior during a tool use rejection is to replace the original content with a permissions error message:

Image

This is okay if the tool use was completely wrong, but makes it hard to reference specific parts of the diff when you just want small tweaks. It'd be nice if we could configure the metadata visibility of rejected tool uses. I have a prototype that works for the edit and write tools, and I'm happy to work on it further:

Image Image
Originally created by @AYM1607 on GitHub (Aug 11, 2025). Originally assigned to: @adamdotdevin on GitHub. The current behavior during a tool use rejection is to replace the original content with a permissions error message: <img width="1511" height="415" alt="Image" src="https://github.com/user-attachments/assets/96f2511d-a5ac-4b9d-b29a-356c5a977ecb" /> This is okay if the tool use was completely wrong, but makes it hard to reference specific parts of the diff when you just want small tweaks. It'd be nice if we could configure the metadata visibility of rejected tool uses. I have a prototype that works for the edit and write tools, and I'm happy to work on it further: <img width="1512" height="634" alt="Image" src="https://github.com/user-attachments/assets/14016f8a-b376-4dee-ad27-b194010ab740" /> <img width="1512" height="819" alt="Image" src="https://github.com/user-attachments/assets/cb5ff69b-5f0d-4e01-b9f5-5a6ef48eac74" />
yindo closed this issue 2026-02-16 17:30:08 -05:00
Author
Owner

@AYM1607 commented on GitHub (Aug 13, 2025):

@adamdotdevin @thdxr is this something you'd be interesting in implementing (even as a configurable setting)? If so I'm more than happy to polish up my POC and send it over.

@AYM1607 commented on GitHub (Aug 13, 2025): @adamdotdevin @thdxr is this something you'd be interesting in implementing (even as a configurable setting)? If so I'm more than happy to polish up my POC and send it over.
Author
Owner

@adamdotdevin commented on GitHub (Aug 13, 2025):

yeah, this is a good change, doesn't need to be configurable, should just be how it works

@adamdotdevin commented on GitHub (Aug 13, 2025): yeah, this is a good change, doesn't need to be configurable, should just be how it works
Author
Owner

@AYM1607 commented on GitHub (Aug 13, 2025):

Perfect, I'll send a PR over later today

@AYM1607 commented on GitHub (Aug 13, 2025): Perfect, I'll send a PR over later today
Author
Owner

@AYM1607 commented on GitHub (Aug 14, 2025):

Opened :)

@AYM1607 commented on GitHub (Aug 14, 2025): Opened :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1241