Editing an old CometAPI Fable turn can invalidate the thinking that follows it

An edit button looks local in the UI, but it can change the validity of everything that follows the edited turn.

CometAPI’s Fable 5.1 migration guidance calls out this specific failure mode: changing earlier conversation history can invalidate thinking blocks. Its recommended direction is to keep histories append-only or use supported compaction patterns. That matters for applications sending multi-turn Fable requests through CometAPI, especially when an “edit and regenerate” control reconstructs an old transcript and then replays later content.

A useful mental model is history fork, not text replacement. If turn 4 changes, do not assume thinking retained from turns 5–8 is still valid context for the new branch. The downstream material was produced against a different prefix.

For a CometAPI integration, I would make the edit policy explicit:

  1. Prefer an appended correction. Add a new user turn that corrects or supersedes the earlier statement. This preserves the history under which existing thinking was generated.
  2. If the product must rewrite an old turn, start a new branch. Rebuild the request from a known-valid point and exclude downstream thinking blocks whose prefix has changed.
  3. Compact only through a supported pattern. Do not label an arbitrary splice or summary as compaction and assume it preserves reasoning validity. The CometAPI article points to supported compaction as the alternative, but it does not define a client-independent compaction API.
  4. Test the real edit path. A normal fresh conversation is not enough. Exercise an earlier-turn edit through the same CometAPI model route and endpoint used by the application, then verify the regenerated branch rather than merely checking for a successful HTTP response.

The current CometAPI article lists claude-fable-5-1 as the model ID and documents both the Anthropic-compatible /v1/messages endpoint and OpenAI-compatible /v1/chat/completions. Whichever interface the application uses, history ownership should remain in the client: record which prefix produced each retained block, and invalidate that block when the prefix changes.

A minimal test matrix can cover:

  • editing only the latest user turn versus an earlier turn;
  • appending a correction versus rebuilding a branch;
  • retaining versus dropping downstream thinking blocks;
  • changing models within the conversation;
  • cache behavior and content provenance after the edit.

That last group is not incidental. CometAPI’s migration guidance separately calls for testing per-message effort, turn-scoped system messages, progress updates between tool calls, cache behavior, and content provenance before moving production traffic.

The practical rule is simple: on a CometAPI Fable route, a changed earlier turn should invalidate assumptions tied to the old prefix. Preserve the old branch, append a correction, or rebuild through a supported path—but do not silently replay saved downstream thinking as though the conversation had never changed.

A second boundary worth making explicit is replay ownership. An edit should create a new conversation revision, not mutate the identifiers that downstream jobs already reference. Otherwise a queued tool call or evaluator can complete against an old transcript while the UI presents the result as belonging to the edited branch.

I would bind each replayable step to a conversation-revision ID and its immediate predecessor, then make the worker re-check that binding when it claims the step and again before accepting the result. If the revision has advanced, the step should be cancelled or recomputed rather than retried against the changed history. This is separate from checking whether the HTTP request succeeded: transport success says nothing about whether the result belongs to the current branch.

The same rule helps with partial failures. Keep the old branch’s outputs available for audit, but make them ineligible for the new branch unless a supported compaction operation produces a new, explicitly bound context. A small state machine—valid, invalidated-by-edit, recomputed, or intentionally reused-with-proof—makes the edit path observable and gives tests clear assertions about what may cross the branch boundary.