Anthropic Thinking Signatures Need Exact Round-Trip Validation
Anthropic thinking blocks carry an opaque signature containing encrypted full reasoning. The Claude API uses that value to verify thinking blocks when an application sends them back. A production validator should preserve the complete block sequence, reject local edits, assemble streaming signature deltas before persistence, and keep validation evidence separate from readable thinking summaries.

Anthropic returns a signature on each Claude thinking block. The value contains an encrypted copy of the model's full reasoning, and the Claude API uses it to verify a thinking block when an application sends that block back. The safe implementation treats the signature as an opaque protocol field. It preserves the complete assistant block sequence and lets Anthropic perform the cryptographic verification.
I want the validator to be strict about bytes and modest about meaning. A service that claims to inspect or recreate this signature has crossed from validation into invention.
TL;DR
- Preserve each thinking block and its
signatureexactly as Anthropic returned them. - Keep the readable summary and opaque signature as separate fields, tied to the block's type and position in the response record.
- During streaming, finalize the block only after its
signature_deltaarrives andcontent_block_stopcloses that block. - For tool-use continuation, send the original assistant block sequence back complete and unmodified.
The signature proves provider-generated thinking to Anthropic
Anthropic's thinking overview describes the signature as encrypted full thinking attached to a regular thinking content block. The readable thinking field contains a summary when display settings return one. Those fields serve different jobs. The summary may be empty under omitted display, while the signature still carries the encrypted reasoning used for continuity.
The same documentation says the Claude API uses the signature to verify that a returned thinking block came from Claude. Client-side validation should therefore check the transport contract. Confirm the expected block type and signature presence. Then verify string type, block position, response identity, and exact preservation. It should avoid decoding the value or assigning internal fields to substrings. Anthropic explicitly describes the signature as opaque.
Record the model route and API surface beside the block. Signature handling can vary by model account rules, so a bare value detached from its provider response is weak evidence. The Anthropic API gateway pattern supplies the wider route record around that content block.
Streaming validation ends at the block boundary
The streaming messages guide defines an ordered SSE flow. The indexed object opens on content_block_start. One or more deltas follow before the stop event closes it. Anthropic's thinking documentation adds the specific signature sequence: thinking content streams through thinking_delta, then one signature_delta arrives just before that closing event.
A streaming collector should index every event by message and content-block position. It can append thinking text while deltas arrive, but it should leave the block in assembling state until the signature and stop event have both been observed. Persisting the block as complete after the first readable token creates an audit row that looks valid while its cryptographic continuity field is still absent.
Use the SDK's final-message accumulator where available and test the raw event path anyway. A dropped connection immediately after signature_delta and a duplicate delta need explicit terminal outcomes. So does a stop event without a signature. On a test console, I want the incomplete row amber with the missing event name printed beside it, not a green check inferred from HTTP 200.
Tool-use continuation requires the original sequence
Anthropic's tool and multi-turn workflow guide explains why preservation becomes mandatory inside a tool-use turn. Claude pauses its response to wait for external information. When the application returns the tool result, Claude continues that same response. The earlier thinking and tool-use blocks provide the context for that continuation.
Send the assistant content blocks back in their original order. Preserve every thinking block, signature, tool-use block, and adjacent content field required by the message. Avoid rebuilding the assistant turn from a database view that selected only text and tool calls. A serializer that sorts blocks by type can quietly move thinking away from the tool request it accompanied.
Anthropic says modified thinking blocks receive a 400 response. That provider rejection is useful, but it arrives after the malformed continuation has crossed the network. A local preflight can compare the outgoing serialized assistant turn with the protected response artifact and stop obvious mutations earlier. AI audit log schema guidance can hold the response ID, attempt ID, block index, digest, and validation outcome without overloading the provider signature.
Validation evidence needs a narrow schema
Store enough evidence to prove faithful handling without pretending the client verified Anthropic's encryption. Each entry needs the provider and message ID. Tie both to the response attempt and content index. Record the provider type too. Add signature presence and length. Store a protected signature value or approved reference, plus summary and full-content digests. Record stream completion state and the round-trip comparison result.
The full opaque value may belong in a restricted message store rather than a general observability index. Operational dashboards can use a digest and length. Access policy should cover the readable thinking summary separately because it can expose task context. Logging both fields into one unrestricted reasoning column defeats the separation Anthropic's response shape provides.
My blunt opinion is that a regex over the signature alphabet is security theater. It proves only that a string matched a local pattern. Exact custody and ordering are the evidence that matters, along with successful provider acceptance.
Apply per-route AI policies to choose retention and missing-signature behavior. Set tool-use round-trip requirements there too. A casual single-turn route may omit prior thinking. A tool-using route should fail its preflight when the required block sequence has changed.
A destructive fixture should mutate one field at a time
Capture a real or controlled Claude response containing thinking followed by a tool-use block. Store the raw assistant content array as the fixture. First return it unchanged with a valid tool result and confirm continuation succeeds. Then run separate mutations. Delete the signature or alter one character. Change the content order, remove one item from a consecutive thinking pair, duplicate another item, and replace the message's model-route metadata.
For streaming, split the signature across the exact event handling path used in production. Test termination before signature_delta and immediately after it. Test another termination ahead of content_block_stop. Confirm that only the complete sequence becomes eligible for round-trip use. Include omitted display, where the readable thinking string is empty but the signature remains present.
The fixture output should show the first differing block index and a digest comparison, while keeping the opaque value out of shared CI logs. Keep the gateway record and application attempt distinct. Keep the Anthropic request ID and message ID separate from the block index. Signed audit records can protect the local decision record; they do not replace Anthropic's thinking signature.
DeepInspect
DeepInspect can validate the content-block contract on authenticated user or agent HTTP traffic deliberately routed to Claude through its proxy. It can require expected block types on the response, record signature presence and block position, and compare a later routed tool-result request with the protected assistant sequence observed on the prior response.
DeepInspect cannot decrypt Anthropic's signature or prove what the encrypted reasoning says. The application owns conversation storage, SSE assembly, tool execution, and the complete assistant-turn replay. Calls that bypass the proxy sit outside this evidence path.
Book a technical deep dive at deepinspect.ai.
Frequently asked questions
- Can an application decrypt an Anthropic thinking signature?
Anthropic documents the signature as opaque encrypted full thinking. Applications should preserve it and return it unchanged when the protocol requires it. The Claude API performs verification when the thinking block is passed back.
- Is a thinking summary covered by the signature?
The signature carries encrypted full thinking, while the
thinkingfield exposes a readable summary or an empty string depending on display settings. Preserve the complete block rather than attempting to derive one field from the other.- When does the signature arrive in a stream?
Anthropic documents a
signature_deltainside acontent_block_deltaevent immediately before the thinking block'scontent_block_stop. Mark the block complete only after the collector has assembled that event sequence.- Must every previous thinking block be sent on every turn?
Tool-use continuation requires the thinking blocks from that assistant turn to be returned complete and unmodified. Outside tool use, Anthropic allows prior thinking to be omitted under documented rules. Keep one route-specific policy instead of guessing per request.