Repository navigation
feat(examples): map Claude Code subagent_type to gen_ai.tool.call.arguments - #289
Closed
xxJeffreyBxx wants to merge 2 commits into
Closed
xxJeffreyBxx wants to merge 2 commits into
xxJeffreyBxx wants to merge 2 commits into
Conversation
…uments With OTEL_LOG_TOOL_DETAILS=1, Claude Code puts the launched subagent on the claude_code.tool span of the Agent tool as subagent_type. The transform/claude_code recipe now copies it into gen_ai.tool.call.arguments as a map, so evaluators can check which subagent a run delegated to. Other tool arguments stay missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude_recipe_1turn_subagent is claude_native_1turn_subagent sent through
the updated transform/claude_code on Collector contrib 0.162.0. The truth
expects the Agent call with {"subagent_type":"general-purpose"} as its
arguments.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Hi all, this is my first PR to agentevals. Can a maintainer approve the CI run so the checks can run on the PR? I'll mark it ready for review after it passes. |
Member
|
Superseded by #290 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #288
It adds one statement to the
transform/claude_codeprocessor that copiessubagent_typeintogen_ai.tool.call.argumentson the Agent tool span.The value is stored as a map, so there are no escaping issues.
It needs
OTEL_LOG_TOOL_DETAILS=1set in the Claude Code session. The README has been updated to reflect these details. It adds a test fixture that shows the fix works.Testing:
uv run pytestwas run and 2134 passed with 35 skipped. Pytest picked up the new test fixture on its own.uv run ruff check --no-fix .anduv run ruff format --check .both came back clean.Notes:
subagent_typeis mapped. Claude Code also putsfull_commandandfile_pathon its spans, but I didn't include those to keep the PR focused on the subagent type. They can be added later if wanted.config-revisionwas changed from 2 to 3, the file's comment asks any contributor to do that after an edit.AI assistance was used to help generate the code change and the test fixture, but the description and understanding of the issue are my own.