Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(cli): preserve unmanaged skills on uninstall

Kshitij Jhunjhunwalacb75ddd02b89
diff --git a/ts/packages/cli/src/services/setup.ts b/ts/packages/cli/src/services/setup.ts
index 63e7028ad..fd9083256 100644
--- a/ts/packages/cli/src/services/setup.ts
+++ b/ts/packages/cli/src/services/setup.ts
@@ -445,10 +445,10 @@ const uninstallAdapter = (adapter: SetupTargetAdapter, initial: InspectedSetupTa
}
const final = yield* inspectAdapter(adapter);
- if (final.plugin_installed || (adapter.skillSource === 'standalone' && final.cli_skill_ready)) {
+ if (final.plugin_installed) {
return yield* Effect.fail(
new Error(
- `Uninstall commands completed, but ${adapter.target} still reports Composio as installed. Rerun \`composio setup --uninstall --target ${adapter.target}\` or inspect the native ${adapter.target} plugin configuration.`
+ `Uninstall commands completed, but ${adapter.target} still reports the Composio plugin as installed. Rerun \`composio setup --uninstall --target ${adapter.target}\` or inspect the native ${adapter.target} plugin configuration.`
)
);
}
diff --git a/ts/packages/cli/test/src/commands/setup.cmd.test.ts b/ts/packages/cli/test/src/commands/setup.cmd.test.ts
index 58424dc90..047c66de8 100644
--- a/ts/packages/cli/test/src/commands/setup.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/setup.cmd.test.ts
@@ -561,6 +561,31 @@ describe('CLI: composio setup', () => {
);
});
+ const uninstallWithUnmanagedClaudeSkill = makeFakeHosts({
+ claude: { available: true, marketplace: 'canonical', plugin: 'enabled' },
+ });
+ layer(
+ TestLive({
+ commandRunner: uninstallWithUnmanagedClaudeSkill.runner,
+ setupSkillInstaller: new SetupSkillInstaller({
+ isClaudeSkillReady: Effect.succeed(true),
+ hasManagedClaudeSkill: Effect.succeed(false),
+ ensureClaudeSkill: Effect.succeed(false),
+ removeClaudeSkill: Effect.succeed(false),
+ }),
+ })
+ )('uninstall with an unmanaged Claude skill', it => {
+ it.scoped('preserves the skill without treating plugin removal as a failure', () =>
+ Effect.gen(function* () {
+ yield* cli(['setup', '--uninstall', '--target', 'claude', '--yes']);
+
+ expect(uninstallWithUnmanagedClaudeSkill.state.claude.plugin).toBe('missing');
+ const output = (yield* MockConsole.getLines()).join('\n');
+ expect(output).toContain('Successfully uninstalled the Composio plugin for Claude Code.');
+ })
+ );
+ });
+
const nonInteractiveUninstall = makeFakeHosts({
claude: { available: true, marketplace: 'canonical', plugin: 'enabled' },
});