fix(deepagents): propagate subagent lc_agent_name for delegated tasks (#566)
## Summary Fixes #206. This updates deepagents subagent delegation so tool executions can reliably identify the active subagent via `config.metadata.lc_agent_name` instead of inheriting the parent agent name. It also adds focused regression tests that validate both compiled subagents and standard subagent specs follow the same metadata behavior. ## Changes ### `libs/deepagents` subagent metadata propagation - Updated `createTaskTool` subagent invocation config to explicitly set: - `metadata.lc_agent_name = subagent_type` - existing `configurable.ls_agent_type = "subagent"` behavior remains unchanged - Added new regression coverage in `subagent.test.ts`: - compiled subagent (`runnable`) path - standard subagent spec (`systemPrompt/tools/model`) path - Tests assert tool-time metadata receives the delegated subagent name (`worker`), preventing parent-name leakage. ### `libs/deepagents` dependency range update - Bumped `langsmith` peer dependency range in `libs/deepagents/package.json` from `>=0.6.0 <1.0.0` to `^0.7.1`. - Updated `pnpm-lock.yaml` accordingly.
H
Hunter Lovell committed
04cc3fc26001ee566ed94de44c2dda2cf6adecc4
Parent: 70521d2
Committed by GitHub <noreply@github.com>
on 6/1/2026, 7:54:59 PM