Skip to content

feat(tools): command-level allow/deny patterns for run_command #438

Closed

Description

@ajianaz

Problem

--allow patterns match tool names only. run_command is therefore
gated as a monolith: either the human approves every call, or --yes allows
every command. There is no way to say "read-only-ish commands are fine":

--allow 'run_command:docker ps*'
--allow 'run_command:git status*'
--deny  'run_command:rm*'          # deny wins over allow

Proposal

  • --allow 'run_command:<glob>' / --deny 'run_command:<glob>' matched
    against the command string (after shell-lexing, prefix or glob semantics)
  • --deny always wins; Destructive-classified commands stay gate-bound
  • surfaced in the approval prompt ("auto-allowed by pattern run_command:git *")

This is the delegation sweet spot for CI and headless fleet runs: specific
capabilities without handing over the shell.

Note

Prefix matching on a lexed command (not raw string) avoids the classic
echo safe; rm -rf / bypass — worth doing carefully.

Activity

  1. added
    enhancement
    tools
    on Oct 26, 2026
  2. added this to the milestone on Oct 27, 2026
  3. modified the milestones: , 0.9.0 on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtools

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions