Run Claude Tool Calls in Parallel (TypeScript, 2026)
Speed up your Claude agent loop by running independent tool calls concurrently in TypeScript. Copy-paste code for parallel tool_use, is_error handling, and disable_parallel_tool_use.
Category
3 posts in this category.
Speed up your Claude agent loop by running independent tool calls concurrently in TypeScript. Copy-paste code for parallel tool_use, is_error handling, and disable_parallel_tool_use.
A complete TypeScript tutorial for the streaming agent loop on Claude: input_json_delta accumulation, multi-turn dispatch, AbortController cancellation, and the eager_input_streaming workaround for the verified 5 second first-content delay on tool use. About $0.03 per call with claude-sonnet-4-6 at June 2026 pricing.
An AI agent is just a loop: you call a model, the model asks to run a tool, you run it, you feed the result back, and you repeat until the model is done. In this tutorial you build that loop yourself in plain TypeScript against the Anthropic Messages API, no framework. You will wire up two tools (read a file, run a calculation), let the model orchestrate them, add a turn cap and basic guardrails, then verify the whole thing end to end. The result is a small research agent you fully understand and can extend with your own tools.