Repository navigation
Python: fix(anthropic): nest bash tool result files inside the shell tool result - #9343
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 2 commits intoOct 15, 2026
Conversation
…tool result The bash branch appended hosted output files to the message-level contents list instead of the shell result outputs, so the files leaked out as bare top-level hosted_file contents. The code interpreter twin branch already nested them correctly. Fixes microsoft#9342 Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
Manohar Paturi (ManoharPaturi)
requested review from
SergeyMenshykh,
Tao Chen (TaoChenOSU),
Eduard van Valkenburg (eavanvalkenburg),
Giles Odigwe (giles17),
Jose Alvarez (jpalvarezl),
Evan Mattson (moonbox3),
Roger Barreto (rogerbarreto),
sophia-ramsey and
westey (westey-m)
as code owners
October 13, 2026 14:37
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
October 13, 2026 14:37 — with
GitHub Actions
Inactive
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
October 13, 2026 14:41 — with
GitHub Actions
Inactive
Signed-off-by: Manohar Paturi <186662190+ManoharPaturi@users.noreply.github.com>
Manohar Paturi (ManoharPaturi)
temporarily deployed
to
github-app-auth
October 14, 2026 08:07 — with
GitHub Actions
Inactive
Contributor
Author
|
Typing check was right, the new test iterated outputs without the None guard the sibling tests use. Added the guard and pushed 4e99954. |
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Oct 15, 2026
This branch was previously deployed
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.
Motivation & Context
When the Anthropic Messages API returns a
bash_code_execution_tool_resultblock with hosted output files,_parse_contents_from_anthropicput the files on the message-level contents list instead of the shell result's outputs. The files showed up as bare top-levelhosted_filecontents next to theshell_tool_result, and anything iterating tool result outputs lost them. Issue #9342 has the repro.Description & Review Guide
shell_outputs, the same way thecode_execution_tool_resultbranch appends tocode_outputs.shell_tool_resultoutputs. No other branch changes.Related Issue
Fixes #9342
AI Assistance
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.