Repository: google-gemini/gemini-cli (TypeScript)

Issue:
If I save a chat when signed in with an API key and then try to load it when signed in with my gmail account, I get fatal errors when I try to enter another prompt.
### What happened?

Enter a conversation. Can be as trivial as
`1+1`
`/chat save add`
`/auth`
`/chat resume add`
Now if you type anything in the chat you get the following fatal errors:

```╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Debug Console (ctrl+o to close)                                                                                                                                          │
│                                                                                                                                                                          │
│ ℹ  Loaded cached credentials.                                                                                                                                            │
│ ℹ  Authenticated via "oauth-personal".                                                                                                                                   │
│ ✖  Attempt 1 failed with 5xx error. Retrying with backoff... GaxiosError: {                                                                                              │
│      "error": {                                                                                                                                                          │
│        "code": 400,                                                                                                                                                      │
│        "message": "Request contains an invalid argument.",                                                                                                               │
│        "status": "INVALID_ARGUMENT",                                                                                                                                     │
│        "details": [                                                                                                                                                      │
│          {                                                                                                                                                               │
│            "@type": "type.googleapis.com/google.rpc.DebugInfo",                                                                                                          │
│            "detail": "[ORIGINAL ERROR] generic::invalid_argument: streamClient.Recv(): generic::invalid_argument: decryption failed 525003295 { 1 { 1 { 1 { 1:           │
│    \"blade:cloud.ai.nl.llm.proto.service.languagemodelservice-prod-us-central1\" 2: \"LanguageModelService\" 3: \"StreamGenerateMultiModal\" } 2 { 1: 3 2: \"generic\"   │
│    3: \"decryption failed\" } 3 { 1: 1 3 { 1: 1753914103 2: 679194739 } } 5: 1753914103679069 6: 5328 8: 1 9: 1 } 2: \"PredictionServiceV1\" 3:                          │
│    \"StreamGenerateContent\" } }"                                                                                                                                        │
│          }                                                                                                                                                               │
│        ]                                                                                                                                                                 │
│      }                                                                                                                                                                   │
│    }                                                                                                                                                                     │
│                                                                                                                                                                          │
│        at Gaxios._request (/Users/jacobr/git/review/gemini-cli-review/node_modules/google-auth-library/node_modules/gaxios/build/src/gaxios.js:142:23)                   │
│        at process.processTicksAndRejections (node:internal/process/task_queues:105:5)                                                                                    │
│        at async OAuth2Client.requestAsync (/Users/jacobr/git/review/gemini-cli-review/node_modules/google-auth-library/build/src/auth/oauth2client.js:429:18)            │
│        at async CodeAssistServer.requestStreamingPost (file:///Users/jacobr/git/review/gemini-cli-review/packages/core/dist/src/code_assist/server.js:82:21)             │
│        at async CodeAssistServer.generateContentStream (file:///Users/jacobr/git/review/gemini-cli-review/packages/core/dist/src/code_assist/server.js:24:23)            │
│        at async retryWithBackoff (file:///Users/jacobr/git/review/gemini-cli-review/packages/core/dist/src/utils/retry.js:62:20)                                         │
│        at async GeminiChat.sendMessageStream (file:///Users/jacobr/git/review/gemini-cli-review/packages/core/dist/src/core/geminiChat.js:299:36)                        │
│        at async Turn.run (file:///Users/jacobr/git/review/gemini-cli-review/packages/core/dist/src/core/turn.js:38:36)                                                   │
│        at async GeminiClient.sendMessageStream (file:///Users/jacobr/git/review/gemini-cli-review/packages/core/dist/src/core/client.js:276:26)                          │
│        at async file:///Users/jacobr/git/review/gemini-cli-review/packages/cli/dist/src/ui/hooks/useGeminiStream.js:328:26 {                                             │
│      config: {                                                                                                                                                           │
│        url: 'https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse',                                                                              │
│        method: 'POST',                                                                                                                                                   │
│        params: { alt: 'sse' },                                                                                                                                           │
│        headers: {                                                                                                                                                        │
│          'Content-Type': 'application/json',                                                                                                                             │
│          'User-Agent': 'GeminiCLI/0.1.15 (darwin; arm64)',                                                                                                               │
│          Authorization: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.'                                                                       │
│        },                                                                                                                                                                │
│        responseType: 'stream',                                                                                                                                           │
│        body: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.',                                                                                 │
│        signal: AbortSignal { aborted: false },                                                                                                                           │
│        paramsSerializer: [Function: paramsSerializer],                                                                                                                   │
│        validateStatus: [Function: validateStatus],                                                                                                                       │
│        errorRedactor: [Function: defaultErrorRedactor]                                                                                                                   │
│      },                                                                                                                                                                  │
│      response: {                                                                                                                                                         │
│        config: {                                                                                                                                                         │
│          url: 'https://cloudcode-pa.googleapis.com/v1internal:streamGenerateContent?alt=sse',                                                                            │
│          method: 'POST',                                                                                                                                                 │
│          params: [Object],                                                                                                                                               │
│          headers: [Object],                                                                                                                                              │
│          responseType: 'stream',                                                                                                                                         │
│          body: '<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.',                                                                               │
│          signal: [AbortSignal],                                                                                                                                          │
│          paramsSerializer: [Function: paramsSerializer],                                                                                                                 │
│          validateStatus: [Function: validateStatus],                                                                                                                     │
│          errorRedactor: [Function: defaultErrorRedactor]                                                                                                                 │
│        },                                                                                                                                                                │
│        data: '{\n' +                                                                                                                                                     │
│          '  "error": {\n' +                                                                                                                                              │
```

### What did you expect to happen?

Expected to be able to resume the chat even after switching auth modes.

### Client information

<details>

╭───────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                               │
│ About Gemini CLI                                                                              │
│                                                                                               │
│ CLI Version                     0.1.14                                                        │
│ Git Commit                      de968877 (local modifications)                                │
│ Model                           gemini-2.5-pro                                                │
│ Sandbox                         no sandbox                                                    │
│ OS                              darwin                                                        │
│ Auth Method                     gemini-api-key                                                │
│                                                                                               │
╰───────────────────────────────────────────────────────────────────────────────────────────────╯
</details>


### Login information

_No response_

### Anything else we need to know?

_No response_



Fix (patch):
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index c36340db11a..350df660d2a 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -393,9 +393,9 @@ export const useSlashCommandProcessor = (
                     }
                   }
                 case 'load_history': {
-                  await config
+                  config
                     ?.getGeminiClient()
-                    ?.setHistory(result.clientHistory);
+                    ?.setHistory(result.clientHistory, { stripThoughts: true });
                   fullCommandContext.ui.clear();
                   result.history.forEach((item, index) => {
                     fullCommandContext.ui.addItem(item, index);