Skip to content

[Bug]: CLI sessions: Gemini CLI not covered by Claude CLI session persistence fixes (#69679 / #70106 / #70132) — gateway restart still mints a fresh conversation #70973

Description

@poetmiku

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Three fixes in v2026.4.22 restored CLI session continuity across gateway restarts — but all three are scoped to claude-cli only:

The same regression still affects google-gemini-cli: after any launchctl unload && load (or openclaw gateway restart), the next request to a gemini-cli-backed agent starts a brand-new conversation with no memory of prior turns. Before ~v2026.4.21 this worked transparently.

Steps to reproduce

  1. Have an ongoing multi-turn conversation with a gemini-cli-backed agent over Discord or Telegram.
  2. Restart the gateway (launchctl unload ~/Library/LaunchAgents/ai.openclaw.gateway.plist && launchctl load ~/Library/LaunchAgents/ai.openclaw.gateway.plist).
  3. Send the next message from the same channel/DM.

Expected behavior

agent resumes the stored session, still remembers prior turns.

Actual behavior

agent responds as if it has never met the user before. Prior session file under ~/.openclaw/agents/<agentId>/sessions/ is not resumed; a new session id is minted.

OpenClaw version

2026.4.22

Operating system

macOS 26.3.1

Install method

No response

Model

google-gemini-cli/gemini-3-pro-preview", "google-gemini-cli/gemini-3.1-pro-preview"

Provider / routing chain

openclaw -> google-gemini-cli -> gemini-3.1-pro-preview

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions