AI Session Portability Compared 2026: OpenAI vs Anthropic vs Gemini

TL;DR
AI session portability compared across OpenAI, Anthropic, and Gemini: storage defaults, encrypted reasoning, compaction, and what you can move or audit.
Last updated: September 17, 2026
A July 30 essay by the Earendil engineering team hit the top of Hacker News with a question most developers had not thought to ask: how much of an AI session do you actually own? The original promise of an inference API was simple - send input, receive output, and if you kept both, you had the conversation. You could archive it, replay it, or hand it to a different model.
That is increasingly not how the big providers work. Reasoning tokens arrive as encrypted blobs. Server-side compaction produces state only the original provider can decrypt. Hosted web search feeds the model evidence you never see. Subagent messages are sealed ciphertext. The transcript on your machine is becoming a partial view of a session whose operational state lives on the provider's servers.
This is a comparison of session portability across the three major providers, grounded in their live documentation (core links verified July 31, 2026, Anthropic compaction update verified September 17, 2026). The practical question is not philosophical. It is: if a model is retired, a policy blocks your next request, a price change makes a competitor attractive, or an auditor needs to reconstruct what happened, what can you actually move?
September 2026 Update: Compaction Became an API Primitive#
Anthropic's September 14 Platform release note made the session-portability argument less theoretical. The Messages API can now compact a conversation on demand in beta with the compact-2026-09-04 header. Instead of waiting for the client to decide when a transcript is too large, you can send a top-level compaction parameter and receive a signed compaction block back from the API. On later calls, you send that block first, in place of the older messages, while keeping recent turns word for word after it.
That is a better primitive than silent truncation, but it does not remove the portability problem. A compaction block is still a summary. It can carry state, next steps, and durable decisions, but it should not be the only place where exact rules, tool results, failed commands, or deployment receipts live. The practical pattern is the one we use in agent context reduction: keep raw evidence, logs, files, and verification receipts outside the model context, then let compaction summarize the working set.
Two recent papers sharpen the risk. "The Compaction Cliff in Long-Running AI Agent Memory" reports that uniform compaction preserves only 53 percent of safety rules after one round and 10 percent after five in its Claude Code setup. "Compaction as Epistemic Failure" documents the opposite failure mode: partial output from killed processes being summarized as confirmed results. Both point to the same rule for long-running agents: summaries are useful handoffs, not ground truth. The harness still needs durable state and external verification.
What Session Portability Means#
The Earendil essay proposes a practical test: a portable session is one where another model can continue from your transcript without the old provider dereferencing an ID, decrypting a blob, or reconstructing a summary. Five sub-tests follow:
- Inspection - can you see what the model saw and what tools did?
- Export - is the session self-contained on your side?
- Replay - can another implementation reconstruct equivalent context?
- Audit - can a human explain why an action was taken?
- Deletion - can you remove every server-side copy?
A response ID is not a transcript. A ciphertext is not user-controlled state. A citation list is not the evidence that was placed in the model's context. On those five tests, the three providers score very differently.
The Providers at a Glance#
| OpenAI (Responses API) | Anthropic (Messages API) | Gemini (Interactions API) | |
|---|---|---|---|
| Conversation storage default | Stored (30-day TTL) | Not stored by default | Stored (55 days paid / 1 day free) |
| Opt-out | store: false | N/A (stateless by default) | store: false |
| Reasoning visibility | Encrypted items by default | Summarized or omitted; encrypted signature field | Model thoughts recorded in interaction steps |
| Compaction output | Encrypted, opaque ("not intended to be human-interpretable") | Readable summary in a compaction block | Stateless via explicit history |
| Subagent messages | Encrypted (Codex multi-agent v2) | Depends on client; SDK-visible tool calls | Tool calls visible in execution steps |
| Client-side history sufficient to continue elsewhere? | Partially - encrypted items block full replay | Mostly - readable blocks, but thinking must be stripped when switching models | Partially - interaction history retrievable via API |
Verified July 31, 2026 against the OpenAI conversation state guide, OpenAI compaction guide, Anthropic extended thinking docs, Anthropic compaction docs, and Gemini Interactions API docs.
OpenAI: Stateful by Default, Sealed Where It Counts#
OpenAI's Responses API stores responses by default. Per the conversation state docs, response objects are saved for 30 days unless you set store: false - which the docs recommend for stateless use. Stored responses give you previous_response_id chaining: you send a response ID and a new user message, and the server reconstructs the context.
The portability problem is what rides along inside those stored responses. Two features in particular make the local transcript incomplete:
Encrypted reasoning. The Responses API returns encrypted reasoning items by default. Replaying the complete output preserves them for the same provider, and models that support persisted reasoning can use reasoning.context: "all_turns". But the items are opaque to you. A different provider cannot consume them, and even you cannot inspect the actual reasoning - you can only pass the blob back unchanged. That is provider-sealed state: it works within OpenAI, it does not create a portable record.
Opaque compaction. OpenAI's compaction guide describes two modes. Server-side compaction triggers at a compact_threshold you set, and the response stream includes "the encrypted compaction item". The standalone /responses/compact endpoint returns "a new compacted context window" that the docs describe as opaque and "not intended to be human-interpretable". The docs are explicit: do not prune the output, pass it into the next call as-is. That is the definition of non-portable state - the meaning of the compaction item exists only inside OpenAI's infrastructure.
To OpenAI's credit, store: false is documented, easy, and makes the flow ZDR-friendly. The encryption can even serve a real privacy purpose: encrypted reasoning with store: false avoids persisting intermediate state on OpenAI's servers. But the encryption hides the reasoning from you as much as from the network. The Codex CLI encryption change shows the pattern applied to agents: since June 2026, Codex multi-agent v2 stores inter-agent messages as encrypted_content with the readable content field empty. An open Codex issue asking for a readable audit copy alongside encrypted delivery remains unresolved on upstream main as of July 22, 2026.
Anthropic: Readable by Default, with a Portability Catch#
Anthropic's API is stateless by default - there is no server-side conversation store to opt out of. You pass the full message history each turn, which means your client owns the transcript. On the inspection, export, and deletion tests, that is the strongest starting position of the three.
Two features complicate the picture:
Thinking signatures. Anthropic's extended thinking returns thinking blocks with a signature field - "an encrypted copy of the full reasoning that you pass back unchanged". With display: "omitted" (the default on Opus 5, Sonnet 5, and the rest of the current lineup), the readable thinking field is empty and only the signature carries the reasoning. The docs are explicit about what that means for portability: "When you switch between any two models... strip thinking and redacted_thinking blocks from prior assistant turns. Thinking blocks are tied to the model that produced them." The signature is only meaningful to Anthropic's models, and the docs tell you to delete it when switching. Your transcript preserves continuity within Anthropic, not across providers.
Readable compaction. Anthropic's server-side compaction returns a compaction block containing an actual summary - readable text you can inspect, edit, and pass to another model. The September 14, 2026 API release note expands this into on-demand Messages API compaction: send the top-level compaction parameter, receive a signed compaction block, and put that block first on later requests. This is the model the other providers should copy: compaction that preserves the provider's quality advantages without locking the meaning inside ciphertext.
The catch is fidelity. A readable summary can still omit exact constraints or promote partial observations into remembered facts. If your integration depends on compaction, treat the block as a resume note, not as the canonical ledger. Keep exact policy text, tool results, failed commands, and final receipts in your own event log.
Gemini: Stored by Default, Retrieveable but Provider-Bound#
Google's new Interactions API - the model-agnostic surface where all new Gemini features land - stores requests by default. The docs: "By default, the API stores all Interaction objects (store=true) in order to simplify use of server-side state management features." Paid-tier interactions are retained for 55 days, free-tier for 1 day. You can set store: false, but with a real tradeoff: it is incompatible with background execution and prevents previous_interaction_id continuation.
The Interactions API is actually the most transparent of the three on the state question. An interaction is "a session record, containing the entire history... as a chronological sequence of execution steps", including "model thoughts", tool calls and results, and the final output. Stored interactions can be retrieved via interactions.get and deleted programmatically. If you are inside Google's ecosystem, the audit surface is genuinely good.
The portability gap is structural rather than hidden: the canonical record lives on Google's servers. Your local copy is whatever your client logged. store: false and previous_interaction_id are mutually exclusive, so the two paths are "stateless but manually reconstructable" or "stateful but server-hosted". There is no mode where a full-fidelity transcript exists on both sides.
Where the Lock-In Actually Bites#
The theoretical concern (can I switch providers?) matters less than the practical ones, because most teams do not switch models mid-session. The Earendil essay names the scenarios where portability is not an abstraction:
- Model retirement and policy blocks. When a model is deprecated, a policy change refuses the next request, or a pricing change makes a competitor attractive, you need to move accumulated context. See our model dependency risk analysis for how quickly that scenario arrives.
- Long agent sessions. A coding or research session accumulates days of decisions. If that context can only be interpreted by one provider, the switching cost compounds with session length.
- Audit and debugging. When a subagent changes the wrong file or a research agent cites bad evidence, the question is "what was that agent actually asked to do?" With encrypted inter-agent messages, the answer is not in your logs. This is exactly the agent receipts problem: work without a readable trail is work you cannot verify.
- Cost routing. Teams now route between models per task - see our routing strategies. Routing is much easier when the transcript survives the handoff.
The Portability Checklist for Your Integration#
Whatever provider you standardize on, you can improve your position with five practices:
- Set
store: falsewhere you do not need server state. OpenAI and Gemini both document it; it is the single biggest control you have. OpenAI's docs note that server-side compaction is ZDR-friendly when you also passstore: false. - Keep the local event log canonical. Record user messages, assistant text, tool calls, and tool results yourself, and treat the provider's IDs as acceleration, not as your record.
- Ask for readable handoffs. When a provider offers opaque compaction (OpenAI) or sealed thinking (both closed providers), log what you actually know: the visible text, the summaries, the citations. A summary you can read beats a blob you cannot.
- Strip thinking blocks on model switches. Anthropic's docs require it. If you move a conversation to a different model, remove prior thinking blocks rather than passing ciphertext around.
- Pin non-negotiable state outside compaction. Exact safety rules, tool approvals, deployment proofs, and command exits should live in files, traces, or database rows that the agent can cite after compaction.
- Plan deletion. Know where each provider stores your data and how to remove it - OpenAI's 30-day TTL, Gemini's 55-day window, and the deletion APIs for both.
When Portability Is Not Worth the Complexity#
The honest counterargument: for most teams, most of the time, provider-sealed state is a fair trade. Stored conversations reduce payloads, encrypted reasoning is a genuine ZDR benefit, and server-side compaction lowers latency and cost. The Earendil essay's own framing is careful - it does not object to stateful APIs, only to "better performance being coupled to less user control."
Skip the portability work if you are a solo developer with short sessions, no compliance requirements, and no plan to switch providers. The overhead of maintaining a full local event log is real. Add it when sessions get long, when you route between models, or when anyone will ever ask you "what did the agent do and why?"
Frequently Asked Questions#
What is session portability in AI APIs?#
Session portability is the ability to take the record of a conversation - messages, tool calls, reasoning, and state - from one provider and continue it with another model or in another system. A portable session can be inspected, exported, replayed, audited, and deleted without the original provider dereferencing internal IDs or decrypting sealed state.
Does OpenAI store my API conversations?#
By default, yes. Responses API response objects are saved for 30 days and can be viewed in dashboard logs or retrieved via the API. Setting store: false on your requests disables storage. Conversations API objects are not subject to the 30-day TTL.
Does Gemini store my API conversations?#
Yes, by default. The Interactions API stores all interaction objects (store: true default) - 55 days on the paid tier, 1 day on the free tier. Setting store: false opts out but is incompatible with background execution and previous_interaction_id continuation.
Does Anthropic store my API conversations?#
No. The Anthropic API is stateless by default - you pass the full message history with each request and there is no server-side conversation store. However, thinking blocks carry an encrypted signature field that must be passed back unchanged and must be stripped when switching models, which limits cross-provider portability.
Can I move a session from OpenAI to Anthropic?#
Partially. If you kept the visible text, tool calls, and results (which store: false chaining encourages), another model can understand and continue the conversation. What does not transfer is encrypted reasoning items and opaque compaction state, whose meaning only exists inside OpenAI's infrastructure. Anthropic's docs also require stripping thinking blocks when switching models, so the reverse direction has its own caveat.
What is the portable alternative to encrypted compaction?#
Anthropic's compaction block is the reference design: server-side summarization that returns a readable summary you can inspect, edit, and pass to any model. OpenAI's compaction returns an opaque encrypted item that the docs explicitly say is not human-interpretable. If portability matters, prefer providers and configurations that give you readable summaries over sealed blobs.
Does readable compaction make long agent sessions safe?#
No. It makes long sessions easier to resume and inspect, but it is still lossy. Keep exact requirements, tool results, command exits, and final verification receipts outside the compaction summary. Use the summary to resume, then use the ledger to prove what happened.
Official Sources#
| Source | What it verifies | Last verified |
|---|---|---|
| OpenAI conversation state guide | 30-day response storage, store: false, encrypted reasoning, previous_response_id | July 31, 2026 |
| OpenAI compaction guide | Server-side and standalone compaction, opaque encrypted compaction item | July 31, 2026 |
| Anthropic extended thinking docs | signature field, display: "omitted" default, strip-on-model-switch rule | July 31, 2026 |
| Anthropic compaction docs | Readable compaction block, default summarization prompt, pause_after_compaction | July 31, 2026 |
| Anthropic Platform release notes | September 14, 2026 Messages API on-demand compaction beta with compact-2026-09-04 | September 17, 2026 |
| Gemini Interactions API docs | store: true default, 55-day/1-day retention, store: false tradeoffs | July 31, 2026 |
| Codex issue #28058 | Encrypted multi-agent v2 messages, missing readable audit trail, open status | July 31, 2026 |
| Earendil: The Session You Cannot Take With You | The five-test portability framework, HN front page July 30-31, 2026 | July 31, 2026 |
| The Compaction Cliff in Long-Running AI Agent Memory | Compaction can erase exact safety rules across rounds | September 17, 2026 |
| Compaction as Epistemic Failure | Compaction summaries can preserve false completion claims | September 17, 2026 |
Continue Reading#
- Codex Now Encrypts Multi-Agent Prompts - the Codex-side story of sealed subagent messages
- Terminal Agents Are the New Developer Runtime - why the runtime surface matters more than the model brand
- Agent Memory as a Context Ledger - what survives a session, and how to keep it auditable
- Agent Replays with TraceTrail - reconstructing what an agent did after the fact
- OpenAI API Control Plane June 2026 - the stateful API surface around Responses
- The 98% Context Reduction Pattern - what belongs outside the prompt before compaction
- Claude Code Idle Compaction: What It Does and How to Turn It Off - the Claude Code idle timer that compacts before the cache expires
- Claude vs ChatGPT - how the two assistants compare for developers
- Claude vs Gemini - the other head-to-head this portability question touches
Sources#
- Earendil: The Session You Cannot Take With You (accessed July 31, 2026)
- OpenAI conversation state guide (accessed July 31, 2026)
- OpenAI compaction guide (accessed July 31, 2026)
- Anthropic extended thinking docs (accessed July 31, 2026)
- Anthropic compaction docs (accessed July 31, 2026)
- Anthropic Platform release notes (accessed September 17, 2026)
- Gemini Interactions API docs (accessed July 31, 2026)
- Codex issue #28058: encrypted MultiAgentV2 messages remove readable task audit trail (accessed July 31, 2026)
- Codex PR #26210: Encrypt multi-agent v2 message payloads (merged June 5, 2026)
- Hacker News discussion: The Session You Cannot Take With You (729 points, July 31, 2026)
- The Compaction Cliff in Long-Running AI Agent Memory (accessed September 17, 2026)
- Compaction as Epistemic Failure: How Agentic LLM Tools Fabricate Confirmed Results from Killed Processes (accessed September 17, 2026)
Get the next comparison like this in your inbox
One email a week on comparison and the rest of the AI dev stack. Free.
Read next on Claude Code
Codex Now Encrypts Multi-Agent Prompts, Breaking Local Auditability
OpenAI's Codex CLI now encrypts inter-agent communications for Sol and Terra models, leaving users unable to inspect what their agents are actually doing.
5 min readTerminal Agents Are the New Developer Runtime
Terminal agents like Claude Code, Codex CLI and OpenCode are converging on one runtime layer: permissions, sandboxing, rollback, receipts and cost controls.
9 min readAI Agent Memory Needs a Context Ledger
AI agent memory works best as a context ledger: source-linked, scoped, expiring memory that agents can inspect and users can audit, not magic recall.
8 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.











