You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 26, 2026. It is now read-only.
Proposal for a tiered tool approval system with channel-based routing, configurable timeouts, and async queuing. Addresses the current binary permission model (everything auto-approved OR everything blocks) which is insufficient for multi-user, multi-timezone deployments.
NOTE: This is an initial design sketch, not a production-ready spec. The security model described here needs review by someone with deeper expertise in agent safety and access control. Community input welcome.
Problem
bypassPermissions gives every tool unrestricted access -- unsafe for shared environments
Any tool on an explicit autoApproveTools list in config
Tier 2 -- Team-approve (any admin)
Tools on a teamApproveTools list
Approval request sent to configured admin channel(s) with inline buttons (Telegram InlineKeyboardMarkup, Discord buttons, etc.)
Any user in the admin channel's allowlist can approve/deny
Configurable timeout (default 30-60s): on timeout, agent receives approval_timeout response and continues its turn gracefully -- tells the user "I can't run that tool right now" instead of deadlocking
Failed approval does NOT poison subsequent messages
Tier 3 -- Owner-only (async queue)
Sensitive tools: Bash, Write, Edit, or any tool on an ownerOnlyTools list
Only the designated owner can approve
If owner is offline: request is queued, not failed. Agent acknowledges "waiting for owner approval" and continues handling other work
Owner sees backlog on return: each queued item shows full tool name, arguments, agent reasoning, and timestamp
Stale approvals auto-expire after configurable window (e.g. 4 hours) with status visible to agent
No blind "approve all": each queued approval requires individual review with full context
Bash is inherently Tier 3. There is no reliable way to classify individual Bash commands as "destructive" vs "safe" at the tool level. rm is obvious, but curl can exfiltrate data, mv can break systems, echo > can overwrite files. The model's judgment about what constitutes a destructive command is NOT a security boundary. If you need safe read-only shell access, use Read/Glob/Grep -- they exist as separate tools for this reason.
This design needs expert review. The tiered model is a starting point, not a hardened security spec. Specific areas needing deeper analysis:
Can a prompt-injected agent circumvent tier restrictions by using tool A to invoke tool B?
How do tool chains work? (Agent calls Tier 1 tool that triggers Tier 3 side effect)
Rate limiting on approval requests to prevent spam
Summary
Proposal for a tiered tool approval system with channel-based routing, configurable timeouts, and async queuing. Addresses the current binary permission model (everything auto-approved OR everything blocks) which is insufficient for multi-user, multi-timezone deployments.
Problem
bypassPermissionsgives every tool unrestricted access -- unsafe for shared environmentsProposed Design: Three-Tier Approval
Tier 1 -- Auto-approve (no delay)
autoApproveToolslist in configTier 2 -- Team-approve (any admin)
teamApproveToolslistapproval_timeoutresponse and continues its turn gracefully -- tells the user "I can't run that tool right now" instead of deadlockingTier 3 -- Owner-only (async queue)
ownerOnlyToolslistExample config
Important Caveats
Bash is inherently Tier 3. There is no reliable way to classify individual Bash commands as "destructive" vs "safe" at the tool level.
rmis obvious, butcurlcan exfiltrate data,mvcan break systems,echo >can overwrite files. The model's judgment about what constitutes a destructive command is NOT a security boundary. If you need safe read-only shell access, use Read/Glob/Grep -- they exist as separate tools for this reason.This design needs expert review. The tiered model is a starting point, not a hardened security spec. Specific areas needing deeper analysis:
Related
This feature request was collaboratively developed by two humans and two agents during a penetration testing session.