Skip to content

docs_agent exposes builtin filesystem/planning tools and returns fake "Updated file" successes - #678

Draft
langsmith-engine[bot] wants to merge 1 commit into
masterfrom
issues-agent/c9006952-af8b-4ee4-b9f4-12ab5d602072
Draft

docs_agent exposes builtin filesystem/planning tools and returns fake "Updated file" successes#678
langsmith-engine[bot] wants to merge 1 commit into
masterfrom
issues-agent/c9006952-af8b-4ee4-b9f4-12ab5d602072

Conversation

@langsmith-engine

Copy link
Copy Markdown

The docs_agent documentation assistant is registered with only four docs tools, but the define_deep_agent managed harness auto-injects builtin Deep Agents scaffolding tools (write_todos, write_file, edit_file, read_file, ls, glob, grep, task) that were never opted out, and the MCP connector in connectors/mcp.py exports its tools unfiltered. As a result the agent calls write_file and returns fabricated success strings like "Updated file /home/user/..." - falsely telling users it created or edited files on their local machine, which it has no access to - and calls write_todos on plain docs questions, persisting a todo list a stateless docs assistant cannot honor. A further observed surface: the agent aims read_file, glob, ls and edit_file at the user's own absolute repo path (e.g. a Windows D:/... path), every call fails ('File not found', empty glob, 'Windows absolute paths are not supported'), and the agent then writes write_todos entries with status completed for the edit that never happened before delivering the fix as prose. NEW SYMPTOM: write_todos is now also the source of every raised tool exception in the project - the model passes a plain list of strings (or an invalid status enum value) where the builtin's WriteTodosInput schema requires a list of dicts, producing Pydantic 'validation error' spans on ordinary docs questions, because the injected builtin's schema is never surfaced in the docs-agent prompt. This is a correctness and trust harm that occurs on any request the model interprets as a build/analyze-my-project task, and also a scope/safety gap since these tools should not exist for a docs Q&A agent.

…cs tools so it can't fake filesystem writes

The deepagents harness auto-injects builtin filesystem/planning tools
(write_file, write_todos, ls, read_file, edit_file, glob, grep, execute,
task) with no author opt-out flag, so the stateless docs agent could call
write_file and return fabricated 'Updated file ...' successes. Strip those
tools before the model sees them, restrict the MCP export to docs-search
tools, and instruct the agent to decline local-project work.
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-langchain Ready Ready Preview Aug 19, 2026 1:52pm
chat-langchain-on-mda Ready Ready Preview Aug 19, 2026 1:52pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants