In the previous essay, we put inference inside an actor. The actor owns the state and the loop, asks the model for a proposed next step, and decides whether to carry it out. That gives us a boundary around the decision. The next boundary is where the decision reaches another system through a tool call.

From inside the loop, a tool may look like a function with a description and an input schema. Behind it might be a payment service, an order system, or a database owned by another team. Those systems have their own state, permissions, capacity, and failure behavior. The tool interface makes them available to the actor; it does not bring them inside the actor’s control.

This is where tool calling becomes distributed transaction work. The actor requests an effect in another system and uses the result to decide what to do next. Inference changes how it chooses that work, but the exchange still crosses a network between independently operating participants. To understand what makes an agent reliable, we need to follow both sides: the distributed system reached through the tools, and the inference loop that can keep choosing to call them.

The tools are the actor’s boundary with the rest of the system

Consider an intake actor recording a report. It interprets the person’s message, proposes a case, and invokes create_case. The actor knows what it requested. The case service knows what it recorded. A response connects those two pieces of state so the actor can acknowledge the case or continue the work. This is the arrangement I use in my AI on AWS playground, but the same separation exists whenever an agent asks another service to change something.

The service can finish its write even if the response is lost. The actor then sees a timeout while the case already exists. There is no shared transaction that rolls back both the service’s record and the actor’s conversation. A tool wrapper has carried a request across that separation, and now the actor has to account for work whose outcome it does not yet know. That is the distributed system underneath the apparently simple function call.

An illustrative intake actor owns its state, inference step, and execution rules. Its code invokes an external model service and dispatches allowed tools to independent case and notification services. Results return through the actor before the next inference.

We would face the same lost response if ordinary code selected the operation. What inference changes is how the caller responds to it. A fixed path can repeat the retained request. An inference loop can interpret the error, reword the request, choose another tool, or decide that an alternative action would help. Each of those is another decision, potentially reaching a different part of the system. The actor therefore needs to distinguish delivering a decision already made from asking the model to make a new one.

That distinction starts with the tools we expose. They define which parts of the distributed system inference can reach and the size of the decisions it can make there.

Choose the operations inference is allowed to compose

A create_case tool gives the case service responsibility for validating and recording a case. If that requires several database writes, the service can coordinate them within its own transaction. A generic database tool moves those choices into the actor: inference must choose the writes, order them, and respond if only some succeed. We have expanded the decision space and moved coordination out of the service that understands the record. Tool design therefore determines how much distributed work the actor must manage.

I would expose operations that match the business responsibility being delegated. An intake actor may record information without approving it. Approval can remain a separate operation available to a human reviewer, with that separation enforced at the service. This gives the model room to interpret a report while keeping the authority to accept it outside the loop. Providing both operations and asking the model to remember which one it should avoid would make the boundary another inference decision on every turn.

The boundary also has to hold when tools are combined. A restricted case API is little protection if a generic database tool lets the actor write an approval directly. Private-record access together with arbitrary outbound HTTP access similarly creates a route to send private information elsewhere. An actor with private information or payment authority should have the specific destinations its task requires. If public research is needed, it can be performed separately with a controlled handoff, instead of giving the same actor unrestricted internet access.

This is governance expressed through the architecture, as I discussed in the compliance crosswalk. We decide which effects the actor may initiate and enforce that decision through the tools and the services behind them. Within that scope, inference can choose useful work. Once the actor accepts a proposal and sends it, the next responsibility is to preserve that choice through delivery.

A model retry can become a different transaction

Suppose the case service records a report but its response disappears. If the actor sends the timeout back to the model and asks it to try again, the next proposal may have a clearer summary or a different ordering of symptoms. To a person, it is still the same report. To a service receiving a write, the payload has changed. If the actor also assigns a fresh operation identifier to every model-generated call, the service has been told that this is new work. A perfectly functioning API can now create a duplicate.

Ordinary retry code would preserve the request. Inference requires us to make that preservation explicit because the next pass through the loop can revise the decision. Assign an operation identifier when the actor accepts the proposed work, and retain it with the accepted content before dispatch. Repeated delivery uses that same identity and content. A genuine update uses another operation with its own identity. The identifier must survive a retry of the actor itself, rather than being recreated simply because the model proposed the action again.

The receiving service needs an idempotency contract to match: an identical repeat returns the recorded result without performing the effect again, while the same identifier with changed content produces a conflict. Content alone cannot supply the identity, because separate operations can legitimately contain the same information. AWS’s guidance on idempotent APIs explains why the caller needs to state that intent explicitly. For an agent, it prevents variations in model output from quietly deciding whether a request is a repeat or a revision.

The model proposes a case once. The actor retains operation C17 and its content, sends it, and receives no response after the service records case 482. Code repeats C17 unchanged; the service returns case 482 instead of creating another case.

