Skip to content

Help me deny git add -A always and forever (support global hooks, or enhance --deny-tool) #1056

@philsphicas

Description

@philsphicas

Describe the feature or problem you'd like to solve

Block specific commands universally, more granularly than --deny-tool supports.

Proposed solution

Agents love to run git add -A, and it is almost always the wrong thing to do. I want to block this universally. Presumably there are other commands that people want to block. (Instructions files are insufficient, they can be forgotten too easily.)

Ideas:

  • Support something like --deny-tool 'shell(git add -A)'
  • Support hooks in ~/.copilot/hooks

Example prompts or workflows

copilot -p 'commit the changes'
copilot -p 'commit and push the changes'

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions