Feature request: Command filters for saftey #1065

Closed
opened 2026-02-16 17:29:20 -05:00 by yindo · 2 comments
Owner

Originally created by @whaaaley on GitHub (Aug 2, 2025).

I've been crafting a git agent file to create atomic commits for me automatically. It's great so far, but I do want to prevent the LLM from writing commands that could be harmful.

As a user... I'd like to filter out or block commands that match specific patterns that I specify. For example creating new branches, pushing commits, removing files, etc.

--

I know we can prompt our way to a certain level of safety, but I'd like to have some hard limits put in place on specific patterns.

Originally created by @whaaaley on GitHub (Aug 2, 2025). I've been crafting a git agent file to create atomic commits for me automatically. It's great so far, but I do want to prevent the LLM from writing commands that could be harmful. As a user... I'd like to filter out or block commands that match specific patterns that I specify. For example creating new branches, pushing commits, removing files, etc. -- I know we can prompt our way to a certain level of safety, but I'd like to have some hard limits put in place on specific patterns.
yindo closed this issue 2026-02-16 17:29:20 -05:00
Author
Owner

@yihuikhuu commented on GitHub (Aug 2, 2025):

Would the recently introduced permissions feature solve your problem?

It won't filter out those commands, but you can configure certain commands to require approval

@yihuikhuu commented on GitHub (Aug 2, 2025): Would the recently introduced [permissions](https://opencode.ai/docs/permissions/) feature solve your problem? It won't filter out those commands, but you can configure certain commands to require approval
Author
Owner

@whaaaley commented on GitHub (Aug 2, 2025):

Absolutely I totally missed that!

@whaaaley commented on GitHub (Aug 2, 2025): Absolutely I totally missed that!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1065