smithery/tankygranny05

fine-grained-tool-streaming

Patch Claude Code cli.js to enable fine-grained tool streaming (input_json_delta).

Installation

$ npx skills add smithery/tankygranny05 --skill fine-grained-tool-streaming

Summary

  • Patch Claude Code cli.js to enable fine-grained tool streaming (input_json_delta).
  • Use when tool call arguments arrive as a single burst at the end instead of streaming incrementally, when sse_lines.jsonl shows few/no input_json_delta events, or when asked to "enable tool streaming", "fix partial json", or "patch fine-grained streaming".

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/tankygranny05 · top by installs.

npx skills add smithery/tankygranny05

Browse all from smithery/tankygranny05

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,272 B
  • docs SUMMARY.md 374 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Fine-Grained Tool Streaming Patch

Enables incremental streaming of tool call arguments (inputjsondelta) in Claude Code cli.js.

Problem

Pristine Claude Code cli.js does NOT enable the fine-grained-tool-streaming-2025-05-14 beta by default. Tool arguments arrive as a single burst at the end instead of streaming character-by-character.

Solution

Add Q.push("fine-grained-tool-streaming-2025-05-14") to the betas builder function.

Patch Procedure

1. Find the patch point

grep -n "process.env.ANTHROPIC_BETAS" cli.js

Look for the betas builder function (typically in module RR, function pp1).

2. Identify the insertion point

Find these consecutive lines:

if (G === "vertex" && ...) Q.push(...);
if (G === "foundry") Q.push(...);
if (process.env.ANTHROPIC_BETAS && !B)

3. Insert the patch

Add these 2 lines BEFORE if (process.env.ANTHROPIC_BETAS:

if (G === "firstParty" && !a1(process.env.CLAUDE_CODE_DISABLE_FINE_GRAINED_TOOL_STREAMING))
  Q.push("fine-grained-tool-streaming-2025-05-14");

Note: a1 is the env-var truthy checker (varies by version: a1, B0, etc.). Find it by searching !a1(process.env.DISABLE_ nearby.

4. Run the patch script

python scripts/patch_fine_grained_streaming.py <path-to-cli.js>

Verification

node cli.js --dangerously-skip-permissions --log-dir /tmp/test-fgts \
  -p "Write a 50 word story. Save to /tmp/test-fgts/story.txt"

# Check for multiple input_json_delta events
grep -c "input_json_delta" /tmp/test-fgts/sse_lines.jsonl
# Should be >10 (not 0-2)

# Check timestamps are spread out (not burst)
grep "input_json_delta" /tmp/test-fgts/sse_lines.jsonl | head -5 | jq -r '.t'

Disable (if needed)

Set env var to disable:

CLAUDE_CODE_DISABLE_FINE_GRAINED_TOOL_STREAMING=1 node cli.js ...