From 7853f1f4bfefa02b9b3700ae52f767742c4d9e64 Mon Sep 17 00:00:00 2001 From: sisyphus-dev-ai Date: Wed, 7 Jan 2026 04:38:08 +0000 Subject: [PATCH] fix(cli): preserve user config on reinstall Previously, the install command would delete the entire 'agents' object from the user's oh-my-opencode config before merging new install settings. This caused all user customizations to be lost on reinstall. Fixed by removing the 'delete existing.agents' line and relying on the existing deepMerge function to properly merge configs, preserving user customizations while updating only the fields specified by the installer. Fixes #556 --- src/cli/config-manager.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cli/config-manager.ts b/src/cli/config-manager.ts index 3eb5688a..8dba5a05 100644 --- a/src/cli/config-manager.ts +++ b/src/cli/config-manager.ts @@ -341,7 +341,6 @@ export function writeOmoConfig(installConfig: InstallConfig): ConfigMergeResult return { success: true, configPath: omoConfigPath } } - delete existing.agents const merged = deepMerge(existing, newConfig) writeFileSync(omoConfigPath, JSON.stringify(merged, null, 2) + "\n") } catch (parseErr) {