# Cursor Agent side panel custom Syntax highlighting breaks

**URL:** <https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846>\
**Category:** Bug Reports\
**Tags:** themes, byok, chat\
**Created:** [March 6, 2026, 11:39am UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846 "2026-03-06T11:39:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeromekem](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jeromekem](https://forum.cursor.com/u/Jeromekem)\
**Post date:** [March 6, 2026, 11:39am UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/1 "2026-03-06T11:39:53Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

Syntax highlighting broke in the Agent side panel, in e.g. python files syntax highlighting works. This behaviour started after adding a Google API key. The problematic syntax highlighting is a manual extension from VSCode, that was loaded in by a .vsix file. Re-importing the theme did not resolve the issue. The syntax highlighting only occurs when agent chat pastes a code block in chat (see attachments below)

### Steps to Reproduce

Add a Google API key with a custom syntax highlighting activated, and start using a google model in Cursor chat. Delete the API key. Syntax highlight stays broken in the Agent side panel.

### Expected Behavior

The user should always be able to set the Syntax highlighting in Cursor chat that matches the global setting. If this breaks, the user should be able to restore the setting.

### Operating System

MacOS

### Version Information

Version: 2.6.12  
VSCode Version: 1.105.1  
Commit: 1917e900a0c4b0111dc7975777cfff60853059d0  
Date: 2026-03-04T21:41:18.914Z  
Build Type: Stable  
Release Track: Default  
Electron: 39.6.0  
Chromium: 142.0.7444.265  
Node.js: 22.22.0  
V8: 14.2.231.22-electron.0  
OS: Darwin arm64 24.6.0

### Does this stop you from using Cursor

Yes - Cursor becomes more difficult to use

I would be really happy if you could assist me on this issue, I currently tried to restore this setting by :

1. Cleared Cursor caches:

~/Library/Application Support/Cursor/Cache

~/Library/Application Support/Cursor/Code Cache

~/Library/Application Support/Cursor/GPUCache

~/Library/Application Support/Cursor/CachedData

~/Library/Application Support/Cursor/Service Worker

2. Reset theme-related entries in Cursor SQLite state DB (state.vscdb).

3. Restored parts of Cursor config from Time Machine:

- User/globalStorage:

- Service Worker

- CachedData

4. Reinstalled the VSIX theme manually.

5. Verified the theme package.json and theme JSON structure.

6. Confirmed the theme works in editor but not inside the Cursor chat webview.

 ![Screenshot 2026-03-06 at 14.08.06](https://us1.discourse-cdn.com/cursor1/original/3X/b/2/b2e2664aea576881b8cd075fe0243f9a24535d4f.png)

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [March 6, 2026, 2:32pm UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/3 "2026-03-06T14:32:34Z")

</div>

Hey, thanks for the detailed report and for all the troubleshooting you’ve already done.

From the screenshot, it looks like the code blocks in the chat panel aren’t using your custom theme. A couple of things that’ll help narrow this down:

1. Could you switch to one of Cursor’s built-in themes, like Dark Modern, and check if syntax highlighting in the chat panel works correctly there? This will tell us if the issue is specific to custom `.vsix` themes in the webview.

2. What’s the name of the custom theme you’re using?

The chat panel renders code blocks in a separate webview, so custom themes installed via `.vsix` sometimes don’t carry over correctly. The fact that it works fine in the editor supports that.

I think the Google API key change might just be a coincidence, but testing with a built-in theme will help confirm.

Let me know what you find.

---

<div class="post-metadata">

**Author:** ![Jeromekem](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jeromekem](https://forum.cursor.com/u/Jeromekem)\
**Post date:** [March 6, 2026, 2:54pm UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/4 "2026-03-06T14:54:01Z")

</div>

Thanks for the response, really appreciate it. I indeed found that for the pre-built themes it works as expected. My custom theme also worked until today, which is this theme:

> **[JupyterLab Light Theme - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=MiguelCorralJr.jupyterlab-light-theme)**
>
> Extension for Visual Studio Code - JupyterLab light theme supporting Python and Markdown for Visual Studio Code.

This issue started happening today around 11:15 CET . It happened exactly after I activated my Google Gemini API key, which might indeed be a coincidence.

Really hope me, or your team, can do something to resolve it 🙂 . Looking forward to your response.

 ![Screenshot 2026-03-06 at 15.50.40](https://us1.discourse-cdn.com/cursor1/original/3X/9/5/95db326b08fd94e90e3159178c6044fa4799b890.png)

---

<div class="post-metadata">

**Author:** ![Jeromekem](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jeromekem](https://forum.cursor.com/u/Jeromekem)\
**Post date:** [March 6, 2026, 5:54pm UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/5 "2026-03-06T17:54:16Z")

</div>

Dear Dean Rie and team,

I restored an older Cursor backup, including both USER/.cursor and USER/Library/Application Support/Cursor, but the issue persists. It seems likely related to a recent update at your side.

Please let me know if there are plans to address this or if there is a way to manually alter the chat window settings. I would really appreciate being able to use custom syntax highlighting again. Now it’s hard to use, since some colors are hard to distinguish on a white background in chat (see below) 🙂 .

![Screenshot 2026-03-09 at 09.41.09](https://us1.discourse-cdn.com/cursor1/original/3X/f/b/fb8abae24d3e373fbd0c46e17c405bb65e7be0ef.png)

Warm regards & hope to hear,

Jeroen

---

<div class="post-metadata">

**Author:** ![Jeromekem](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jeromekem](https://forum.cursor.com/u/Jeromekem)\
**Post date:** [March 10, 2026, 9:40am UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/6 "2026-03-10T09:40:50Z")

</div>

Dear Dean and Team,

Could you write a brief response on the above if you have time? Really looking forward to it 🙂.

Warm regards,

Jeroen

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [March 11, 2026, 12:45pm UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/7 "2026-03-11T12:45:29Z")

</div>

Hey Jeromekem, thanks for the follow-up and for confirming the built-in themes work fine.

This helps narrow it down. The chat panel uses a webview to render code blocks, and custom themes installed via `.vsix` don’t always apply correctly inside that webview. The editor and the chat panel use different rendering paths, which is why your JupyterLab Light theme looks right in the editor but not in chat.

Right now there isn’t a manual workaround. Webview theming is handled internally and isn’t something users can configure.

I’ve flagged this to the team. No ETA yet, but your report helps us prioritize it. For now, you can switch to a built-in light theme like “Light Modern” for better readability in the chat panel.

I’ll update this thread if anything changes. Let me know if you have any questions.

---

<div class="post-metadata">

**Author:** ![Jeromekem](https://avatars.discourse-cdn.com/v4/letter/j/43a26b/32.png) [@Jeromekem](https://forum.cursor.com/u/Jeromekem)\
**Post date:** [March 11, 2026, 1:22pm UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/11 "2026-03-11T13:22:20Z")

</div>

Dear @deanrie Happy to say I think I figured it out. This custom theme for example \>did\< work correctly in Agent chat:

> **[Jupyter Theme - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=sam-the-programmer.jupyter-theme&utm_source=chatgpt.com)**
>
> Extension for Visual Studio Code - A colour theme based around Jupyter and Kaggle.

It seems that my previous custom theme was missing a section “tokenColors”. Apparently in the recent updates, your webview expects to receive that part from a custom theme. Here is the piece I used to make the Agent chat panel syntax highlighting readable, with a custom theme that might miss these fields:

```auto
"tokenColors": [
		{
  "name": "Fallback: Comments",
  "scope": [
    "comment",
    "punctuation.definition.comment"
  ],
  "settings": {
    "fontStyle": "italic",
    "foreground": "#407f7f"
  }
},
{
  "name": "Fallback: Strings",
  "scope": [
    "string",
    "punctuation.definition.string.begin",
    "punctuation.definition.string.end"
  ],
  "settings": {
    "foreground": "#ba2223"
  }
},
{
  "name": "Fallback: Numbers",
  "scope": [
    "constant.numeric",
    "constant"
  ],
  "settings": {
    "foreground": "#007f01"
  }
},
{
  "name": "Fallback: Operators",
  "scope": [
    "keyword.operator"
  ],
  "settings": {
    "fontStyle": "bold",
    "foreground": "#a922ff"
  }
},
{
  "name": "Fallback: Keywords",
  "scope": [
    "keyword",
    "storage"
  ],
  "settings": {
    "fontStyle": "bold",
    "foreground": "#007f01"
  }
},
{
  "name": "Fallback: Functions & Classes",
  "scope": [
    "entity.name.function",
    "entity.name.type",
    "support.function",
    "support.type"
  ],
  "settings": {
    "foreground": "#1400ff"
  }
},
{
  "name": "Fallback: Variables",
  "scope": [
    "variable",
    "variable.parameter"
  ],
  "settings": {
    "foreground": "#0055a9"
  }
},
{
  "name": "Fallback: Punctuation",
  "scope": [
    "punctuation"
  ],
  "settings": {
    "foreground": "#212121"
  }
},

```

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [March 18, 2026, 5:58pm UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/13 "2026-03-18T17:58:42Z")

</div>

Hey thanks, great debug. This is a really helpful find. The webview in the chat panel now relies on the theme’s `tokenColors` section, and if it’s missing, syntax highlighting falls back to default values.

This’ll help us handle this case better so themes without `tokenColors` still render correctly in the chat panel.

Glad we figured it out. I’ll mark this as solved.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/127254_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [April 9, 2026, 5:59pm UTC](https://forum.cursor.com/t/cursor-agent-side-panel-custom-syntax-highlighting-breaks/153846/14 "2026-04-09T17:59:08Z")

</div>

Closed on April 9, 2026, 5:59pm UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
