Improve telemetry output for silent tool calls #363
Merged
jdchawla29 merged 1 commit intoMar 8, 2026
Merged
Conversation
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.
silent successful tool calls were showing up as
(No content)in the UI, from commands that succeed but don't produce any stdout (such asecho "..." > readme-copy.txtthat writes to a file and doesn't print anything), adding that when a tool result is successful but empty, output "Tool executed successfully" in the output so it's clear what is happeningthis also follows the existing behavior in the openai chat formatting that has the same success fallback for empty tool results, but this adds it to only to the hud UI telemetry trace tracking so it's clear what is happening (seems to be separate from the model facing openai.py whereas this is exposed to us as the user reading the traces being presnted only)
Note
Low Risk
Low risk: change is limited to telemetry serialization of
MCPToolResultto improve trace readability, with added unit coverage. Potential impact is only on how tool results are represented in spans/UI, not on tool execution.Overview
Telemetry serialization now special-cases
MCPToolResultso successful but empty tool results no longer appear as(No content); instead they get a default"Tool executed successfully"text block unless realcontentorstructuredContentis present.Adds focused tests to ensure the fallback is applied only for silent successes and that existing tool output is preserved.
Written by Cursor Bugbot for commit e3f7e45. This will update automatically on new commits. Configure here.