AI agents are increasingly granted autonomous access to sensitive user data and third-party services, making effective permission management a critical security challenge. Existing permission models, however, typically rely on flat permission structures that fail to balance security with usability: fine-grained confirmation induces user fatigue, while coarse-grained or persistent approval leads to overprivileged agents. To address this tradeoff, we propose a task-centric, hierarchical permission model that treats an agent as a delegate operating within a task-specific role instead of requiring a separate permission decision for every tool call. Building on this model, we present MiniScope, an end-to-end permission system for agents that automates permission-hierarchy discovery and enforces contextual least privilege at runtime. Our evaluation shows that MiniScope reduces simulated permission confirmations by 43.4%-89.4% for cautious and typical personas relative to per-tool prompting and mitigates all privilege-escalation attacks with negligible impact on utility and runtime. Applied to real-world deployments, MiniScope further uncovers six overprivileged connector configurations in ChatGPT and Claude.
Figures & tables
Figure 1: MiniScope Architecture. Red indicates untrusted. Green indicates trusted.
Figure 3: Google Calendar’s Permission Hierarchy
Figure 4: MiniScope workflow. Numbered steps correspond to the runtime flow described in § 4.1 .
Figure 5: Example of an in-scope attack that MiniScope defends against.
Applications
# Methods
# Scopes
Tree Height
Max
Avg.
Gmail
79
10
5
2.3
Google Calendar
37
17
5
5.0
Google Drive
58
10
4
2.5
Google Storage
81
5
2
2.0
Slack
247
84
3
1.0
Table 1: Statistics for our collected applications. For each application, we report the number of collected methods and scopes, and the height of the reconstructed permission hierarchies.
Figure 6: Average infeasible and overprivileged rates for the LLM-inferred permissions relative to MiniScope.
Single-app
Single-app
Multi-app
Single-method
Multi-method
Multi-method
All
Strict
All
Strict
All
Strict
Sonnet 4.6
1.04
1.92
1.03
1.31
1.19
1.42
GPT 5.4
1.07
1.83
1.04
1.78
1.12
1.37
Gemini 3 Flash
1.03
2.34
1.05
1.78
1.09
1.21
Qwen 3.5
1.04
2.38
1.05
1.69
1.19
1.32
Table 2: Overprivilege ratio of the LLM-inferred permissions. All averages over feasible cases; Strict averages over strict overprivilege cases.
Gmail
Google Drive
Google Calendar
Persona
Per Tool
MiniScope-O
MiniScope-U
Per Tool
MiniScope-O
MiniScope-U
Per Tool
MiniScope-O
MiniScope-U
Avg.
Avg.
Diff.
Avg.
Diff.
Avg.
Avg.
Diff.
Avg.
Diff.
Avg.
Avg.
Diff.
Avg.
Diff.
Cautious
2967.8
1289.0
↓ 56.6%
1489.0
↓ 49.8%
1045.2
361.0
↓ 65.5%
381.8
↓ 63.5%
1318.8
361.5
↓ 72.6%
423.8
↓ 67.9%
Typical
1875.0
279.5
↓ 85.1%
928.2
↓ 50.5%
753.8
323.0
↓ 57.1%
281.2
↓ 62.7%
351.0
37.2
↓ 89.4%
198.8
↓ 43.4%
Permissive
91.2
7.5
↓ 91.8%
192.8
↑ 111.4%
70.8
13.5
↓ 80.9%
41.2
↓ 41.8%
35.2
7.2
↓ 79.4%
45.8
↑ 30.1%
Table 3: Average number of user confirmations over five simulated traces. MiniScope-O uses the OAuth-derived hierarchy, while MiniScope-U uses the user-trace-derived hierarchy. Diff. is computed relative to per-tool prompting; ↓ indicates fewer confirmations and ↑ indicates more confirmations than per-tool prompting.
w/o Attack - 40
w/ Attack - 28
System
Util.
Lat. (sec)
Util.
Lat. (sec)
ASR
ReAct
75%
6.5
86.8%
9.6
33.7%
Plan
77.5%
16.4
94.2%
22.7
25.8%
MiniScope
–
–
93.1%
20.19
0.8%
Table 4: End-to-end evaluation on the adapted Workspace benchmark. Utility measures benign task success rate, and ASR measures attack success rate.
ChatGPT
Claude
Requested
MiniScope
Requested
MiniScope
Gmail
50
32
32
32
Google Calendar
12
5
15
15
Google Storage
27
27
45
27
Notion
32
13
32
29
Dropbox
44
25
-
-
Table 5: Overprivilege in ChatGPT and Claude connectors. Red indicates overprivileged deployment.
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Applications
Single-method
Multi-method
# Requests
Cscope
Cmethod
# Requests
Cscope
Cmethod
Gmail
79
100%
100%
151
100%
100%
Google Calendar
37
62.5%
100%
117
68.8%
100%
Google Drive
58
100%
100%
168
100%
98.2%
Google Storage
81
100%
100%
114
100%
100%
Slack
247
100%
100%
190
100%
91.4%
Appendix
Table 6: Statistics for our synthetic dataset. For each application, we report the number of generated requests together with their coverage on scopes ( CScope ) and methods ( CMethod ) for both single-method and multi-method scenarios.
Figure 7: Percentage of permission mismatches for the LLM-based permission inference baseline relative to MiniScope. Top left: single-application, single-method. Bottom left: single-application, multi-method. Right: multi-application, multi-method. Green checkmarks indicate zero mismatches.