Tools and permissions in an agent harness for security work

A harness decides which tool calls run. In the Claude Agent SDK, deny rules apply even in bypassPermissions mode; in Deep Agents, a call matching no rule is allowed, and rules cover only 7 filesystem tools. Docs for six harnesses read 19 Nov 2026. A filled register for four security tools follows.

Start from the tool list, not the prompt

A general tool is flexible and hard to review. LangChain notes that a bash tool lets the model "design its own tools on the fly via code" (The Anatomy of an Agent Harness). OWASP's guidance on excessive agency says to "avoid the use of open-ended extensions where possible (e.g., run a shell command, fetch a URL, etc.)" and to use "extensions with more granular functionality", and to "implement authorization in downstream systems rather than relying on an LLM to decide" (LLM06:2025).

Credentials need the same care. Anthropic's Managed Agents post describes a first design in which untrusted code ran in the same container as credentials, so "a prompt injection only had to convince Claude to read its own environment". The fix kept tokens out of the sandbox: Git credentials wired into the remote, and OAuth tokens held in a vault behind a proxy (source). This page covers how harnesses enforce the answer.

How six harnesses decide whether a call runs

Release numbers are the latest on PyPI on 19 Nov 2026; documentation changes often, so check the version you run. Harnesses are listed alphabetically.

Sources: Claude Agent SDK Configure permissions; LangChain Deep Agents Permissions and LangGraph Interrupts; Google ADK safety, callbacks and confirmation pages; Microsoft Learn tool approval and shell tools pages; OpenAI Agents SDK Human-in-the-loop; PyPI release pages. Read 19 Nov 2026.
HarnessHow a call is decidedWhen no rule matchesLimit stated in the docs
Claude Agent SDK (claude-agent-sdk 0.2.185)In order: hooks, deny rules, ask rules, permission mode (default, dontAsk, acceptEdits, bypassPermissions, plan, auto), allow rules, then the canUseTool callbackThe SDK starts in default mode unless told otherwise (Claude Code v2.1.302 or later); there a call that needs approval is denied unless an allow rule, hook, callback or permission prompt tool approves itDeny rules apply "even in bypassPermissions mode"; an allow rule or acceptEdits skips canUseTool, so checks placed there are "silently bypassed" for that tool
Deep Agents, LangChain (deepagents 0.7.40; permissions need 0.5.2 or later)FilesystemPermission rules passed as permissions=, each with operations, paths and a mode of allow, deny or interrupt; first matching rule decidesThe call is allowedCovers only ls, read_file, glob, grep, write_file, edit_file and delete; custom tools, MCP tools and sandbox execute are outside the rules. "interrupt" needs 0.6.8 or later
Google ADK (google-adk 2.14.1)Per tool: FunctionTool with require_confirmation (Python v1.14.0 or later). Per agent: a before_tool_callback(tool, args, tool_context) on LlmAgent, where a returned value skips the tool; plugins hold policies shared across agentsThe tool runs unless it sets require_confirmation or a callback returns a resultThe callback approach "might not be applicable for all tools if the information to enforce the guardrails isn't directly visible in the parameters"; confirmation is unsupported with DatabaseSessionService and VertexAiSessionService
LangGraph (langgraph 1.2.23)No permission rules. A node or tool calls interrupt(value) to pause and is resumed with Command(resume=value) on the same thread_id; which tools exist is decided by the graph you buildCode with no interrupt() call runsA paused graph needs a checkpointer; on resume the node restarts from its beginning, so code before interrupt() runs again
Microsoft Agent Framework (agent-framework 1.26.0)Per tool: approval_mode="always_require" in Python, ApprovalRequiredAIFunction in .NET; the run returns approval requests and the caller answers. Shell tools (beta package) add ShellPolicy, an allow-list or deny-list pre-filter before approval.NET harness: no auto-approval rules are configured by default and unmatched requests return to the caller. Python: approval is set per tool with approval_modeStanding approvals persist in the AgentSession and "aren't bound to the agent or tool instance that created them", so a replacement tool with the same name can match a saved rule
OpenAI Agents SDK (openai-agents 0.25.0)needs_approval on a function tool, Agent.as_tool or local shell and file-edit tools, as True or an async function of the run context and parsed arguments; require_approval on MCP serversApproval applies only where a tool sets a rule; local ShellTool and ApplyPatchTool default to needs_approval=FalseA nested agent's approval "surfaces on the outer run"; "SDK approval does not provide a sandbox", so a shell or file-edit executor must enforce its own resource permissions

Five documented gaps, each a test to run

  1. Allow rules skip your callback. In the Claude Agent SDK, "auto-approved tools never reach canUseTool". To check calls an allow rule approves, "use a PreToolUse hook, which runs for those calls too".
  2. allowed_tools is not a ceiling. With allowed_tools=["Read"] and permission_mode="bypassPermissions", Claude Code still approves Bash, Write and Edit. To block a tool in that mode, use a deny rule. For a locked-down agent the docs pair allowedTools with permissionMode "dontAsk", which denies everything not pre-approved.
  3. A missing Deep Agents rule means allow. The docs put "more specific rules before broader ones"; a deny-by-default posture therefore needs a broad deny rule placed last.
  4. A Deep Agents sandbox runs shell. Permissions "do not apply to sandbox backends, which support arbitrary command execution via the execute tool", so a path rule cannot stop a write made through a command.
  5. A subagent's rules replace or inherit, depending on the harness. Deep Agents subagents "inherit the parent agent's permissions by default", and a permissions field in the subagent spec "replaces the parent's rules entirely". In the Claude Agent SDK a tool left out of a subagent's tools list is absent from its session.

