fix(cli): fold away serialized structuredContent of any JSON type - #405
Merged
Merged
Conversation
The duplicate-text filter only ran when structuredContent was a plain object, so a server returning an array or a primitive alongside its own serialization had the data printed once as text and then advertised again by the --json hint added in #386. Compare the canonical JSON instead, whatever the type. Also shortens the hint to the house one-sentence form. Refs #346, #386 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B7XSZpKcSsCGm6whjo552e
jancurn
commented
Sep 16, 2026
Review feedback on #405. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B7XSZpKcSsCGm6whjo552e
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.
Follow-up nits on the
--jsonhint from #386. The duplicate-text filter only ran whenstructuredContentwas a plain object, so a server returning an array or a primitive next to its own serialization had the data printed once as text and then advertised again by the new hint — pointing at--jsonfor something already on screen.To see the `structuredContent` field, re-run with --jsonValidated on this branch:
pnpm run lint(0 errors),build,test:unit(1174 passed),check:reference, and e2ebasic/human-output,output-invariants,help,max-charsgreen on both the legacy and modern protocol servers.Refs #346, #386
🤖 Generated with Claude Code
https://claude.ai/code/session_01B7XSZpKcSsCGm6whjo552e