Register and share your invite link to earn from video plays and referrals.

cv usk
@cv_usk
AI / Software Research Notes AI Agent, LLMOps, MLOps, Software Architecture ๆŠ•็จฟใฏๅ€‹ไบบใฎๆ„่ฆ‹ใงใ™ใ€‚
Joined May 2026
258 Following    224 Followers
# Practical ways to use the Claude Agent SDK ๐Ÿ” Control tool access with graduated permissions to balance safety and productivity. Permission Settings uses `allowed_tools` / `disallowed_tools` / `permission_mode` to control agent tool usage at multiple levels for safe operation. ๐Ÿ“Œ Title: Setting Permissions ๐Ÿ”— URL: ๐Ÿงฉ Overview Evaluation order: hooks โ†’ deny rules โ†’ permission mode โ†’ allow rules โ†’ canUseTool. `disallowed_tools` supports scoped denials (e.g., `Bash(rm *)`) that block even `bypassPermissions`, serving as the last line of defense. ๐Ÿ›  How to use it Set `allowed_tools` for auto-approved tools, `disallowed_tools` for blocked tools (supports scoped denials like `"Bash(rm *)"`), and `permission_mode` for the overall mode (`default` / `acceptEdits` / `dontAsk` / `plan` / `bypassPermissions`). ๐Ÿ— Practical usage - Build a read-only lockdown with `allowedTools: ["Read","Glob","Grep"]` + `permissionMode: "dontAsk"` that instantly rejects anything else. - Start with `default`, review initial approach, then dynamically switch to `acceptEdits` to speed up prototyping iteration. - Use `plan` mode to have Claude execute only read-only tools and produce a plan without modifying source. Perfect for code review or pre-change approval flows. - In CI/isolated environments, use `bypassPermissions` with `disallowed_tools=["Bash(rm -rf /)"]` as a safety net. ๐Ÿ’ก Use cases ๐Ÿ”’ Read-only code analysis agents ๐Ÿ“‹ Pre-change approval flows with plan mode ๐Ÿš€ Dynamic trust level escalation โš ๏ธ Watch out `allowed_tools` does NOT restrict `bypassPermissions`. Always use `disallowed_tools` to block dangerous operations. Sub-agents inherit parent permission modes and cannot override them. #ClaudeAgentSDK# #AI#
Show more