fix: seed memorySearch disabled when no user embedding config#1148
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5e00eec0c1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const agents = (isRecord(config.agents) ? config.agents : {}) as Record<string, unknown>; | ||
| const defaults = (isRecord(agents.defaults) ? agents.defaults : {}) as Record<string, unknown>; | ||
|
|
||
| defaults.memorySearch = { enabled: false }; |
There was a problem hiding this comment.
Don’t make the temporary memory-search disable permanent
When a fresh install starts before any OpenAI key is configured, this writes agents.defaults.memorySearch = { enabled: false } into the user config. Later, if the user adds an OpenAI provider key through Settings, provider sync only updates auth/provider config and this seeded flag is now treated as existing user config by hasUserMemorySearchConfig, so batchSyncConfigFields never removes or re-enables it. In that common first-run flow, memory_search stays disabled indefinitely until the user manually edits openclaw.json; consider marking ClawX-owned seeding or clearing it once the embedding provider becomes usable.
Useful? React with 👍 / 👎.
No description provided.