Resuming Claude Code After /compact on an Aggregator Key: What Survives Across Backends
Learn what survives when you resume Claude Code after /compact using an aggregator API key. Understand how context compaction interacts with backend model switches, and get practical steps to avoid losing critical information across different providers.
What /compact Actually Does
In Claude Code, /compact summarizes the conversation to reduce token usage while preserving key context. The goal is to keep essential information—task state, recent decisions, code changes—so you can continue working without hitting context limits.
When you use an aggregator API key, the conversation history and compaction summary are sent to whichever backend model handles the request. This is where things get interesting: the summary is not tied to a specific model, but different backends may interpret or prioritize it differently.
What Survives Across Backends
The compacted summary itself is preserved as part of the conversation payload. It is model-agnostic text, so it will be sent to any backend you route to. However, what the new model does with that summary depends on its training and capabilities.
- Task state and instructions generally survive well because they are explicit in the summary.
- Nuanced context (e.g., implicit assumptions, tone, or subtle code patterns) may be interpreted differently by different models.
- Tool call history is usually condensed into the summary; specific parameters or intermediate results may be lost unless explicitly mentioned.
- System prompts and custom instructions are typically preserved separately and applied per backend, but their effect can vary.
How Aggregator Keys Affect Resumption
An aggregator key routes requests to multiple backends (Claude, GPT, DeepSeek, etc.) based on your configuration. When you resume after /compact, the same key can direct the request to a different model than before. The compacted summary travels with the request, but the new model’s behavior may differ.
- Model switching can happen automatically if your routing rules change or if a backend is unavailable. The summary is still there, but the new model might not infer missing details the same way.
- Token limits differ across backends; a summary that fits one model’s context window might be truncated or expanded by another.
- Price multipliers apply per request (you pay official price × 1.3), but this does not affect what survives—only your cost.
Best Practices for Reliable Resumption
To minimize surprises when resuming after compaction with an aggregator key:
- Keep summaries explicit: Before compacting, restate key decisions and pending tasks in clear, model-agnostic language.
- Pin your backend: If you need consistent behavior, configure your aggregator to route to the same model for the entire session.
- Include a context recap: After resuming, start with a brief recap of what you expect the model to know, especially if you switched backends.
- Test with small tasks: When switching backends mid-task, verify the model’s understanding with a quick check before proceeding.
What Doesn’t Survive (and Why)
Some elements are inherently fragile across backends:
- Model-specific formatting: Output styles or tokenization quirks specific to one model may not carry over.
- Implicit memory: Some models maintain internal state within a single session; switching backends resets this.
- Exact tool outputs: Long tool results are summarized; if the new model needs precise data, re-fetch or clarify.
Practical Workflow
- Use
/compactas usual to reduce context. - Verify the summary includes all critical instructions and task state.
- If you plan to switch backends, explicitly note the switch in your next message and restate any assumptions.
- Monitor the model’s responses for signs of missing context; correct early.
By understanding what survives and what doesn’t, you can use aggregator keys with confidence, even when resuming after compaction across different backends.