[PR #330] [MERGED] fix(deepagents): throw on built-in tool collision #362

Closed
opened 2026-06-05 17:22:48 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagentsjs/pull/330
Author: @maahir30
Created: 3/19/2026
Status: Merged
Merged: 3/24/2026
Merged by: @christian-bromann

Base: mainHead: file-name-collision


📝 Commits (4)

📊 Changes

7 files changed (+165 additions, -10 deletions)

View changed files

.changeset/big-horses-fail.md (+7 -0)
📝 libs/deepagents/src/agent.test.ts (+50 -0)
📝 libs/deepagents/src/agent.ts (+22 -0)
libs/deepagents/src/errors.ts (+54 -0)
📝 libs/deepagents/src/index.ts (+1 -0)
📝 libs/deepagents/src/middleware/fs.ts (+30 -10)
📝 libs/deepagents/src/middleware/index.ts (+1 -0)

📄 Description

  • createDeepAgent now throws at construction time if any user-supplied tool name collides with a built-in tool (ls, read_file, write_file, edit_file, glob, grep, execute, task, write_todos). Previously, colliding tools silently shadowed the built-in, causing cryptic schema-validation errors at runtime.
  • Adds FILESYSTEM_TOOL_NAMES constant in fs.ts as the single source of truth for filesystem middleware tool names.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/deepagentsjs/pull/330 **Author:** [@maahir30](https://github.com/maahir30) **Created:** 3/19/2026 **Status:** ✅ Merged **Merged:** 3/24/2026 **Merged by:** [@christian-bromann](https://github.com/christian-bromann) **Base:** `main` ← **Head:** `file-name-collision` --- ### 📝 Commits (4) - [`5c75cc8`](https://github.com/langchain-ai/deepagentsjs/commit/5c75cc81bb371b9d78e33e7f86532d89806b8372) add error - [`3377269`](https://github.com/langchain-ai/deepagentsjs/commit/33772696237bdab1462cb9ed1f5808527936b0ca) Create big-horses-fail.md - [`56d2a0c`](https://github.com/langchain-ai/deepagentsjs/commit/56d2a0cc96e21126470124590395ef3e844c2d09) add config error class - [`1572baa`](https://github.com/langchain-ai/deepagentsjs/commit/1572baa8b5c2122d1ba9da0971716e13c1e0c411) cr ### 📊 Changes **7 files changed** (+165 additions, -10 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/big-horses-fail.md` (+7 -0) 📝 `libs/deepagents/src/agent.test.ts` (+50 -0) 📝 `libs/deepagents/src/agent.ts` (+22 -0) ➕ `libs/deepagents/src/errors.ts` (+54 -0) 📝 `libs/deepagents/src/index.ts` (+1 -0) 📝 `libs/deepagents/src/middleware/fs.ts` (+30 -10) 📝 `libs/deepagents/src/middleware/index.ts` (+1 -0) </details> ### 📄 Description - `createDeepAgent` now throws at construction time if any user-supplied tool name collides with a built-in tool (`ls`, `read_file`, `write_file`, `edit_file`, `glob`, `grep`, `execute`, `task`, `write_todos`). Previously, colliding tools silently shadowed the built-in, causing cryptic schema-validation errors at runtime. - Adds `FILESYSTEM_TOOL_NAMES` constant in `fs.ts` as the single source of truth for filesystem middleware tool names. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 17:22:48 -04:00
yindo closed this issue 2026-06-05 17:22:49 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagentsjs#362