Open Source & Case StudiesCLAUDE AGENT SDK · MERGED OPEN SOURCE
MERGED UPSTREAM

Tool Isolation for Generation-Only Claude Agent SDK Queries

A directly merged fix in the independent ADHD project that replaced ineffective allowedTools configuration with tools: [], removed bypassPermissions, and added executable regression coverage.

Role

  • Agent SDK configuration
  • Tool isolation
  • Permission-boundary review
  • Regression engineering
  • Open-source contribution

Category

Agent Runtime Safety

Engineering discipline

MERGED UPSTREAM

Merged pull request:ADHD PR #26
Regression:No built-in tools
Validation:4 checks passed

Engineering objective

System challenge

The project described divergence requests as pure generation, yet allowedTools: [] did not remove built-in Claude Code tools; it only controlled automatic approval. Combined with bypassPermissions, the runtime configuration did not match the intended no-tools safety boundary.

Constraints

Working within real limits

  • Use the SDK’s true tool-availability control
  • Avoid bypass permission modes in generation-only sessions
  • Preserve the existing model and system-prompt behavior
  • Prove the configuration through executable regression coverage

Approach

How it was built

  1. 01

    Replaced allowedTools: [] with the Claude Agent SDK’s tools: [] availability control.

  2. 02

    Removed bypassPermissions from generation-only sessions.

  3. 03

    Extracted query-option construction into a focused testable helper.

  4. 04

    Added a regression proving that tools, allowedTools, and permissionMode cannot escape into divergence queries.

Workflow

Implementation flow

Build generation-only query options
Disable the built-in tool set
Omit permission bypass
Pass options to Claude Agent SDK
Assert configuration boundary
Validate package and production build

Technical validation

Implementation evidence

Observable engineering evidence. Discipline: MERGED UPSTREAM

Merged pull request

ADHD PR #26

Regression

No built-in tools

Validation

4 checks passed

Scope

3 focused files

Public evidence

Review the upstream contribution

Outcome

What was delivered

  • The maintainer directly merged PR #26 into the independent project’s main branch

  • Tests, type checking, the production build, and npm package dry-run all passed

  • Generation-only sessions now enforce the architecture’s intended no-tools boundary

  • The evidence clearly distinguishes this from an Anthropic repository contribution

Technologies

Stack and tools

TypeScriptClaude Agent SDKNode.jsnode:testAgent safetyTool permissionsnpm packaging

Next engineering system

ICALENDAR · MERGED OPEN SOURCE

iCalendar: Pinned CLDR Source Provenance

Have an ambitious AI system to build?

Let’s build something serious.

I work across AI architecture, product engineering, private inference, automation, SaaS infrastructure, and production hardening.