Skip to content

[Feature Request] Per-agent permission scoping for tool restrictions #41301

Closed as duplicate

Description

@AmitKulkarni23

Bug Description

Feature request: Per-agent permission scoping

Permission rules (permissions.deny/permissions.allow in settings.json) are project-level and apply uniformly to all agents, skills, and the user. There's no way to scope
permission rules to a specific agent.

Use case: I have multiple agents — an implementer agent that should be restricted from running destructive commands (cdk deploy, aws writes, git push), and other agents that
need those commands. Today I either deny at the project level (blocking myself and all agents) or rely on prompt-level instructions (advisory, not enforced).

Desired behavior: Something like:

{
  "permissions": {
    "deny": [
      "Agent(implementer):Bash(cdk deploy *)",
      "Agent(implementer):Bash(aws * delete*)",
      "Agent(implementer):Bash(git push *)"
    ]
  }
}

Or alternatively, an agent-level permissions block in the agent definition frontmatter:

  ---
  name: implementer
  model: sonnet
  tools: Read, Edit, Write, Bash, Grep, Glob, LSP
  permissions:
    deny:
      - "Bash(cdk deploy *)"
      - "Bash(aws * delete*)"
      - "Bash(git push *)"
  ---

Workarounds considered: PreToolUse hooks (unclear if hook receives agent identity), prompt-level rules (not enforced). Neither is satisfactory.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.87
  • Feedback ID: 855a6ce8-b9d9-4e69-9b30-8e1f37c9f69c

Activity

  1. github-actions commented on Mar 31, 2026

    @github-actions

    Found 3 possible duplicate issues:

    1. Feature Request: Domain wildcards and per-agent permission scoping #16628
    2. Allow custom agent definitions with specific tools, permissions, and system prompts for team recruitment #32357
    3. [FEATURE] Agent-Level Permission Auto-Approval #13459

    This issue will be automatically closed as a duplicate in 3 days.

    • If your issue is a duplicate, please close it and 👍 the existing issue instead
    • To prevent auto-closure, add a comment or 👎 this comment

    🤖 Generated with Claude Code

  2. github-actions commented on Apr 3, 2026

    @github-actions

    This issue has been automatically closed as a duplicate of #16628.

    If this is incorrect, please re-open this issue or create a new one.

    🤖 Generated with Claude Code

  3. github-actions commented on Apr 11, 2026

    @github-actions

    This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

  4. locked as resolved and limited conversation to collaborators on Apr 11, 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

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions