Skip to content

fix(tools): github_list_my_repositories parsed a truncated response - #1209

Merged
LinuxDevil merged 1 commit into
mainfrom
fix/github-list-repos-truncation
Nov 19, 2026
Merged

LinuxDevil merged 1 commit into
mainfrom
fix/github-list-repos-truncation

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

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 with perPage: 10). The cap now applies only to what github_api returns and to error text.

Adds a test with a response larger than the cap.

🤖 Generated with Claude Code

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>

@lousho-ai lousho-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@LinuxDevil
LinuxDevil merged commit 71a3fab into main Nov 19, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant