Direct answer
Batch reads only when each call can run with the inputs it already has and neither call changes state the other depends on. Keep a call sequential when it consumes another call’s result, when the order affects interpretation, or when both calls modify the same state.
Official Messages API documentation says Claude may call multiple tools in one response, execution order is user-defined, and dependent calls may be skipped with an error result when a dependency fails (F064-F066). Those are API facts, not a guarantee about Claude Code scheduling. Request independent reads together, inspect the actual execution surface, and fall back to sequential work when the dependency is uncertain.
Why parallelism needs a dependency check
Two calls can look symmetrical while behaving differently. Reading a type definition and reading a known caller may be independent. Reading a file discovered by the first call is dependent. Editing two blocks in the same file may create a state conflict even when the intended changes do not overlap.
The danger is not merely speed. A dependent call can run with incomplete input. Two edits can race around the same current contents. A later call can interpret a result that was supposed to be produced by an earlier call but has not arrived.
Use two tests before batching:
- Input dependency: Does call B need a value, path, or decision produced by call A?
- State dependency: Does call A change files, records, or external state that call B reads or writes?
If either answer is yes, keep the calls ordered. If both answers are no, the calls are candidates for a parallel request. Candidate does not mean guaranteed concurrent execution.
The plan dependency guide applies the same producer-consumer thinking to a plan. The task breakdown guide helps give each step an inspectable result without creating a separate step for every tool call.
Parallelism can also complicate review. More results arrive at once, and a failure in one branch can be hidden by activity in another. The verification evidence guide supports inspecting results rather than trusting a summary of activity.
What the official evidence establishes
Official (F064). The parallel-tool documentation says Claude may call multiple tools in a single response. The statement describes the Messages API and does not guarantee Claude Code scheduling.
Official (F065). The same documentation says execution order is user-defined. The application still has to handle dependencies correctly. A response containing several calls is not permission to ignore their relationships.
Official (F066). The documentation describes returning is_error for calls skipped because a dependency failed. The convention is specific to the API, not a universal Claude Code error format.
Official (F068). For the documented parallel API flow, all tool results must be returned together in a single user message without preceding text. Apply that rule only to that API flow, not to interactive prompts.
The tool-use overview supplies the broader tool-call and tool-result loop. The handle-tool-calls page, Claude Code common workflows, and Claude Code tools reference are further reading. Detailed mechanics from canonical-link-only pages are not asserted here.
List the proposed calls
Write the calls before deciding how to group them. Include the purpose, known inputs, expected output, and whether the call changes state. A vague label such as “inspect billing” is too broad to evaluate.
A call ledger can be simple:
| Call | Purpose | Known input | Expected output | State change |
|---|---|---|---|---|
| A | Read the status type | Named type path | Allowed values | None |
| B | Read the direct caller | Known caller path | Mapping behavior | None |
| C | Read the focused contract example | Known example path | Expected case | None |
| D | Apply the mapping edit | Result of A and B | Changed block | Yes |
The paths are illustrative. The ledger makes the dependency visible: D consumes A and B, while A, B, and C can begin with known inputs.
Separate discovery from inspection. A call whose purpose is to find a path produces an input for a later read. That later read is dependent even if the eventual operation is only a read.
The file reference guide helps name stable artifacts up front. Better-known inputs reduce unnecessary discovery calls, but they do not remove the need to inspect direct dependencies.
Do not create a complex graph for a trivial task. A short ordered list is enough when one result feeds the next action. The graph becomes useful when several branches converge on a decision or edit.
Mark calls that consume another result
Trace every produced value to its consumer. Common produced values include a file path, a symbol name, a resolved identifier, a test result, a product decision, or the current contents of a file.
A path discovered by a search is an input dependency. A contract chosen after reading two consumers is a decision dependency. A diff produced by one edit is an input to a later verification read. All three relationships require order.
The tool result contract guide explains why the produced value must be visible in the result. If call A reports only “success” without the path or value, call B cannot reliably consume it.
Use explicit labels in the plan:
A produces: caller path
B consumes: caller path from A
C produces: accepted contract
D consumes: accepted contract from C
This notation is an editorial aid, not an API schema. It keeps the dependency in the task description where a reviewer can see it.
When a dependency is uncertain, choose sequential work. The cost of an extra ordered step is usually easier to reason about than a silent wrong assumption. The security harness analysis is relevant when uncertain tool calls touch external systems, but this article does not configure permissions.
Separate reads from edits
Reads are often safer parallel candidates because they do not intentionally change state. Even reads can conflict if they depend on a write or observe a moving system. Treat “read-only” as a useful category, not a proof of independence.
Edits need a stronger test. Ask whether they touch the same file, record, branch, generated artifact, or external resource. Ask whether one edit changes the text that the other edit uses as an anchor.
Two edits to different files can still conflict through a shared contract. One edit may rename an exported symbol while another updates its caller. The operations touch different files but share a semantic dependency.
The exact edit target guide helps identify the block each edit will replace. The style-preserving edit guide helps keep each change consistent with local patterns. Neither guide makes overlapping edits safe.
| Operation pair | Input dependency | State dependency | Default grouping |
|---|---|---|---|
| Read type and read known caller | No | No | Parallel candidate |
| Search for caller, then read caller | Yes | No | Sequential |
| Read file, then edit discovered block | Yes | Read observes pre-edit state | Sequential |
| Edit two blocks in one file | Maybe | Shared file contents | Sequential |
| Edit producer and consumer after contract decision | Yes | Shared interface meaning | Sequential after decision |
| Read two unrelated fixtures | No | No | Parallel candidate if both are relevant |
The refactoring scope guide is useful when several structural changes share a behavior contract. A contract decision should precede the edits, even if the individual transformations look independent.
Batch only independent work
A parallel batch should have a clear purpose. For example, gather the type, caller, and contract example before choosing an edit. Each call starts with a known input and returns evidence for the same decision.
Keep the batch small enough to review. The fact pack provides no universal call-count limit, so this article does not invent one. Use the number of genuinely independent evidence needs as the practical boundary.
Avoid batching unrelated work just because it can run at the same time. A batch should reduce a shared uncertainty, not mix diagnostics, cleanup, and implementation into one opaque group.
The context relevance guide applies here. More results do not automatically produce a better answer. Each call should be able to change the pending decision.
The tool choice investigation guide helps request evidence gathering before synthesis. Pair that prompt with a dependency ledger so the investigation does not become an unbounded simultaneous search.
When a call fails, the remaining independent calls may still provide useful evidence. Do not discard them automatically. Separate completed results from skipped or failed dependent calls so the next step can use what is actually known.
Return all required results together in API integrations
Official (F068). In the documented parallel API flow, the application returns all tool results together in a single user message without preceding text. This is a message contract for that API flow.
Do not copy the rule into interactive Claude Code instructions as if it defined the chat UI. The fact pack explicitly limits F068 to the documented API flow. Interactive users should focus on the dependency and evidence questions, not on API message formatting.
For a direct integration, preserve the relationship between each result and its call. A result without a clear call identity can leave the application unsure which dependency succeeded. The tool result contract guide covers the evidence payload in more detail.
| API requirement | Practical integration concern | Claude Code boundary |
|---|---|---|
| Multiple calls may appear in one response (F064) | Track each call and its purpose | No scheduling guarantee is established |
| Execution order is user-defined (F065) | Application handles dependencies | Prompt order alone is not a scheduler contract |
| Return all results together in the documented flow (F068) | Preserve the required message shape | Do not generalize to interactive prompts |
Skipped dependent call can use is_error (F066) |
Distinguish skipped from completed | Not a universal Claude Code error format |
The OpenAI and Anthropic API compatibility resource can help with format questions in a separate gateway integration. Compatibility of message shape does not prove identical scheduling behavior.
Handle skipped dependent calls
A dependency failure should stop the dependent action, not produce a guessed result. Official (F066). The parallel-tool documentation describes is_error for calls skipped because a dependency failed.
The word skipped matters. The call did not execute, so its result should not be interpreted as evidence about the intended operation. The application should preserve the reason and the missing upstream value.
For an interactive task, ask for a plain report of what completed, what was skipped, and why. Do not assume the API’s is_error convention appears in the Claude Code interface. The fact pack explicitly rejects that generalization.
A recovery sequence can be simple:
- Identify the failed producer.
- Preserve successful independent results.
- Resolve or replace the missing input.
- Reissue only the dependent work that is now valid.
- Inspect the new evidence before continuing.
The task checkpoint guide provides a place to record the state. The session handoff guide helps carry that state into another session without relying on a vague memory of the batch.
Do not retry a state-changing call blindly. The database migration safety guide and dependency install side-effects guide illustrate why external effects require more care than a repeated read. This article does not prescribe their commands or safeguards.
Inspect the actual execution surface
The Messages API documentation establishes an API model. It does not specify every detail of Claude Code’s internal scheduling. Before relying on concurrency, identify the client, harness, or integration that will execute the calls.
Ask:
- Does the surface document parallel execution, or only allow several calls to be requested?
- Does it preserve call identity in results?
- How are partial failures reported?
- Can a dependent call be withheld until its input exists?
- What state can each call change?
If the answers are unknown, use sequential work. The deferred tool discovery guide reinforces the same boundary for another API feature: documented API behavior should not be assumed to appear automatically in an interactive integration.
The commands reference and tools reference are further reading, but their detailed mechanics were not fully fetched for this batch. No specific interactive parallel command is asserted.
The context audit guide can help inspect which results entered the session. That is useful after a batch, but it still does not prove the calls executed concurrently.
Fall back to sequential work when uncertain
Sequential work is the correct default when a dependency is unclear, when state is shared, or when the execution surface does not document the needed behavior. It is not a failure to optimize. It is a way to preserve a reviewable causal chain.
A sequential run should still return evidence. Each step needs an exit condition: the path is known, the contract is chosen, the edit is applied, or the observation is recorded. The task breakdown guide helps define those states.
Use sequential ordering for destructive or durable operations unless the project has separately verified controls. The destructive Git command guide covers one such boundary. This article does not recommend parallel destructive actions.
A practical fallback note can say: “Call B needs the path from call A, so run A, inspect the result, then issue B with the confirmed path.” That sentence is often enough. A diagram is unnecessary for a single dependency.
Worked example: three reads, then one edit
Consider a fictional mapping change. The developer already knows the paths of a type definition, its direct caller, and a focused contract example. The edit depends on the type and caller but not on the example.
The proposed calls are:
| Call | Input dependency | State dependency | Group |
|---|---|---|---|
| A: Read type | None | None | Initial batch |
| B: Read caller | None | None | Initial batch |
| C: Read example | None | None | Initial batch |
| D: Edit mapping | Consumes A and B | Changes a file | After the batch |
Here is the derived arithmetic from these illustrative inputs: 4 proposed calls - 1 dependent edit = 3 initial independent read candidates. The formula counts candidates, not concurrent executions, tokens, or time saved.
After A, B, and C return, inspect their evidence. If A and B disagree about the accepted state, stop before D. The example may reveal a third contract, which changes the decision rather than merely adding another vote.
Suppose the caller expects paid while the type omits it. The contradiction blocks the edit. The ambiguous requirements guide helps determine whether the answer is discoverable in code or requires a product decision.
Once the contract is resolved, run D alone. Then request a focused verification read of the changed block and the direct caller. That verification read consumes the edit result, so it remains sequential.
A second edit to the same block should not be batched with D. Both operations would rely on the same current contents. The exact edit target guide explains why a unique anchor matters, but uniqueness does not remove the state conflict.
This example makes no latency claim. The benefit is a visible dependency structure and a smaller chance of issuing an edit with incomplete inputs.
Rebuild the batch after new evidence
New evidence can turn an independent call into a dependent one. A consumer discovered by the caller read now needs its own inspection. A contract contradiction can invalidate the planned edit. A file changed by an earlier operation can alter the anchor for a later operation.
When that happens, update the ledger instead of preserving the original grouping. Mark the newly produced value, identify its consumers, and move those consumers after the producer. Keep unrelated completed reads available, but do not let their success pressure the plan toward an edit that no longer has valid inputs.
A revised batch should also state what changed. For example: “Call B revealed a shared interface, so the second edit now depends on the contract decision.” The sentence gives the next reviewer a reason for the new order. The plan revision guide provides a related method for naming invalidated assumptions.
Partial results need the same treatment. Preserve evidence from completed independent calls, label failed calls, and withhold dependent work until its input exists. The task checkpoint guide can record the revised state without pretending that the original batch completed.
Do not replay state-changing calls merely to recreate the original schedule. Inspect the current state first. The database migration safety guide and dependency install side-effects guide illustrate why durable effects require separate care.
The revised plan may be entirely sequential. That is a valid result when the evidence has created a chain of dependencies. Parallelism remains a convenience for independent work, not a requirement to preserve at any cost.
Practical batching matrix
Use this matrix during planning and again when a tool result changes the assumptions.
| Situation | Batch? | Reason | Required inspection |
|---|---|---|---|
| Two known source files answer the same question | Candidate | No produced input or shared write | Check both results for conflict |
| One search finds the file for another read | No | Path dependency | Confirm the path before reading |
| Two reads observe a file during an edit | No | State dependency | Choose a stable before or after state |
| Two edits touch different blocks in one file | Default no | Shared file state | Inspect current contents and order |
| Two edits share a renamed interface | Default no | Semantic dependency | Resolve the contract first |
| Independent read fails while another succeeds | Partial | Preserve useful evidence | Mark the failed branch explicitly |
| Dependency fails in an API integration | Skip dependent call | Input is missing | Return the documented error convention where applicable |
The model choice resource for coding agents may help with capability selection. It does not determine call independence. The context glossary can clarify terms without supplying a scheduling guarantee.
The prompt caching economics guide may matter for a separate cost review. This article does not convert batching into a fixed token or price saving.
Win, loss, and practical implication
Concrete win. In the fictional mapping task, three known reads can be requested as one evidence batch before the edit. The developer receives the type, caller, and example together, then makes one contract decision. The dependency is visible and the edit waits for its inputs.
Concrete loss. If the caller path is actually discovered by the type read, the supposed batch contains a hidden dependency. The caller operation may run with a guessed path or incomplete context. Batching by appearance rather than by produced inputs turns an optimization into a correctness problem.
Practical implication. Write the call ledger, mark input and state dependencies, and batch only the independent prefix. Keep edits and verification after the reads they consume. When the surface or dependency is uncertain, sequential execution is the honest choice.
Data gaps and future updates
The fact pack contains no verified benchmark for parallel reads in Claude Code and no first-party scheduling specification for the interactive product. It also provides no universal batch-size limit. A future update should identify the execution surface and measure latency, failures, and correctness under stated conditions before claiming a general gain.
F068 is specific to the documented parallel API flow. F066 is an API error convention. Neither should be generalized to the interactive interface without new evidence.
Community reports: None are cited. No reproducible community run with method, date, hardware, and author is present, so no anecdote is used to fill the scheduling gap.
One AI API Key option for OpenAI-format agents
For a separate OpenAI-format agent, One AI API Key offers one key at https://api.oneaiapikey.com/v1 and 46 live free IDs in the checked batch record. Its Claude IDs were unavailable on 2026-11-27, so those free IDs must not be presented as a Claude Code model source. Review the free model listing for the OpenAI-format option and the cost calculator when comparing a separate integration.
FAQ
Can two reads always run in parallel?
No. A read can depend on a path or value produced by another call, and it can observe state that a write is changing. Check both input and state dependencies first.
Does the Messages API parallel-call documentation guarantee Claude Code scheduling?
No. F064 explicitly describes the Messages API. The fact pack does not establish an interactive Claude Code scheduler contract.
Should independent edits be batched?
Be cautious. Different files can still share a semantic dependency, and edits to the same file share state. Keep edits sequential unless the integration and the task both establish independence.
What happens when a dependency fails in the documented API flow?
F066 describes is_error for a dependent call skipped because its dependency failed. F068 requires the documented parallel results to be returned together. Apply those rules only to that API flow.
More Claude Code troubleshooting
- Claude Code Requirements: Turn Vague Goals into Observable Outcomes
- Claude Code Prompt Structure: Separate Goals, Rules and Examples
- Claude Code Negative Requirements: Define What Must Stay Unchanged
- Claude Code Acceptance Examples: Show Inputs and Observable Results
- Claude Code Prompt Specificity: Name Files, Symbols and Exceptions
- Claude Code Agent Briefs: Use Structured Outputs Where Supported
- Claude Code Plan Mode: Approve Direction Before Files Change
- Claude Code Exploration Plans: Resolve Unknowns Before Implementation
- Claude Code Reversible Planning: Sequence Small Changes First
- Claude Code CLAUDE.md: Keep Only Instructions Every Task Needs
- Claude Code Progressive Disclosure: Scope Rules to Relevant Files
- Claude Code Conflicting Instructions: Write a Clear Precedence Rule
- Claude Code Image Prompts: Pair Visual Evidence With Written Constraints
- Claude Code Tool Schemas: Name Inputs So Calls Are Unambiguous
- Claude Code Stop Conditions: End at the Agreed Boundary
Sources
- Official, fetched: Parallel tool use, source for F064, F065, F066, and F068.
- Official, fetched: Tool use with Claude, supporting the tool-call and tool-result loop.
- Official, canonical link only: Handle tool calls, further reading without detailed mechanics asserted.
- Official, fetched: Claude Code common workflows, broader workflow context only.
- Official, canonical link only: Claude Code tools reference, further reading without detailed mechanics asserted.