## Background
Following my previous report about ephemeral token resumption consuming uses, I worked around that issue by setting uses=5. However, I discovered another potential issue: session resumption does not seem to preserve conversation context when using ephemeral tokens.
## Question
Is this expected behavior, or should conversation context be preserved when resuming a session with ephemeral tokens?
## Documentation References
The Vertex AI documentation (“Start and manage live sessions”) states:
“Session resumption maintains the conversation context by storing cached data, including text, video, audio prompts, and model outputs”
“the server then restores the previous context, allowing the conversation to continue seamlessly”
The Ephemeral tokens documentation states:
“Within the expireTime timeframe, you’ll need sessionResumption to reconnect the call every 10 minutes (this can be done with the same token even if uses: 1)”
However, neither document clarifies whether conversation context is preserved when combining ephemeral tokens with session resumption.
## Test Results
I tested session resumption with both direct API key and ephemeral token
| Method | Handle Received | Reconnection | Context Preserved |
|---|---|---|---|
| Direct API Key | |||
| Ephemeral Token |
### Test Procedure
- Connect with
sessionResumption: {} - Send message: “Remember this number: 123”
- Wait for AI response and
sessionResumptionUpdatewith handle - Close connection
- Reconnect with
sessionResumption: { handle: savedHandle } - Ask: “What number did I ask you to remember?”
### Results
- Direct API Key: AI correctly responds “123”

- Ephemeral Token: AI responds “I don’t have any record of you asking me to remember a number”

I ran multiple tests to confirm:
Direct API Key:
Test 1: 20 → AI recalled: “20” ✅
Test 2: 383 → AI recalled: “383” ✅
Test 3: 853 → AI recalled: “853” ✅
Ephemeral Token:
Test 1: 489 → “I don’t have any record…” ❌
Test 2: 840 → “I don’t have any record…” ❌
Test 3: 443 → “I don’t recall being asked…” ❌
## Environment
- OS: macOS 15.6
- Node: v22.18.0
- SDK: @google/genai 1.35.0
- Model: gemini-2.5-flash-native-audio-preview-12-2025
- API Version: v1alpha
## Reproduction Code
### Ephemeral Token Creation (Server-side)
const tokenResponse = await ai.authTokens.create({
config: {
expireTime: new Date(Date.now() + 30 * 60 * 1000).toISOString(),
newSessionExpireTime: new Date(Date.now() + 30 * 60 * 1000).toISOString(),
uses: 5,
liveConnectConstraints: {
model: ‘gemini-2.5-flash-native-audio-preview-12-2025’,
config: {
responseModalities: [Modality.AUDIO],
outputAudioTranscription: {},
sessionResumption: {},
},
},
},
});
### Connection with Resumption (Client-side)
const clientAi = new GoogleGenAI({
apiKey: ephemeralToken,
httpOptions: { apiVersion: ‘v1alpha’ },
});
// First connection
const session1 = await clientAi.live.connect({
model: ‘gemini-2.5-flash-native-audio-preview-12-2025’,
config: { sessionResumption: {} },
callbacks: {
onmessage: (msg) => {
if (msg.sessionResumptionUpdate?.newHandle) {
savedHandle = msg.sessionResumptionUpdate.newHandle;
// Handle IS received successfully
}
},
},
});
session1.sendClientContent({
turns: [{ role: ‘user’, parts: [{ text: ‘Remember: 123’ }] }],
turnComplete: true,
});
// AI responds: “OK, I will remember 123”
session1.close();
// Reconnect with handle
const session2 = await clientAi.live.connect({
model: ‘gemini-2.5-flash-native-audio-preview-12-2025’,
config: { sessionResumption: { handle: savedHandle } },
});
session2.sendClientContent({
turns: [{ role: ‘user’, parts: [{ text: ‘What number did I ask you to remember?’ }] }],
turnComplete: true,
});
// AI responds: “I don’t have any record of you asking me to remember a number”
// ❌ Context is lost
## Observation
After reconnection with ephemeral token, the sessionResumptionUpdate message shows:
{ hasNewHandle: false, resumable: undefined }
This differs from the initial connection which returns { newHandle: ‘…’, resumable: true }.
## Questions
- Is conversation context preservation supported when using ephemeral tokens with session resumption?
- If not, could this limitation be documented?
- If this is a bug, is there a timeline for a fix?
- Is there a recommended workaround for maintaining context with ephemeral tokens?
Thank you!