Your provider now offers server-side compaction and stateful message threads. When would you use them instead of managing context yourself, and what do you give up in portability, auditability and the ability to switch models?
Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.
Model answer: the part to lead with
Providers have been moving context management server-side. As of late 2026, Anthropic offers compaction on demand (beta), which returns a signed compaction block you send in place of the summarised messages, and message threads (beta), which keep the conversation on the server and expire it 5 minutes after the last request. Thinking blocks are now preserved only for the model that produced them or a newer one. OpenAI's Agents API (beta) is a managed harness that handles session orchestration, compaction and recovery for you. Check current docs, since these are beta and move fast.
Full worked answer
Providers have been moving context management server-side. As of late 2026, Anthropic offers compaction on demand (beta), which returns a signed compaction block you send in place of the summarised messages, and message threads (beta), which keep the conversation on the server and expire it 5 minutes after the last request. Thinking blocks are now preserved only for the model that produced them or a newer one. OpenAI's Agents API (beta) is a managed harness that handles session orchestration, compaction and recovery for you. Check current docs, since these are beta and move fast.
When server-side wins:
- You are committed to one provider for this workload, and the provider's compactor is tuned to its own model in ways yours will not be.
- Long histories make resending the full context a real latency and bandwidth cost.
- A small team would rather not own compaction quality, cache alignment and recovery logic.
What you give up:
- Portability. A signed compaction block is meant to be returned unchanged to the same provider. You cannot hand it to another provider's model, and bound thinking blocks mean even a model switch within a provider can lose state. Mid-run failover to a different model now needs your own reconstruction of the context.
- Auditability. For a regulated replay you need to show what the model saw. If the provider held or rewrote the state, your logs must capture enough to reconstruct it, or you have a gap.
- Control over what survives. You cannot pin a constraint, enforce a summary schema, or validate the summary against injection before the next turn trusts it.
- Durability. A thread that expires after 5 minutes of inactivity is a hot cache, not a store. Anything long-running still needs your own durable state.
- Deprecation risk. Managed state ties you to the product's lifecycle. OpenAI's Assistants API, an earlier stateful design, shut down in August 2026, and teams that kept no state of their own had a migration on their hands.
The pattern I would use. Keep your own append-only event log as the system of record: every message, tool call and result, model version and config. Treat provider-side compaction and threads as an accelerator on top. Then you can rebuild a context from your log with your own compactor whenever you switch models, fail over, or need to replay, and you only pay that cost when it happens.
Decide on two questions: is cross-provider or cross-model failover a hard requirement, and do you need to replay exactly what the model saw? If either is yes, you own the state and use server features only as an optimisation.
What a good answer covers
- Providers have been moving context management server-side
- As of late 2026, Anthropic offers compaction on demand (beta), which returns a signed compaction block…
- Thinking blocks are now preserved only for the model that produced them or a newer one
- OpenAI's Agents API (beta) is a managed harness that handles session orchestration, compaction and…
- Check current docs, since these are beta and move fast
Key terms: When server-side wins · What you give up · Portability · Auditability · Control over what survives · Durability · Deprecation risk · The pattern I would use
In the glossary: Compaction · Alignment · Tool call
Interviewer follow-ups to expect
How would you test that your own compactor is good enough to fail over to mid-task?
What would you log so a server-held thread can be reconstructed for an audit?
Does server-side compaction change how you design for prompt cache hits?
Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep