`claude plugin list --json` truncates stdout at 64 KB when piped and breaks VS Code plugin manager "available" list
claude plugin list --json truncates stdout at 64 KB when piped (breaks VS Code plugin manager "available" list)
Environment
- Claude Code 2.1.172 (CLI + VS Code extension
anthropic.claude-code), Linux x64
Summary
claude plugin list --json --available truncates its stdout to exactly 65536 bytes (the OS pipe buffer) when stdout is a pipe. Writing to a file produces the full, valid output. The VS Code extension captures this command's stdout via a pipe (execFile), so on any catalog larger than ~64 KB it receives truncated JSON, JSON.parse throws Unterminated string, and the plugin manager silently shows installed-only (no "available" plugins).
Minimal repro
(The catalog must exceed 64 KB — e.g. a few marketplaces registered.)
# to a FILE -> full output
claude plugin list --json --available > out.json ; wc -c < out.json # e.g. 198797
# to a PIPE -> truncated to 65536, invalid JSON
claude plugin list --json --available | wc -c # 65536
claude plugin list --json --available | python3 -c 'import json,sys;json.load(sys.stdin)'
# -> json.decoder.JSONDecodeError: Unterminated string ...
Expected
Identical, complete output regardless of whether stdout is a pipe or a file.
Actual
Piped output is truncated at the 64 KB pipe buffer, producing invalid JSON.
Likely cause
The command appears to call process.exit() before the async stdout write to the pipe drains; only what fits in the pipe buffer is delivered. (File writes are synchronous, so they complete.) Flushing stdout / awaiting drain before exit — or having the extension capture output via a temp file — would fix it.
Impact
The plugin manager "Browse" tab is unusable for any user whose combined installed + available catalog exceeds ~64 KB (i.e. multiple marketplaces registered). The failure is silent: the panel falls back to showing only installed plugins.
Workaround
A claudeCode.claudeProcessWrapper script that runs plugin subcommands with stdout redirected to a temp file, then cats the file (which respects pipe backpressure), while passing all other invocations through untouched.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