Cody Extension Hangs on Extension Activation after installing latest, Can’t use it, Help Requested

I am hoping someone can help me out here.

I am seeing the following error on the latest version of VS Code Insiders, with the latest prerelease version of CodyAI. I am on MacOs.

It hangs and won’t activate the extension. See screenshot and log snippet:

2024-06-06 10:40:42.319 [info] ExtensionService#_doActivateExtension sourcegraph.cody-ai, startup: false, activationEvent: 'onLanguage'
2024-06-06 10:40:44.145 [error] Activating extension sourcegraph.cody-ai failed due to an error:
2024-06-06 10:40:44.145 [error] TypeError: Cannot set property createSecureContext of #<Object> which has only a getter
    at Function.inject (/Users/anonymized_username/.vscode-insiders/extensions/node_modules/.pnpm/win-ca@3.5.1/node_modules/win-ca/lib/inject.js:51:11)
    at Function.inject (/Users/anonymized_username/.vscode-insiders/extensions/node_modules/.pnpm/win-ca@3.5.1/node_modules/win-ca/lib/index.js:22:52)
    at registerLocalCertificates (/Users/anonymized_username/.vscode-insiders/extensions/sourcegraph.cody-ai-1.21.1717626593/src/certs.js:18:32)
    at initializeNetworkAgent (/Users/anonymized_username/.vscode-insiders/extensions/sourcegraph.cody-ai-1.21.1717626593/src/fetch.node.ts:96:5)
    at activate2 (/Users/anonymized_username/.vscode-insiders/extensions/sourcegraph.cody-ai-1.21.1717626593/src/extension.node.ts:40:5)
    at Function.kb (/Applications/Visual Studio Code -
    at Function.jb (/Applications/Visual Studio Code -
    at /Applications/Visual Studio Code -
    at a.n (/Applications/Visual Studio Code -
    at a.m (/Applications/Visual Studio Code -
    at a.l (/Applications/Visual Studio Code -

I have tried uninstalling and reinstalling the extension, and I have tried using the release version of codyai instead of the prerelease version.

Any suggestions?

1 Like

I am in the same boat. I also revert to the older version, 1.20, without success.

1 Like


This appears to be a breaking change in the latest release of VS Code Insiders (1.91.0-Insiders), releases within the past day or so.

I was able to resolve the problem by switching back to the previous Insiders build.

However, I am still wondering if this is worth the Cody devs looking into, as it may require them to update the broken function in the future if/when these changes reach the stable VS Code release.


@eshack94: Thanks for the report and workaround. This was also reported at bug: cody's chat not loading on latest VSCode Insiders · Issue #4491 · sourcegraph/cody · GitHub, and I cross-posted the workaround:

Workaround: If you are experiencing this problem and are using VS Code Insiders, switch to VS Code 1.90 (stable, non-insiders). I am referring to the versions of VS Code itself, not the Cody extension.

We just published a Cody prerelease build (v1.21.1717993747) to the VS Code marketplace that should fix this issue. Please try that (with Switch to Pre-release Version in the VS Code extension view for Cody) and report back if it works for you. Thanks!