Append-Only Context: A Subtle API Design Change in Large Model Conversation History

    This article explains a recent, understated change in a next-generation conversational model’s API: multi-turn conversation history now only supports append operations, not in-place modifications. It covers the reasons behind the change, its impact on cached reasoning states, the failure of common context-engineering techniques under the new semantics, official migration strategies, a tricky detail about the instructions field, and a practical checklist for agent developers to adapt.

    A Change That Starts with a Migration Guide

    A model vendor recently released a new-generation conversational model. Buried in the accompanying developer documentation was a seemingly minor but far-reaching change: starting from this generation, the history of multi-turn conversations essentially only allows appending to the end—no more going back to modify earlier turns.

    Specifically, if any of the following “history-altering” operations occurs during a multi-turn session—

    • Rewriting the initial system instruction (the developer message);
    • Truncating the return result of a previous tool call;
    • Replacing older dialogue turns with a summary;
    • Switching models mid-conversation;
    • Changing the end-user or organization identifier;

    —the server will discard all reasoning items (the model’s latent reasoning trajectories from previous turns) that come after the point of modification.

    What Losing Reasoning State Means

    To grasp the weight of this change, you first need to understand what reasoning items are. In a model architecture with reasoning capabilities, after each completed turn, the model produces not only a final answer but also an internal reasoning trace. The server caches this trace. On the next request, if the context prefix matches exactly, the model can “continue reasoning from where it left off” instead of recomputing everything.

    Once the prefix is modified, the cache is invalidated and the reasoning trace cannot be recovered. The consequences are threefold:

    1. Increased token consumption: The model must re-reason through the parts it already finished, raising both input and reasoning tokens.
    2. Higher latency: Re-reasoning takes time, especially in long-context scenarios.
    3. Degraded output quality: The documentation makes this explicit—when reasoning cannot be recovered, output quality suffers. This is not just a performance issue; it is a quality issue.

    A more notable sentence in the documentation states that discarding reasoning is performed as part of the safety measures. This means it is not merely a billing strategy but a deliberate security design: reasoning traces are internal state, and pairing a modified context with an old reasoning trace could lead to unpredictable behavior, possibly even exploitable through injection. Tying “history changes” to “reasoning loss” is a conservative but sound trade-off.

    Why Five Common Context-Management Techniques Fail En Masse

    Over the past two years, agent developers have accumulated a set of context-engineering practices to cope with long conversations, permission control, and context bloat:

    1. Dynamic system prompt concatenation: Rewriting the beginning each round based on retrieval results to make instructions carry the latest context.
    2. Truncating tool logs: Going back after a few rounds to clip large tool-returned logs to save tokens.
    3. Rolling summaries: When a conversation exceeds a certain length, compressing earlier parts into a summary and replacing the original text.
    4. Schema switching by phase: Adjusting the structured-output format definition dynamically based on the task stage.
    5. Dynamic tool-list adjustment: Changing the set of available tools at any time based on permissions and task needs.

    The problem: under the new context model, all five of these practices constitute prefix modifications. In other words, every “careful” trimming you do will cause the model to lose its previous reasoning process, forcing you to pay for re-reasoning and take on the risk of quality degradation.

    Some developers reviewing their own code-review agents found they were using four of the five techniques—a fairly representative case. What was once considered best-practice context trimming has become an anti-pattern under the new API semantics.

    The new design philosophy can be summed up in one sentence: Context is append-only in temporal order. Configuration changes are also written as new records at the end—never touch what came before.

    For common change requirements, the migration paths are as follows:

    Old Practice New Practice
    Modifying request-level parameters like reasoning effort Append a configuration_update entry at the end; keep request-level parameters unchanged
    Switching structured-output schemas Also append via configuration_update
    Adding/removing tools Use additional_tools to append, or allowed_tools to restrict the callable scope for the current turn
    Modifying the initial system instruction Append a new system message at the end
    Truncating old tool outputs Truncate before first sending to the model; never modify afterwards

    As can be seen, mechanisms like configuration_update, additional_tools, and allowed_tools essentially model the “change” itself as an event record in the conversation stream. When the model reads this record, it acts according to the new configuration, while the historical prefix remains byte-identical, preserving cache and reasoning state.

    An Easy-to-Miss Detail

    Another often-overlooked change: the top-level instructions field has been moved in the request structure to after the input field. This means that if you continue to place fixed instructions in the top-level field, that content may not hit the prefix cache and will be billed as uncached input.

    The correct approach is to move it into the first system message inside input, making it part of the context prefix so it can benefit from caching in both cost and latency. For applications with long instructions and high call volumes, this single adjustment can have a significant impact on the bill.

    A Migration Checklist for Agent Developers

    Given the changes above, here is a recommended step-by-step process for auditing and adapting existing systems:

    1. Audit context-modification points: Search globally for all code that rewrites, truncates, or replaces historical messages with summaries, and evaluate each one—can it be changed to “process before first send” or “append at the end”?
    2. Make summaries incremental: If long-conversation compression is unavoidable, consider adding the summary as a new message appended at the end, rather than replacing the original text.
    3. Use new mechanisms for tool and schema changes: Replace in-place modifications with append-style configuration entries.
    4. Move instructions into the first input message: Ensure fixed instructions are part of the cacheable prefix.
    5. Stress-test and compare: After migration, compare token usage, time-to-first-token, and output quality to confirm cache hits are back to normal.

    Final Thoughts

    “Append-only” may look like a restriction on developer freedom, but it actually reflects a direction in large-model service evolution: treat context as an immutable event log, expressing changes as new events rather than rewriting history in place. This model maintains cache efficiency while also reinforcing the consistency between reasoning state and security policies.

    For agent developers, understanding and adapting to this paradigm early—shifting context engineering from “trimming history” to “appending records”—is the key to achieving a better balance among cost, latency, and output quality in next-generation models.