Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 43 additions & 9 deletions docs/cody/troubleshooting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ To troubleshoot further:

### Rate limits

On the free plan, Cody provides **unlimited autocomplete suggestions** and **200 chat and command invokations** per user per month.
Cody Free provides **unlimited autocomplete suggestions** and **200 chat and command invocations** per user per month.

On the Pro and Enterprise plans, there are much higher limits that are used to keep our services operational. These limits reset within a day.
On Cody Pro and Enterprise plans, usage is unlimited but controlled by **Fair Usage**. This means that some users occasionally experience a limitation placed on their account. This limitation resets within 24 hours. If this issue persists, contact us through our [community forum](https://community.sourcegraph.com), Discord, or email [email protected].

#### 429 errors

A 429 status code means you are on a free account and hit your usage limit/quota for the day. It can also mean you were sending too many requests in a short period of time. If you have Cody Pro and you are seeing 429 errors, you can contact us at [[email protected]](mailto:[email protected]) to resolve this.

### Error logging in VS Code on Linux and Windows

Expand All @@ -89,6 +93,25 @@ On Windows,
- In your Command Prompt or PowerShell window, run the following command: `setx NODE_TLS_REJECT_UNAUTHORIZED 0`
- Restart Visual Studio Code and try the sign in process again

### Cloudflare Request Failed

If you encounter this error:

```
Request Failed: Request to https://sourcegraph.com/.api/completions/stream?api-version=1&client-name=vscode&client-version=1.34.3 failed with 403 Forbidden
```

It indicates that our web application firewall provider, Cloudflare, has flagged the source IP as suspicious.

Consider disabling anonymizers, VPNs, or open proxies. If using a VPN is essential, you can try [1.1.1.1](https://one.one.one.one), which is recognized to be compatible with our services.

### VS Code Pro License Issues

If VS Code prompts you to upgrade to Pro despite already having a Pro license, this usually happens because you're logged into a free Cody/Sourcegraph account rather than your Pro account. To fix this:

- Check which account you're currently logged into
- If needed, log out and sign in with your PRO account credentials

### Error exceeding `localStorage` quota

When using Cody chat, you may come across this error:
Expand All @@ -99,7 +122,7 @@ Failed to execute 'setItem' on 'Storage': Setting the value of 'user-history:$us

This error indicates that the chat history size surpasses the capacity of your browser's local storage. Cody stores comprehensive context data with each chat message, contributing to this limitation.

To fix this, navigate to https://sourcegraph.example.com/cody/chat and click `Clear Chat History` if your instance is on v5.2.3+. For older versions, clear your browsing data or browser history.
To fix this, navigate to https://sourcegraph.your-domain.com/cody/chat and click `Clear Chat History` if your instance is on v5.2.3+. For older versions, clear your browsing data or browser history.

### Record performance traces for Cody

Expand All @@ -110,6 +133,7 @@ You can get performance traces from the Cody VS Code extension in production wit
```bash
/Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron --inspect-extensions=9333
```

Note that you may need to quit VSCode first, then run that command to re-launch it. It will open all of your windows and tabs again.
- After VS Code is started, head over to Chrome and go to `chrome://inspect`, which takes you to the following:

Expand Down Expand Up @@ -150,15 +174,13 @@ If you are experiencing performance issues with Cody in VSCode, recording a CPU

Following these steps will help the team understand and resolve the performance issues more effectively.



## JetBrains IntelliJ extension

### Access Cody logs

JetBrains logs can be accessed via the **Output** panel. To access logs, you must first enable Cody logs from the Settings menu. To do so:

- Open the Settings panel (⌘, for MacOS) (Ctrl Alt 0S for Windows)
- Open the Settings panel (`⌘,` for macOS) (`Ctrl+Alt+S` for Windows)
- Go to `Sourcegraph & Cody`
- Click on `Cody`
- Check the box to Enable debug
Expand All @@ -175,17 +197,29 @@ If you notice the Cody agent reaching 100% CPU utilization, try the following:
1. Re-enable the plugin.
This simple action of turning the plugin off and on again can often resolve the high CPU usage issue.



## Android Studio extension

### Cody cannot start. Stuck on spinning icon.

This issue occurs because JCEF isn't supported in Android Studio and causes Cody not to start. The suggested workaround is to;
This issue occurs because JCEF isn't supported in Android Studio and causes Cody to not start. The suggested workaround is to:

1. Go to `Help` > `Find Action: Registry`.
1. Scroll to `ide.browser.jcef.sandbox.enable`.
1. Disable that key and close.
1. Then go to `Help` > `Find Action: Choose Boot runtime for the IDE`.
1. Select the last option.
1. Restart Android Studio.

## Regular Expressions

### Asterisks being removed

If you send Cody a prompt with a query string like `$filteredResults = preg_grep('*\.' . basename($inputPath) . '\.*', $fileList);`, the asterisks may be removed because Cody interprets the content as a literal string rather than code.

When sharing code with Cody, wrap your code in triple backticks (```) to ensure it's recognized as a code block rather than plain text. For example:

````regex
```
$filteredResults = preg_grep('*\.' . basename($inputPath) . '\.*', $fileList);
```
````
Loading