[PR #933] [CLOSED] fix(sdk): prevent skills state disorder when leader and subagent both have skills #999

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

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/deepagents/pull/933
Author: @shilicqupt
Created: 1/27/2026
Status: Closed

Base: masterHead: fix/skills-state-isolation-issue-798


📝 Commits (1)

  • 67f28d1 fix: prevent skills state disorder when leader and subagent both have skills

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 libs/deepagents/deepagents/middleware/subagents.py (+3 -1)

📄 Description

… skills

When both leader and subagent have skills configured, the subagent's skills_metadata was overwriting the leader's skills context after subagent execution. This happened because skills_metadata was shared between agents and not properly isolated.

This fix adds 'skills_metadata' to _EXCLUDED_STATE_KEYS to ensure:

  • Subagents start with fresh skills state and load their own skills independently
  • Subagent skills metadata doesn't get returned to the parent
  • Leader maintains its own skills context throughout execution

Fixes #798

🤖 Generated with [Claude Code]


🔄 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/933 **Author:** [@shilicqupt](https://github.com/shilicqupt) **Created:** 1/27/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/skills-state-isolation-issue-798` --- ### 📝 Commits (1) - [`67f28d1`](https://github.com/langchain-ai/deepagents/commit/67f28d14c9b04ad35f0c605fe4edfb4407cfd3a3) fix: prevent skills state disorder when leader and subagent both have skills ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `libs/deepagents/deepagents/middleware/subagents.py` (+3 -1) </details> ### 📄 Description … skills When both leader and subagent have skills configured, the subagent's skills_metadata was overwriting the leader's skills context after subagent execution. This happened because skills_metadata was shared between agents and not properly isolated. This fix adds 'skills_metadata' to _EXCLUDED_STATE_KEYS to ensure: - Subagents start with fresh skills state and load their own skills independently - Subagent skills metadata doesn't get returned to the parent - Leader maintains its own skills context throughout execution Fixes #798 🤖 Generated with [Claude Code] --- <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:52 -05:00
yindo closed this issue 2026-02-16 09:17:52 -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#999