[FEATURE]: Whitelist/blacklist available commands that agent can execute #3379

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

Originally created by @klonuo on GitHub (Dec 7, 2025).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I've set in my agents.md instruction explicitly not to run python and ask me to do the tests, however agent does not respect that even after reminding it several times.

I don't want to disable shell commands by disabling bash tool, but to suggest whitelist/blacklist commands

Originally created by @klonuo on GitHub (Dec 7, 2025). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I've set in my agents.md instruction explicitly not to run python and ask me to do the tests, however agent does not respect that even after reminding it several times. I don't want to disable shell commands by disabling bash tool, but to suggest whitelist/blacklist commands
yindo added the discussion label 2026-02-16 17:39:50 -05:00
yindo closed this issue 2026-02-16 17:39:50 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 7, 2025):

This issue is related to #5186, which also discusses agent behavior and instruction compliance. That issue focuses on agents not respecting instructions in agents.md, while this one focuses on adding command whitelist/blacklist controls. You may want to cross-reference them for context on agent instruction compliance.

@github-actions[bot] commented on GitHub (Dec 7, 2025): This issue is related to #5186, which also discusses agent behavior and instruction compliance. That issue focuses on agents not respecting instructions in agents.md, while this one focuses on adding command whitelist/blacklist controls. You may want to cross-reference them for context on agent instruction compliance.
Author
Owner

@rekram1-node commented on GitHub (Dec 7, 2025):

https://opencode.ai/docs/permissions/#bash

This should already be possible, have u tried permissions?

@rekram1-node commented on GitHub (Dec 7, 2025): https://opencode.ai/docs/permissions/#bash This should already be possible, have u tried permissions?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3379