Gemini CLI v0.65 enforces read-only settings in untrusted folders and adds OTLP headers

Gemini CLI Published:

Only one of the 27 entries in v0.65.0 is a feature, custom OTLP headers. The rest covers untrusted folder settings, eager reads for @ references, and session resume fixes.

Verified on Oct 23, 2026 Verified with Gemini CLI v0.65.0 These tools change quickly. Please also check the latest official documentation. How articles are researched and verified
Contents
  1. Untrusted folder settings are enforced as read-only
  2. The only new feature is custom OTLP headers
  3. Session resume and authentication fixes
  4. @ references and ignore-file performance
  5. Summary

Gemini CLI v0.65.0 carries 27 changes, but only one is a feature: the telemetry OTLP exporter now accepts custom headers. The rest is 25 fixes and one performance change.

As in the previous release, untrusted folder handling and @ references both got attention. Those are the same two areas v0.64.0 touched, so this is the second release in a row working on them.

KEY POINT

What this article covers

  • Workspace settings in an untrusted folder are now enforced as read-only
  • How to write otlpHeaders, the release's only new feature
  • Fixes around session resume, OAuth and @ references

Untrusted folder settings are enforced as read-only

PR #29583 makes workspace settings read-only in a folder you have not trusted.

Folder trust exists to stop an unvetted project from loading its own configuration. Per the documentation, an untrusted folder does not load .gemini/settings.json or .env, cannot install or update extensions, disables tool auto-acceptance, and does not connect to MCP servers.

v0.64.0 fixed headless mode treating an untrusted folder as trusted. This release continues that work by closing the write side. If your CI depends on the feature, v0.65.0 is the version that has both. For the previous release, see Gemini CLI v0.64 fixes the CPU hang on @ inside code.

Relatedly, PR #29672 removes false positives from the untrusted command flag and compound loop checks — the case where the check erred so far toward caution that ordinary commands were caught by it.

The only new feature is custom OTLP headers

PR #29641 adds otlpHeaders to the telemetry settings, so you can attach arbitrary headers to OTLP exporter requests. That is what you need when the collector you send to requires an authentication header.

{
  "telemetry": {
    "enabled": true,
    "target": "local",
    "otlpEndpoint": "http://localhost:4317",
    "otlpProtocol": "grpc",
    "otlpHeaders": {
      "x-api-key": "your-key"
    }
  }
}

The documentation's settings table defines it as:

SettingEnvironment variableValuesDefault
otlpHeadersGEMINI_TELEMETRY_OTLP_HEADERSJSON or key=valuenone

Because the environment variable works too, a CI job can pass the key from its own secret store instead of a settings file.

A key written into the header stays in the settings file

Putting an API key directly in otlpHeaders leaves it in .gemini/settings.json. If you commit that file, pass the value through GEMINI_TELEMETRY_OTLP_HEADERS instead.

Session resume and authentication fixes

Six fixes address losing work or failing to sign in.

PRWhat it fixes
#29584A resumed session's history being deleted on a quick exit (Issue #29198)
#29618Duplicate tool response turns when resuming a session
#29728Session poisoning on a rapid Ctrl-C interruption
#29655Infinite verification and OAuth retry loops
#29643Cached credentials now cleared when Google login is re-selected
#29616OAuth callback iss validation aligned with RFC 9207 metadata

#29584 and #29728 are the kind of bug that costs you work. If you routinely resume long sessions, they are the reason to upgrade.

@ references and ignore-file performance

PR #29617 stops the eager recursive file reading that @ references triggered, so pointing at a directory with @src/ no longer pulls in its contents unconditionally.

v0.64.0 fixed the CPU hang on code containing @, so @ handling has now been worked on in two consecutive releases.

On performance, PR #29582 optimises ignore filtering and enables subtree pruning (Issue #29077), which helps when file discovery is slow in a large repository.

Also fixed: the Enter key hanging in interactive mode (PR #29476, Issue #23297), one extension failing the allowlist check preventing the others from loading (PR #29720), and unnecessary terminal clears when expanding with Ctrl+O (PR #29640). For MCP configuration, see Setting up MCP servers in Gemini CLI.

Summary

  • Of 27 entries in v0.65.0, one is a feature, one is performance, and 25 are fixes and release work
  • Workspace settings in an untrusted folder are now enforced as read-only
  • The feature is telemetry.otlpHeaders, also settable via GEMINI_TELEMETRY_OTLP_HEADERS
  • Resumed session history loss and session poisoning on rapid Ctrl-C are fixed
  • @ references no longer read recursively ahead of time, continuing v0.64's @ work

FAQ

What is new in v0.65.0?
One entry out of 27 is a feature: the telemetry OTLP exporter now accepts custom headers. Everything else is a fix, a performance change or release work.
Where do custom OTLP headers go?
Set otlpHeaders inside the telemetry object in .gemini/settings.json. The environment variable GEMINI_TELEMETRY_OTLP_HEADERS works too, and both accept JSON or key=value.
Should I take v0.64 or v0.65 first?
Both are mostly fixes, so going straight to v0.65.0 is simplest. v0.64.0 fixed the CPU hang on code containing @, and v0.65.0 fixes untrusted folders and session resume.

Primary sources

This article was drafted by AI from official documentation and reviewed by the site operator before publishing. Found a mistake? Let us know via the contact page.