Repository navigation
plugin: don't read a dict tool response with no output key as output - #155
Closed
Shabnam (nazarli-shabnam) wants to merge 1 commit into
Closed
Shabnam (nazarli-shabnam) wants to merge 1 commit into
Shabnam (nazarli-shabnam) wants to merge 1 commit into
Conversation
response_text serialized such a dict to JSON. Claude Code's Edit result is one: it carries the edited file and both strings, so a successful Edit of a document containing words like 'assert' or 'failed' counted as an error output in the loop guard. A real failure still arrives through PostToolUseFailure. Fixes microsoft#151
Author
|
@microsoft-github-policy-service agree |
Collaborator
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.
Fixes #151
response_textserialized a dicttool_responsewith none of the known output keys to JSON. Claude Code's Edit result is such a dict (it carriesoriginalFile,oldString,newString, ...), so a successful Edit of a document containing words likeassertorfailedmatchedERR_REand was counted as an error output by the loop guard.It now returns an empty string for that case, as suggested in the issue. A real Edit failure still reaches the guard through
PostToolUseFailure.Added
tests/test_response_text.py(fails before the change, passes after).python -m pytest testspasses. Four tests underexperiments/testsfail on Windows both with and without this change.