[PR #825] [MERGED] fix(sdk): FilesystemMiddleware forward 'name' attribute in large_tool_result from the original tool msg #919

Closed
opened 2026-02-16 09:17:37 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagents/pull/825
Author: @Nilesh3105
Created: 1/17/2026
Status: Merged
Merged: 1/17/2026
Merged by: @eyurtsev

Base: masterHead: nilesh/fix-fs-toolmsg


📝 Commits (2)

  • 867e695 fix missing 'name' attribute in processed large messages
  • b37657b preserve tool name in _aprocess_large_message; added unit tests

📊 Changes

3 files changed (+19 additions, -1 deletions)

View changed files

📝 libs/deepagents/deepagents/middleware/filesystem.py (+2 -0)
📝 libs/deepagents/tests/unit_tests/backends/test_store_backend_async.py (+2 -1)
📝 libs/deepagents/tests/unit_tests/test_middleware.py (+15 -0)

📄 Description

Currently 'name' property from the original tool call is lost when _process_large_message() is called when tool_token_limit_before_evict is reached.

In our case this affects some front end libraries which want to display the name of the tool (including LangSmith Studio).

Regarding tests: I couldn't see any tests on _aintercept_large_tool_result() in test_middleware.py so added I added it to test_store_backend_async.py for now. Let me know if this needs to be changed.


🔄 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/deepagents/pull/825 **Author:** [@Nilesh3105](https://github.com/Nilesh3105) **Created:** 1/17/2026 **Status:** ✅ Merged **Merged:** 1/17/2026 **Merged by:** [@eyurtsev](https://github.com/eyurtsev) **Base:** `master` ← **Head:** `nilesh/fix-fs-toolmsg` --- ### 📝 Commits (2) - [`867e695`](https://github.com/langchain-ai/deepagents/commit/867e6955d58f9562d8e09f8e71ad0430bc1e28e8) fix missing 'name' attribute in processed large messages - [`b37657b`](https://github.com/langchain-ai/deepagents/commit/b37657b7ad6f46b205123d13bf0e7c4a341e0174) preserve tool name in _aprocess_large_message; added unit tests ### 📊 Changes **3 files changed** (+19 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `libs/deepagents/deepagents/middleware/filesystem.py` (+2 -0) 📝 `libs/deepagents/tests/unit_tests/backends/test_store_backend_async.py` (+2 -1) 📝 `libs/deepagents/tests/unit_tests/test_middleware.py` (+15 -0) </details> ### 📄 Description Currently 'name' property from the original tool call is lost when `_process_large_message()` is called when `tool_token_limit_before_evict` is reached. In our case this affects some front end libraries which want to display the name of the tool (including LangSmith Studio). Regarding tests: I couldn't see any tests on `_aintercept_large_tool_result()` in `test_middleware.py` so added I added it to `test_store_backend_async.py` for now. Let me know if this needs to be changed. --- <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-02-16 09:17:37 -05:00
yindo closed this issue 2026-02-16 09:17:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/deepagents#919