Gemini CLI v0.63.0 caps memory in long agent runs

1 month ago

Gemini CLI v0.63.0 caps stored tool output and compresses chat history sooner in long agent runs, ends the endless sign-in loop on Windows, WSL and headless Linux, shows retries in the spinner, lets Plan Mode finish headless runs, and fixes git diff in the sandbox, MCP server enablement and ACP session reloads.

Ask about this presentation

Chapters

  1. 0:00Gemini CLI v0.63.0
  2. 0:1501: Long agent runs
  3. 0:17Chat compression starts at 512 KB of history
  4. 0:30Older tool turns shrink to 2 KB summaries
  5. 0:4202: Sign-in and retries
  6. 0:44The endless sign-in loop on Windows, WSL and headless machines is fixed
  7. 0:59WSL and display-less Linux store tokens in an encrypted file
  8. 1:12The spinner shows retries during rate limits and outages
  9. 1:2403: Headless runs
  10. 1:26Plan Mode carries out its plan in headless runs
  11. 1:36Headless runs deny what they would have asked you about
  12. 1:4904: Tools and config
  13. 1:51git diff runs inside the sandbox again
  14. 2:04Disabled MCP servers stay off when their config file is broken
  15. 2:17Keys typed during startup reach the prompt
  16. 2:28The shell and tool output get three smaller fixes
  17. 2:4305: Editor sessions
  18. 2:44Editors on ACP can reload a session started the same minute
  19. 2:56Every fix, with its pull request, is in the v0.63.0 release notes
Show transcript
  1. Gemini CLI v0.63.0 caps memory in long agent runs. Tool output used to go into session history in full. Now each stored result stops at 64 kilobytes, with a note on how much was cut.

    Slide text
    Gemini CLI

    Gemini CLI v0.63.0 caps memory in long agent runs

    Each tool result is stored at 64 KB at most.

    Gemini CLI running in a terminal
    packages/core/src/utils/constants.ts
  2. Long agent runs.

    Slide text
    > long agent runs 2026-10-06
    01
    Long agent runs
  3. Chat compression used to wait until history filled a share of the model's context window. It now also kicks in once history passes 512 kilobytes or about 50,000 tokens, whichever comes first.

    Slide text
    > long agent runs 2026-10-06
    compress at a share of the context window also at 512 KB or 50,000 tokens
    packages/core/src/context/chatCompressionService.ts
  4. Finished tool turns from earlier in a session now collapse to 2 kilobyte summaries, while the turn in progress keeps everything. Exited shell processes also release their output buffers.

    Slide text
    > long agent runs 2026-10-06
    finished turns: 2 KB summary current turn: full output exited shell processes release their streams
    packages/core/src/agents/local-executor.ts
  5. Sign-in and retries.

    Slide text
    > sign-in and retries 2026-10-06
    02
    Sign-in and retries
  6. On Windows, WSL and headless machines, Gemini CLI could ask you to sign in over and over. Credentials and settings are now written atomically, so the Gemini Code Assist extension for VS Code can't collide mid-write.

    Slide text
    > sign-in and retries 2026-10-06
    sign in, relaunch, sign in again credentials and settings written atomically read retries on Windows file locks
    packages/core/src/code_assist/oauth2.ts
  7. On WSL, or a Linux machine without a display, the system keyring can deadlock. Gemini CLI now detects that setup and keeps your tokens in an encrypted file in your Gemini folder.

    Slide text
    > sign-in and retries 2026-10-06
    libsecret keyring locks up ~/.gemini/token-storage.json
    packages/core/src/services/keychainService.ts
  8. On a rate limit or an overloaded server, the spinner stayed on Thinking. With full error verbosity it now names the model and the attempt, like two of five. Low verbosity shows a shorter hint.

    Slide text
    > sign-in and retries 2026-10-06
    Thinking... Trying to reach gemini-2.5-flash (Attempt 2/5) low error verbosity: a generic retry hint
    packages/cli/src/ui/components/LoadingIndicator.tsx
  9. Headless runs.

    Slide text
    > headless runs 2026-10-06
    03
    Headless runs
  10. In a headless run, Plan Mode used to stop and wait for your agreement, made zero tool calls, and ended. Now it picks a strategy, drafts the plan and carries it out.

    Slide text
    > headless runs 2026-10-06
    gemini -p "…" -y stop and wait for agreement, 0 tool calls, exit draft the plan, then implement it
    packages/core/src/prompts/snippets.ts
  11. In a headless run, a policy rule that would ask you now denies. MCP resources and web search results get the same untrusted wrapping as web fetch, and redirection rules match in every approval mode.

    Slide text
    > headless runs 2026-10-06
    > ask-user policy decisions become deny > MCP resources and web search marked untrusted > redirection rules match in every approval mode
    packages/core/src/policy/policy-engine.ts
  12. Tools and config.

    Slide text
    > tools and config 2026-10-06
    04
    Tools and config
  13. Inside the execution sandbox, git diff failed with a cannot run error. An empty diff.external setting made git try to launch a program with no name. That override is gone, and diffs work again.

    Slide text
    > tools and config 2026-10-06
    error: cannot run : No such file or directory empty diff.external override removed
    packages/core/src/utils/gitUtils.ts
  14. If the file listing your disabled MCP servers had a JSON error, those servers came back on. Now they stay disabled, Gemini CLI tells you the file is malformed, and it won't overwrite your entries.

    Slide text
    > tools and config 2026-10-06
    malformed JSON: disabled servers turned back on malformed JSON: servers stay disabled the file is left untouched until you fix it
    packages/cli/src/config/mcp/mcpServerEnablement.ts
  15. Keys you typed while Gemini CLI was starting could vanish while it probed your terminal. Standard input now pauses after that check and resumes as soon as the prompt starts listening.

    Slide text
    > tools and config 2026-10-06
    terminal detection swallows early keystrokes input pauses, then resumes when the prompt mounts
    packages/cli/src/ui/utils/terminalCapabilityManager.ts
  16. Background shell commands now delete their temp folders on exit. A truncation limit of zero or less turns truncation off instead of inflating output. And extension update checks can't stop to ask for git credentials.

    Slide text
    > tools and config 2026-10-06
    > background commands delete their gemini-shell-* temp folders > a truncation limit of 0 or less turns truncation off > extension update checks never prompt for git credentials
    core/src/tools/shell.ts · core/src/utils/fileUtils.ts · core/src/utils/gitUtils.ts
  17. Editor sessions.

    Slide text
    > editor sessions 2026-10-06
    05
    Editor sessions
  18. Editors that drive Gemini CLI over ACP could fail to reload a session from the same minute. Session files now get unique names, and the session is located before setup runs.

    Slide text
    > editor sessions 2026-10-06
    No previous sessions found for this project unique session file names, session resolved first
    packages/cli/src/acp/acpSessionManager.ts
  19. The Gemini CLI v0.63.0 release notes on GitHub list every fix with a link to its pull request.

    Slide text
    > gemini cli v0.63.0 2026-10-06
    Gemini CLI v0.63.0 release notes on GitHub github.com/google-gemini/gemini-cli/releases
    github.com/google-gemini/gemini-cli/releases/tag/v0.63.0

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York