How to test an agent harness turns the documented gaps into test cases. The OpenAI local shell and file-edit approval default is in the table above and on approvals and checkpoints, which compares the pause mechanisms of all six harnesses; orchestration and subagents covers how many agents share these rules.

A filled tool register for four security tools

The OWASP principle behind the register is that extensions are granted "the minimum necessary" permissions on other systems. The tools, systems and dates below are examples written for this page. Credentials issued on 19 Nov 2026 with a 90-day life expire on 17 Feb 2027, which is also each row's review date.

Example register, 19 Nov 2026. Approval wording follows the pattern in the OpenAI Agents SDK, where needs_approval can be a function of the parsed arguments.
ToolOperations and identityCredentialReversibleApproval ruleWhere it is enforced
siem_searchRead only. Service account svc-triage-ro with search on three indexes: auth, edr, cloud_auditIssued from the vault, expires 17 Feb 2027, never in the sandboxNot applicable, read onlyNoneThe SIEM role definition; harness allow rule limited to this tool
ticket_comment_createCreate tickets and comments in one queue (SEC-TRIAGE). No close, edit or delete tool is offeredProject role "triage bot", expires 17 Feb 2027Yes: comments can be deleted by an admin, tickets reopenedNoneThe ticketing project permission
firewall_block_ipAdd one address to the group agent-temp-block, entries expire after 24 hours. No rule editsRole scoped to that group, expires 17 Feb 2027Yes: remove the entry; it also lapses at 24 hoursAlways, for the first 30 days (to 19 Dec 2026). After that by argument: one /32 outside protected ranges runs; anything else asksFirewall role, plus a harness approval rule that reads the argument
repo_push_branchPush to branches prefixed agent/. No merge, no force-pushRepository app identity, expires 17 Feb 2027Yes: delete the branchMerge is a human review in the repository, not a toolBranch protection rules in the repository

How a row maps to each harness. In the Claude Agent SDK, a bare allow entry such as mcp__siem__search approves every call to that one tool, and it also skips canUseTool, so the argument check on the firewall tool belongs in a PreToolUse hook or an ask rule, not in the callback. In Deep Agents, none of the four tools is covered by filesystem permissions because they are custom tools; the docs direct custom-tool control to backend policy hooks. In the OpenAI Agents SDK, the firewall rule is a needs_approval function that returns True unless the address is a single /32 outside the protected list. In Google ADK, the same argument test fits a before_tool_callback on the agent, which sees the tool name and its arguments. In LangGraph, the firewall tool calls interrupt() only when the address is not a single /32 outside the protected list. In Microsoft Agent Framework, approval_mode="always_require" asks on every call, and the docs describe tool-wide and argument-specific standing approvals saved in the session for repeats.

Tool register row (copy one per tool)

Tool name: System it touches: Operations (read / comment / ticket / configure / block / delete): Identity used and its permission on that system: Issued by, issued on, expires on: Where the credential lives (never in the sandbox): Reversible? (yes / no / how): Approval rule (none / always / by argument, with the argument test written out): Where the limit is enforced (downstream system, harness rule or hook): Owner, and next review date:

Download the template: .docx PDF CC BY 4.0

Sources

  1. LangChain, The Anatomy of an Agent Harness, read 19 Nov 2026
  2. Anthropic, Scaling Managed Agents, read 19 Nov 2026
  3. Anthropic, Claude Agent SDK, Configure permissions, read 19 Nov 2026
  4. Anthropic, Claude Agent SDK, Subagents in the SDK, read 19 Nov 2026
  5. LangChain, Deep Agents, Permissions, read 19 Nov 2026
  6. OpenAI Agents SDK, Human-in-the-loop, read 19 Nov 2026
  7. OWASP, LLM06:2025 Excessive Agency, read 19 Nov 2026
  8. PyPI, deepagents release history, read 19 Nov 2026
  9. PyPI, openai-agents release history, read 19 Nov 2026
  10. PyPI, claude-agent-sdk release history, read 19 Nov 2026
  11. OpenAI Agents SDK, Tools, Approval for local shell and file edits, read 19 Nov 2026
  12. Google ADK, Safety and Security for AI Agents, read 19 Nov 2026
  13. Google ADK, Types of callbacks, read 19 Nov 2026
  14. Google ADK, Get action confirmation for ADK Tools, read 19 Nov 2026
  15. LangChain, LangGraph, Interrupts, read 19 Nov 2026
  16. Microsoft Learn, Agent Framework, function tools with human in the loop approvals, read 19 Nov 2026
  17. Microsoft Learn, Agent Framework, Shell tools, read 19 Nov 2026
  18. PyPI, google-adk release history, read 19 Nov 2026
  19. PyPI, langgraph release history, read 19 Nov 2026
  20. PyPI, agent-framework release history, read 19 Nov 2026

Last reviewed 19 Nov 2026