You are architecting a Claude-based agent for a regulated financial client that performs long-running portfolio rebalancing workflows. A compliance requirement mandates that no single trade instruction may be executed unless it is cryptographically traceable to the exact model-generated intent that produced it. The agent uses the Messages API with tool use, and several downstream services consume tool calls asynchronously. Which architectural mechanism best satisfies this requirement while preserving agent autonomy?
The tool_use id is generated by Claude and echoed back in the corresponding tool_result, so pairing them creates a verifiable link between model intent and downstream execution. Persisting the full assistant turn preserves the reasoning context around the intent, and the id becomes the cryptographic join key that compliance can replay. This satisfies traceability without constraining how many tools the agent may call.
Why this answer
Binding each tool call to the platform-generated tool_use id and persisting the surrounding assistant turn creates a deterministic chain from model intent to executed instruction. Because the id appears in both the tool_use block and the tool_result, downstream services and auditors can reconcile them without trusting model-authored text. Caching, summaries, or self-hashes do not establish that binding.
Exam trap
The trap here is assuming that any unique value the model or cache layer produces can serve as an audit key, when only the platform-issued tool_use id is reliably echoed through the tool_result.