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 | 3/3 | |
| Human approval gates | 3/3 | |
| 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. |
