Skip to content

test(sdk): added a failing test for callback propagation to subagent …#2361

Open
Kavish Kartha (kavishkartha05) wants to merge 5 commits intolangchain-ai:mainfrom
kavishkartha05:test/subagent-callback-propagation
Open

test(sdk): added a failing test for callback propagation to subagent …#2361
Kavish Kartha (kavishkartha05) wants to merge 5 commits intolangchain-ai:mainfrom
kavishkartha05:test/subagent-callback-propagation

Conversation

@kavishkartha05
Copy link
Copy Markdown

Adds a failing regression test for #2315.

Per Eugene Yurtsev (@eyurtsev)'s instruction, this PR contains only the failing test; no fix yet.

The test confirms that callbacks passed in the parent config are not forwarded to subagent model calls. All LLM invocations in the subagent show name=None instead of the expected agent name callback-check-subagent.

Fixes #2315

@github-actions github-actions bot added deepagents Related to the `deepagents` SDK / agent harness size: S 50-199 LOC tests Adding tests or correcting existing labels Mar 31, 2026
@org-membership-reviewer org-membership-reviewer bot added new-contributor external User is not a member of the `langchain-ai` GitHub organization labels Mar 31, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 31, 2026

Merging this PR will not alter performance

✅ 32 untouched benchmarks
⏩ 15 skipped benchmarks1


Comparing kavishkartha05:test/subagent-callback-propagation (b4568dd) with main (06881cc)

Open in CodSpeed

Footnotes

  1. 15 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@kavishkartha05
Copy link
Copy Markdown
Author

Eugene Yurtsev (@eyurtsev) would greatly appreciate if you could please review the PR. As instructed, I added the failing test for callback propagation to subagent invocations.

)

# All three LLM calls (2 parent + 1 subagent) should trigger the callback
assert len(llm_start_agent_names) >= 2, (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make assertion more precise? i.e., instead >=2 make it == to expected result

Otherwise this looks good, and you can add an xfail / skip marker, we can merge and figure out how to fix the issue

…invocations

 Regression test for langchain-ai#2315

The task tool invokes subagents without forwarding config, causing callbacks passed in the parent config to not propagate to subagent model calls. The subagent LLM calls appear with name=None instead of the expected agent name, confirming config is not forward
@kavishkartha05 Kavish Kartha (kavishkartha05) force-pushed the test/subagent-callback-propagation branch from 8f786e3 to 963b8b5 Compare April 1, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deepagents Related to the `deepagents` SDK / agent harness external User is not a member of the `langchain-ai` GitHub organization new-contributor size: S 50-199 LOC tests Adding tests or correcting existing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task tool does not forward config to subagent invocations

2 participants