Files
gemini-cli/packages/core
Jerop Kipruto bdc78795ad fix(plan): ensure sessionId is always present for plans storage
The Plan Mode security policy expects a consistent two-level subdirectory structure after tmp/ (~/.gemini/tmp/<project>/<session-id>/plans/). Previously, Storage allowed sessionId to be optional, which resulted in a one-level structure (~/.gemini/tmp/<project>/plans/) when missing, causing the Policy Engine to deny write operations.

This change enforces sessionId in the Storage constructor (defaulting to the process-wide sessionId) and ensures the Storage instance is updated when a session is resumed via Config.setSessionId(). This guarantees that generated paths always match the policy's regular expression, even across session restarts.

Fixes https://github.com/google-gemini/gemini-cli/issues/21359
2026-03-05 22:12:39 -05:00
..