@devries-cameron20 / composio Mirror · read-only / commits / 14f6011d7
Fork 0

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

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 12:15 UTC

fix(cli): build the consumer cache refresh client with the nano id

`resolveCommandProject` gives `composio execute` the consumer project's nano id, while the cache refresh asked `getFor` for a client keyed on the long id. Two clients meant two memo keys, so the connected-account list was still fetched twice per consumer execute. Use the same id on both. Claude-Session: https://claude.ai/code/session_01MTb47vexN35pLGsSZwBmrJ

jkomyno committed Sep 14, 2026 at 20:59 UTC 14f6011d7c8a863e263e4859e537cf3c6f08e54a
1 file changed +5 -1
ts/packages/cli/src/services/consumer-short-term-cache.ts
+5 -1
@@ -437,9 +437,13 @@ export const refreshConsumerConnectedToolkitsCache = (params?: {
437 apiKey,
438 orgId: scope.orgId,
439 });
440 + // The nano id, as `resolveCommandProject` hands it to `composio execute`:
441 + // `getFor` keys its clients on these params, and the memoized
442 + // connected-account list is keyed on the client, so a different project
443 + // id here would mean a second `GET /connected_accounts` per execute.
444 const client = yield* clientSingleton.getFor({
445 orgId: scope.orgId,
442 - projectId: consumerProject.project_id,
446 + projectId: consumerProject.project_nano_id,
447 });
448 const connectionContext = yield* resolveToolRouterSessionConnections(
449 client,