In this piece
Can Claude Fable 5.2 resume your saved agent sessions?
An invoice agent looks up DEMO-17. The accounting system returns EUR 47.50. Before the agent can tell the user, a deployment restarts the worker. Your database contains the chat, and your dashboard shows a successful lookup. Can the next worker finish the answer without asking for the invoice again?
For an application using the Claude Messages API, the answer depends on what went into the database. A transcript that looks complete to a person can lose an entire assistant turn when that turn contained a tool call and no visible text. A release can also change an old conversation by loading today’s system prompt. Both bugs can survive a demo that always starts a fresh chat.
Research checked 30 November 2026. We ran the six local storage checks below against synthetic records. The model behavior comes from Anthropic’s documentation. The live upgrade and rollback cases are a test plan for your deployment. If you use the coding CLI, the Fable 5.2 guide for Claude Code covers its model settings.
What changes on the first request after a restart?
The first resumed request combines the state your application saved with the configuration your new worker loads. On the synchronous Claude API, Fable 5.2 can reject a preserved thinking block with HTTP 400 when an earlier part of the conversation has changed. The first turn of a brand-new chat never exercises that check on an old block. Anthropic’s Fable 5.2 migration guide
Take an innocuous release. Yesterday the tool description said “Read one recorded invoice total.” Today it adds “and currency.” Both versions could return exactly the same data. If the worker reconstructs yesterday’s conversation using the new tool definition, the input preceding the saved block has changed. Retrying that request three times sends the same mismatch three times.
The prefix check compares parsed values. Whitespace between JSON tokens and the order of keys in an object can change. The order of items in an array matters, as do the contents of prior messages and tool definitions. A changed max_tokens or effort alone does not explain this particular error. An edit can invalidate blocks produced after the edit. Older blocks that precede it have a different history. Message Batches also have a different default when mismatch behavior is unset. What the API includes in a prefix check
Can you choose between a 400 and a silent drop?
Yes, as of 30 November 2026. The beta header thinking-binding-controls-2026-08-01 unlocks the setting thinking.block_binding.prefix_mismatch_behavior. With "error", every failed check is a 400 that names the first invalid block. With "drop_block", the API removes the invalid blocks, the request succeeds, and the response lists each removed block in an input_transformations array.
Left unset, the outcome differs by model. Fable 5.2 returns the 400. Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5 may instead let the stale block through and bill it. The API does not remember the setting between requests, so a resumed session has to store it next to the conversation.
Anthropic describes "drop_block" as a stopgap. The model can spend extra output tokens rebuilding reasoning it can no longer read, and the prompt cache is invalid from the first dropped block onward. To recognise the error in code, match only the phrase The block is bound to a different conversation. Its type is the generic invalid_request_error, and the rest of the message can change.
What should the worker save before it stops?
Save what you would need to construct the next API request, even when the UI has nothing to display. Keep the effective system instructions and ordered tools from the last successful request, the ordered message history, the full assistant content array, and any tool result your application has already obtained. Anthropic’s advice for saving and resuming a conversation
| What was saved | What the next worker can establish |
|---|---|
| Original request inputs | The caller requested DEMO-17 with a particular system instruction and tool definition. A deployment can resolve those versions or restore their stored values. |
| Assistant turn | An opaque thinking block with an empty visible summary and a lookup with ID toolu_demo_17 arrived in this order. A text-only export would lose both. |
| Result and receipt | The application recorded EUR 47.50 for that call. It can supply the recorded result and check the next answer against an independent value. |
| Operational state | The lookup completed, but delivery of the final answer is pending. A replacement worker knows which step remains. |
The model’s thinking block is opaque to your application. Preserve the returned fields as part of the assistant turn. There is no need to extract reasoning or print it in a log. For a client tool, the next user message supplies a tool_result for the matching tool_use.id. Put results first in that message, with no intervening chat turn. Parallel calls each need their own matching result. Claude API rules for returning tool results
How can you test your own session storage offline?
Run the downloadable Python replay checker before changing your model setting. It uses the Python 3 standard library and needs no API key. The invoice, tool ID and signature field are synthetic. The package tests the data that your application saves and loads. Its placeholder signature only has meaning inside this fixture.
Change the synthetic invoice in the fixture after the stored lookup. A replay explaining yesterday’s decision should cite the original amount. A new question about the current balance should trigger a fresh lookup. Give these requests separate expected answers so a passing replay cannot disguise stale reads in normal use.
python3 check_replay.py
python3 check_replay.py --emit-fixture > original.json
# Save original.json through your application, restart the worker,
# then export the loaded record to restored.json.
python3 check_replay.py --check-restored restored.jsonThe default run reported 6/6 expected outcomes. One intact record passed and each of five damaged records produced its expected failure label. The five negative controls make a difference in practice. A checker that approves every session will fail its own test. Feeding original.json straight back to the checker only tests the reference file. For a release decision, cross the same database, queue, SDK conversion and reload boundaries that a customer session crosses.
| Change applied | Observed classification | Where to look in an application |
|---|---|---|
| None; no assistant text | intact | A renderer that filters out empty chat bubbles must still save this turn. |
| System instruction edited | changed prefix: system | The worker might be resolving a mutable prompt alias. |
| Tool description edited | changed prefix: tools | A schema generator might be pulling the deployed version into old sessions. |
| Earlier request rewritten | changed prefix: messages | A summarizer might be saving its display copy over the original turn. |
| Assistant blocks reversed | changed assistant turn | Rows returned without an explicit ordinal can reassemble in a different order. |
| Wrong result ID | unmatched tool result | A correlation bug can attach a valid invoice total to another call. |
The checker normalizes JSON object keys and preserves array order. It compares the archived values and checks call/result linkage. Its equality rule is deliberately strict for application storage. It cannot authenticate an Anthropic signature, reproduce provider errors or tell you whether a model can use a block. Extend the fixture with your own shapes, especially parallel calls with out-of-order completion, and a restart between a tool returning and its receipt being saved.
Which storage round-trips changed the record when we ran them?
On 30 November 2026 we pushed the fixture through nine real round-trips and handed each restored record to the unmodified checker. Setup: Apple M3 Pro laptop, 18 GB RAM, macOS, Python 3.15.2, SQLite 3.54.1, Node 24.15.0. It was one run. Each of the last three cases looped over 1,000 freshly generated sessions.
| Round-trip | Checker verdict |
|---|---|
SQLite TEXT column, whole record | intact |
SQLite json(), minified | intact |
SQLite jsonb() blob and back | intact |
Node JSON.parse, then JSON.stringify | intact |
Python json.dumps(sort_keys=True) | intact |
One row per content block, rowid table, no ORDER BY | intact (one session) |
One row per block, random UUID primary key, WITHOUT ROWID, no ORDER BY | changed assistant turn in 509 of 1,000 sessions |
Rowid table plus a covering index on session and block ID, no ORDER BY | changed assistant turn in 483 of 1,000 sessions |
The UUID-keyed table, read with ORDER BY on a stored position | intact in 1,000 of 1,000 sessions |
Whole-record JSON survived every serializer we tried, including the ones that reorder keys and strip whitespace. Damage appeared only where a turn was split into rows and read back without an explicit position. With two blocks and random keys the order is a coin flip, and both measured rates sit near 50 percent. The plain rowid table passed. That is the dangerous case: it keeps passing until someone adds an index or changes the key, and then about half of all tool turns come back reversed.
The fixture contains no numbers, so we probed those separately with {"amount": 47.50, "ledger_id": 9007199254740993}. Node returned 9007199254740992 for the ID, off by one. Python and both SQLite paths kept it. 47.50 became 47.5 in Node and Python, which is the same parsed value.
We did not test how the Claude API treats integers above 2^53. Keep such IDs as strings in tool inputs and results and the question never comes up. This run covers SQLite and two JSON libraries. It says nothing about Postgres, a queue or your ORM, so run the same loop through those.
What happens when a session moves from 5.1 to 5.2 and back?
On the direct Claude API, Fable 5.2 can read preserved thinking from Fable 5.1 when the earlier inputs remain valid. Fable 5.1 cannot read blocks produced by 5.2. Rolling a session back can therefore return HTTP 200 while the older model continues without some earlier reasoning. Your application can still hold the full original history. A provider-side omission on one request does not rewrite the database. How preserved thinking works across model switches
Separate the decision to reroute new traffic from the decision to move an active session. For new invoice requests you can switch the model at session creation. For work already in progress, record the model on the session and let that cohort finish on its existing route where available. A model change partway through should be an explicit, observable event. Our model routing guide explains where such a decision can be made.
If an old thread already fails the prefix check, compare your restored system, tools and earlier turns with the last known successful request. Recover an intact version when possible. If the original is gone, start a new session from verified business facts. For DEMO-17, that means the invoice reference, the recorded EUR 47.50, its receipt and the fact that an answer is outstanding. Keep that handoff visible as a new session. Anthropic’s troubleshooting guide for a bound thinking block
Why can a staging replay of production sessions mislead you?
Thinking blocks from Fable 5.2 work only in the account that produced them, or a linked one. On the Claude API the account is your organization, on Amazon Bedrock your AWS account, on Google-managed Claude models your Google Cloud project. Anywhere else the API drops the blocks without an error. A staging run that replays production sessions under a second organization therefore tests less than it appears to. So does a failover from the direct API to a cloud account.
With the beta header set, each silent loss leaves a labelled entry in input_transformations. Three reasons matter for a resumed session.
| Reason | What happened | What to do |
|---|---|---|
prefix_binding_mismatch | The system prompt, tools or an earlier message differ from what the block recorded. | Your bug. Diff the stored request against the outgoing one. |
model_binding_mismatch | The target model cannot read the source model’s blocks, for example 5.2 history sent to 5.1. | Expected after a rollback. Keep sending the whole history. |
organization_binding_mismatch | Another account produced the block. | Expected after an account move. Do not strip the blocks from storage. |
A release test that demands an empty array fails on every legitimate rollback. Fail the build on prefix_binding_mismatch only.
The rollback target also has a shelf life. As of 30 November 2026, Anthropic lists Fable 5.2 as the current model, released 9 November 2026 and retired no sooner than 9 November 2027. Fable 5.1 is marked legacy, released 1 September 2026 and retired no sooner than 1 September 2027. Cache reads cost $0.20 per million tokens on 5.2 and $0.25 on 5.1.
Which live checks should gate the rollout?
Restart the worker after the tool has committed a harmless change but before the assistant receives its result. Keep the session replay check separate from the tool’s idempotency check: accepting the restored conversation proves neither that the tool result was delivered nor that performing the action again would be safe.
Use a non-production account with the same provider route, SDK and persistence adapter as the release. Obtain genuine blocks from that account for each test. Give the read-only tool a controlled invoice and record every invocation. Judge the final answer against the independently stored amount and currency. The proposed cases below have distinct failure signals.
| Run | What to do | Evidence to keep |
|---|---|---|
| Fresh 5.2 baseline | Complete one lookup without a restart using claude-fable-5-2. | Model ID, request IDs, tool count, EUR 47.50 in the final answer, usage and elapsed time. |
| Same-model restart | Stop after recording the result, reload on a fresh worker and continue on 5.2. | The answer matches the receipt and the invocation count stays at one. Record any extra read as a separate outcome. |
| 5.1 to 5.2 | Obtain a genuine 5.1 tool turn, persist it and continue on 5.2 with its original prefix. | Capture status, returned model and accepted business result. If it fails, diff the stored fields against the outgoing request. |
| 5.2 to 5.1 | Repeat the switch in reverse using genuine 5.2 history. | Capture the result, added calls, tokens and latency. A correct answer alone cannot establish that earlier thinking was readable. |
| Deliberately edited prefix | Use a disposable copy of a genuine 5.2 turn on the synchronous direct API. Change only its earlier system instruction, keeping the affected block. | Observe the default prefix error and the worker’s recovery path. Record the field and request ID without logging the conversation. |
An illustrative release gate for this workflow is one correct amount and currency, one lookup and no writes per accepted case. Any wrong invoice or duplicate external action calls for investigation before expansion. Set latency and cost thresholds against your existing service target. Keep fresh and resumed traffic in separate groups. Thousands of successful new conversations can otherwise hide every broken restart. See the release QA checklist for the wider sign-off.
In a workflow that can issue a refund, a timeout after submission is an accounting question. Check the downstream system using a stable operation ID for that logical refund. Repeat only if the provider confirms that the first submission can no longer commit, or use its documented idempotent retry contract with the same operation ID.
Saving the Claude tool ID helps correlate messages. Duplicate prevention also needs the system that performs the refund to recognize repeated attempts. AWS on idempotent API retries · A worked example of recovering an uncertain send
When do retries erase Fable 5.2's token savings?
At standard direct API prices, 25,000 fresh input tokens and 2,000 output tokens cost $0.35 on Fable 5.1 and $0.28 on 5.2. The listed rates per million tokens are $10/$50 and $8/$40 respectively for input/output. This example assumes identical usage on every attempt. Cache, batch, tools, infrastructure and human-review charges are excluded. Fable 5.2 specifications and prices · Fable 5.1 specifications and prices
Suppose 20 accepted invoice answers take 20 attempts on 5.1. The model bill is $7.00. If restarts and retries make the same 20 accepted answers take 25 attempts on 5.2, the bill is also $7.00. A 26th attempt brings it to $7.28, or $0.364 per accepted answer. These are worked figures. In a pilot, divide actual costs for all attempts by the count of independently accepted results. Keep failed tasks in the cost numerator.
A team choosing whether to migrate can now inspect three pieces of evidence together. Did the stored turn survive a restart? Did a real model complete the right task once? What did that accepted result cost? If your team needs a repeatable release suite for its own workflows, our AI evaluation and LLMOps service covers that work. Discuss an evaluation for your agent.
The Twinsoft AI case study shows how a prototype was prepared for an enterprise pilot. Use it for the wider product-release decision.
