Skip to content

Commit 127d9da

Browse files
fix(install): address QA round 2 findings
- cbm_cmd_uninstall: guard other-agent removals (Codex, Gemini, Zed, OpenCode, Antigravity, Aider, KiloCode), index removal, and binary removal with !has_project, matching the same isolation guarantee as cbm_cmd_install — prevents --project uninstall from destroying global agent configs and the binary Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 25cac80 commit 127d9da

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/cli/cli.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2353,6 +2353,10 @@ int cbm_cmd_uninstall(int argc, char **argv) {
23532353
printf(" removed PreToolUse hook\n");
23542354
}
23552355

2356+
/* Steps below (other agents, indexes, binary) are global-only — skip when
2357+
* --project is used so only the project-local .claude/ tree is touched. */
2358+
if (!has_project) {
2359+
23562360
if (agents.codex) {
23572361
char config_path[1024];
23582362
snprintf(config_path, sizeof(config_path), "%s/.codex/config.toml", home);
@@ -2502,6 +2506,8 @@ int cbm_cmd_uninstall(int argc, char **argv) {
25022506
printf("Removed %s\n", bin_path);
25032507
}
25042508

2509+
} /* end if (!has_project) */
2510+
25052511
printf("\nUninstall complete.\n");
25062512
if (dry_run) {
25072513
printf("(dry-run — no files were modified)\n");

0 commit comments

Comments
 (0)