The receiver must record the effect and its association with the operation together, then retain that association throughout the recovery period. Otherwise it can create the case and forget that it did so before the next delivery arrives. The actor cannot fix that gap by remembering more conversation. Both sides of the tool boundary have to preserve the operation for a repeat to be safe.

With that contract in place, delivery recovery stays in code. A confirmed result can return to inference for explanation or another decision. A confirmed rejection may justify correcting the proposal where permitted. A timeout remains an unknown outcome, so code looks up or safely repeats the retained operation instead of asking the model to invent another route. This protects the business effect, and it also avoids paying for another interpretation when interpretation was never the part that failed.

The retry budget now includes inference

Traditional retry amplification is already a distributed systems problem. If one layer allows three attempts and a client beneath it also allows three, one request can produce nine calls to a struggling service. An agent introduces another place to repeat work: the loop itself. Returning a tool error to inference can cause another model call before the next attempt, and restarting the actor can replay several such turns. We can amplify both the traffic against the service and the inference used to decide what traffic to send.

Consider an actor allowed three model turns while trying to complete an operation. If an outer workflow allows up to three attempts at running that actor, it can invoke the model nine times for one business request. Each completed invocation has processed input and generated output, whether or not the requested business operation succeeded. The nine calls are now a cost problem as well as a load and latency problem. By contrast, three HTTP attempts inside a tool client do not themselves create three model calls. Where the retry sits determines what work, and what cost, gets multiplied.

Three actor attempts each use three model turns, producing up to nine model calls for one business request. A retained tool request retried in code does not re-enter inference. The outer workflow must account for the total model and tool budgets.

Those model calls need not cost the same amount. When the actor carries earlier requests, tool results, and errors into the next inference, the input grows. Tool descriptions also occupy input, and the model generates another proposal on each turn. Anthropic’s tool-use documentation describes how tool definitions, requests, and results contribute to token usage. A limit on turns is useful, but it cannot by itself bound the cost of turns with different amounts of context and output.

The actor therefore needs a budget for the complete business request: elapsed time, tool attempts, model turns, and token use or spend. Before another inference, its code checks what remains, accounts for the context being sent, and limits the output it will allow. Usage returned by the provider updates the budget before the next step. An outer retry must inherit that consumption instead of granting the restarted actor a fresh allowance. If the actor delegates work, that work draws from the same overall allocation; otherwise delegation becomes another way to multiply it.

This leaves room for useful inference. A rejected proposal may need correction, or a successful lookup may reveal that the original request needs clarification. The budget permits those decisions while preventing an unavailable service from becoming an open-ended reasoning exercise. When the problem is delivery, repeat the retained operation without another model call. When further interpretation is justified, spend from the remaining inference budget. That separation ties cost to useful decisions rather than to how many times the infrastructure fails.

Preserve the work when the loop stops

Exhausting the budget stops further execution; it does not undo an operation already sent through a tool. The actor may still have a write whose outcome is unknown. Its retained operation and confirmed progress must therefore survive outside the running loop, so another worker or a person can resolve the same work without paying to reconstruct the plan or risking another effect.

For one unresolved operation, a durable queue and worker may be enough. A process with several dependent operations needs to retain which steps completed. If a payment succeeded but its confirmation failed, continuation should begin with the confirmation. If later work cannot be completed and the business requires a refund, that is a compensating operation with its own identity and rules. These choices belong in the process definition. Inference can help select work within it, but stopping and restarting the loop must not change what completed work means.

This is where the team’s existing coordination platform can carry the agent’s decisions. Step Functions Standard workflows on AWS, Durable Functions on Azure, and Workflows on Google Cloud provide ways to retain workflow progress. Use that machinery to preserve accepted operations, confirmed results, and remaining budgets across interruptions. The receiving services still own their effects and must recognize repeated delivery. The workflow gives the actor continuity across executions; it cannot supply a missing idempotency contract behind a tool.

What this means for the business

The tool boundary tells us where to assess an agent project. The business is allowing inference to select operations in systems that already carry real obligations. Start with a bounded responsibility, involve the owners of the services it reaches, and establish which operations are safe to repeat and how unfinished work will be resolved. An estate with mature service contracts gives the actor a foundation. Where those contracts are missing, building them belongs in the project alongside the model integration.

Inference adds a second part to that assessment. We need to know how well the model selects work and how much interpretation a completed request consumes, including corrections and failure paths. A cheap model call can sit inside an expensive loop, particularly when downstream failures trigger more inference. Budget and measure at the business-request level so retries, context growth, and delegation remain part of the cost. Then compare that complete cost, including operational handling, with the effort the agent removes.

This is the same architectural division we began with: the actor owns the loop, inference helps it choose, and tools connect those choices to the distributed system. Keeping those responsibilities explicit lets us improve the model without handing it control of delivery semantics or an unlimited recovery budget. We gain a flexible way to interpret requests while retaining a defined, affordable way to carry them out.