Skip to content

semantic_memory cannot be disabled with enabled: false alone: the section and config_database are required even when semantic memory is off #1633

Description

@wanghy73

What happened

Turning semantic memory off in the config file takes more than enabled: false. The configuration fails to load unless you also name a config_database, and it fails if the semantic_memory section is left out entirely.

Line numbers as of 98f3cde (speedkick), packages/server/src/memmachine_server/common/configuration/__init__.py:

  • SemanticMemoryConf.config_database is declared Field(...) (line 144), so it is required whatever enabled is.
  • Configuration.semantic_memory has no default (line 373), so the section itself is required.

Checked against the model directly:

SemanticMemoryConf(enabled=False)
  -> 1 validation error for SemanticMemoryConf
     config_database  Field required [type=missing]

SemanticMemoryConf(enabled=False, config_database="pg")        -> OK
Configuration(... semantic_memory section omitted ...)
  -> 1 validation error for Configuration
     semantic_memory  Field required [type=missing]

This contradicts #1580 ("default to no short-term or semantic memory"). Semantic memory is off by default, but the operator still has to write a semantic section and point it at a database that will never be used. Every other semantic field is optional, and _auto_disable_when_incomplete (line 180) already treats a missing storage field as grounds to disable rather than to fail.

Expected

With semantic memory disabled, semantic_memory: should be optional and so should config_database. Either of these should load:

semantic_memory:
  enabled: false

or no semantic_memory section at all.

Concretely: make config_database optional (str | None = None), give Configuration.semantic_memory a default, and fold a missing config_database into _auto_disable_when_incomplete for configs that do set enabled: true. SemanticManager.get_semantic_config_storage (common/resource_manager/semantic_manager.py:175) would then need to raise ResourceNotReadyError when it is unset, as the storage getter already does for database.

Related

Investigated and written by Claude (Claude Code), filed from the account of the user who commissioned the investigation.

Activity

  1. added theissue type on Sep 15, 2026
  2. added 3 commits that reference this issue on Sep 18, 2026
    46bbafd
    57cf250
    d60ac0a
  3. added a commit that references this issue on Sep 18, 2026
    d7a391e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions