Directory / Claude Agent SDK
Claude Agent SDK
Shares Claude Code's permission system. canUseTool handles approvals for calls not already allowed, and PreToolUse hooks run on every call.
Lock this down first
Put must-hold checks in a PreToolUse hook, not in canUseTool, which skips pre-approved calls.
Scorecard
| Criterion | Rating | Notes |
|---|---|---|
| Permission granularity | 2/3 | Allow, deny and ask rules plus canUseTool. We found no SDK doc proving admins can lock them, so 2. |
| Human approval gates | 3/3 | canUseTool callback asks your code to approve calls that aren't pre-approved. |
| Sandboxing | 2/3 | Same Bash sandbox as Claude Code, set programmatically. |
| Secrets handling | Unverified | Not confirmed in the docs we checked. |
| Audit logs | 2/3 | OpenTelemetry metrics and events, opt-in. |
| Kill switch / interrupt | 3/3 | AbortController cancels a query; interrupt() in streaming mode. |
| Network egress control | 2/3 | Sandbox network allowlist, including strict mode. |
Sources
Vendor? Request a correction. We review corrections within 7 days.
