gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Bug: Migration map typo for `loadMemoryFromIncludeDirectories` causes setting to be silently ignored

Open maru0804 opened this issue 1 month ago • 0 comments

What happened?

There is a typo in the MIGRATION_MAP in packages/cli/src/config/settings.ts (line 115) that causes the V1 setting loadMemoryFromIncludeDirectories to be migrated to an incorrect V2 path.

Current (incorrect) mapping: loadMemoryFromIncludeDirectories: 'context.loadFromIncludeDirectories', // ❌ Missing "Memory"What happens to users:

  1. User has V1 settings with loadMemoryFromIncludeDirectories: true
  2. User upgrades to a version with V2 schema
  3. Migration runs and creates context.loadFromIncludeDirectories: true (incorrect key)
  4. Since this key doesn't exist in the V2 schema, the setting is silently ignored
  5. The default value false is used instead
  6. User's GEMINI.md files from include directories are not loaded as expected

Evidence:

  • Migration map: packages/cli/src/config/settings.ts:115
  • Actual V2 schema key: context.loadMemoryFromIncludeDirectories (see packages/cli/src/config/settingsSchema.ts:820)

What did you expect to happen?

The migration should correctly map to the V2 schema path:

loadMemoryFromIncludeDirectories: 'context.loadMemoryFromIncludeDirectories', // ✅ CorrectAfter migration, user settings should work as expected:

{ "context": { "loadMemoryFromIncludeDirectories": true // ✅ Correct key that exists in schema } }

Client information

  • Gemini CLI version: All versions since V2 schema migration (PR #7244)
  • Node.js version: N/A (affects all Node versions)
  • Operating system: N/A (affects all platforms)
  • Installation method: N/A (affects all installation methods)

Login information

No response

Anything else we need to know?

  • Severity: Medium - Affects users who had loadMemoryFromIncludeDirectories: true in V1
  • Silent failure: No error message shown, making it difficult for users to debug
  • User experience: Users expect GEMINI.md files to load from include directories, but they don't

maru0804 avatar Dec 14 '25 09:12 maru0804