Repository navigation
fix(tools): github_list_my_repositories parsed a truncated response - #1209
Merged
Merged
Conversation
The 30,000 character output cap was applied before JSON.parse, so any page of repositories larger than that failed with a SyntaxError. The cap now applies only to what github_api returns and to error text. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
There was a problem hiding this comment.
Approving.
The PR fixes a bug where the 30,000 character output cap was applied before JSON.parse in the call function, causing github_list_my_repositories to throw a SyntaxError on pages larger than the cap (e.g., perPage: 10). The cap is now applied only via a clip function used in error messages, and call returns the full response text, so JSON.parse succeeds regardless of size. A new test confirms that responses exceeding the cap are handled correctly. The github_api tool's execute also passes through clip, preserving the original truncation behaviour.
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.
The 30,000 character output cap was applied before
JSON.parse, so listing repositories failed with a SyntaxError whenever the page was larger than the cap (seen withperPage: 10). The cap now applies only to whatgithub_apireturns and to error text.Adds a test with a response larger than the cap.
🤖 Generated with Claude Code