Analyzed: March 31, 2026 leak snapshot

File-oriented tool set

The core file workflow is built from these primitives:
  • FileReadTool
  • FileEditTool
  • FileWriteTool
  • NotebookEditTool
  • GlobTool
  • GrepTool
  • TodoWriteTool
src/tools.ts keeps them in the default tool set, with GlobTool and GrepTool omitted only when the build exposes embedded search tools.

Why there are multiple write tools

The source separates file mutation by intent:
  • FileEditTool: patch-style, targeted changes
  • FileWriteTool: full write or rewrite
  • NotebookEditTool: notebook-specific mutation path
That split is important for approvals and UI. The permission dialog can explain the action more precisely when the tool already encodes the editing style.

Search versus read

Claude Code does not rely on FileReadTool for discovery. The intended read path is:
  1. discover candidate files with GlobTool or GrepTool
  2. read the relevant files with FileReadTool
  3. mutate with one of the write/edit tools
This keeps context narrower than reading everything up front.

Approval profile

Tool familyTypical approval posture
Search (GlobTool, GrepTool)Usually auto-allowed
Read (FileReadTool)Usually auto-allowed inside workspace
Edit / writeFrequently approval-gated
Notebook editApproval-gated
The final decision still depends on permission mode, rules, hooks, and workspace restrictions.

Workspace and trust implications

File tools are not just path-based wrappers. They run inside a larger policy model that includes:
  • workspace validation
  • additional working directory rules
  • path safety checks
  • policy and managed settings
  • sandbox mode where relevant
The permission system therefore decides on more than path in repo.

Notebooks as a separate path

NotebookEditTool exists because notebooks need structure-aware edits rather than line-oriented patching. The public source confirms the tool is first-class, but implementation details beyond that are tool-local.

Embedded search optimization

When embedded search tools are available in the Bun binary, GlobTool and GrepTool are removed from the exposed tool list. The comment in src/tools.ts states that Claude’s shell aliases can replace those dedicated tools in that build. That means search behavior can differ between builds even when the high-level user experience looks similar.

Practical reading model

The file workflow is designed around three goals:
  • avoid loading irrelevant files into context
  • make writes explicit and auditable
  • keep search cheap compared with model context
That is a standard agentic editing design, but this codebase implements it as separate tools rather than a single overloaded filesystem API.