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 setup timeout failures

jkomynob6e7dc5e4096
diff --git a/ts/packages/cli/src/services/setup.ts b/ts/packages/cli/src/services/setup.ts
index dfac808e2..cd22b2683 100644
--- a/ts/packages/cli/src/services/setup.ts
+++ b/ts/packages/cli/src/services/setup.ts
@@ -220,11 +220,11 @@ const capture = (executable: string, args: ReadonlyArray<string>) =>
Effect.gen(function* () {
const runner = yield* CommandRunner;
return yield* runner.capture(Command.make(executable, ...args)).pipe(
+ Effect.catchAll(() => Effect.succeed<CommandResult | undefined>(undefined)),
Effect.timeoutFail({
duration: SETUP_COMMAND_TIMEOUT,
onTimeout: () => new Error(`${executable} command timed out.`),
- }),
- Effect.catchAll(() => Effect.succeed<CommandResult | undefined>(undefined))
+ })
);
});
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 c4bbc4b92..05aa379b8 100644
--- a/ts/packages/cli/test/src/commands/setup.cmd.test.ts
+++ b/ts/packages/cli/test/src/commands/setup.cmd.test.ts
@@ -584,6 +584,11 @@ describe('CLI: composio setup', () => {
const exit = yield* Fiber.join(fiber);
expect(Exit.isFailure(exit)).toBe(true);
+ if (Exit.isFailure(exit)) {
+ const renderedCause = Cause.pretty(exit.cause);
+ expect(renderedCause).toContain('claude command timed out');
+ expect(renderedCause).not.toContain('not installed or not available on PATH');
+ }
})
);
});