TanStack / TanStack/ai

@tanstack/ai-claude-code: stream tool-call arguments (forward input_json_delta → TOOL_CALL_ARGS)

Open
#901 0 comments 0 reactions 1 assignee View on GitHub

@AlemTuzlak is already working on this.

Since Sep 17, 2026.

has-pr waiting-on: maintainer
Dominant language
TypeScript
Stars
3.1k
Forks
331
Avg merge
1d 22h
Merged PRs (30d)
160

Description

Summary

@tanstack/ai-claude-code doesn't stream tool-call arguments. Its stream translator handles only text_delta and thinking_delta, so a tool call surfaces only once it's complete. This is the sole blocker for streaming structured output while using the Claude Code harness.

Request

Forward the Agent SDK's partial tool-input events as AG-UI TOOL_CALL_ARGS deltas — the same way @tanstack/ai-anthropic / @tanstack/ai-openai already stream tool args.

Details

@tanstack/ai-claude-code (0.2.0) is built on @anthropic-ai/claude-agent-sdk. With includePartialMessages: true, the SDK already emits partial tool input:

content_block_delta → delta.type: "input_json_delta"   (partial_json fragments)

But the adapter's stream/translate.js has cases only for text_delta and thinking_delta — there is no input_json_delta case, so those fragments are dropped and tool calls arrive whole. (structuredOutput() also throws "not yet supported — use a model adapter".)

Why it matters

Routing structured data through a tool call is the only streaming path on the Claude Code harness (subscription auth + native file tools). Today that metadata paints atomically at run end; forwarding input_json_delta would let it stream token-by-token. It would also be the foundation for a real supportsCombinedToolsAndSchema / structuredOutputStream on this adapter (wire outputSchema through a forced tool call and stream its args) — bringing the harness adapter to parity with the model adapters for streaming structured output.

Environment
  • @tanstack/ai-claude-code 0.2.0 (latest; only 0.1.0 / 0.2.0 published)
  • @tanstack/ai 0.39.x

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.