AgentPanel failed to render — TypeError: Cannot read properties of undefined (reading 'label') when switching between chat sessions (3.18.9)

Where does the bug appear (feature/product)?

Cursor IDE — Chat / Agent panel

Describe the Bug

Switching between existing chat sessions intermittently replaces the agent panel with “Something went wrong”. The copied error details are:

AgentPanel failed to render.
Error (TypeError): Cannot read properties of undefined (reading 'label')

Stack (first frames):
    at iRm (.../workbench.glass.main.js:13863:15368)
    at l5S (.../workbench.glass.main.js:13962:217899)
    at c5S (.../workbench.glass.main.js:13962:217935)
    at d5S (.../workbench.glass.main.js:13962:218422)
    at d0n (.../workbench.glass.main.js:13962:219162)
    at Ihv (.../workbench.glass.main.js:21881:31044)
    at xf (.../react-runtime/react-dom/esm-client-production.js:10:47843)
    at vc (.../react-runtime/react-dom/esm-client-production.js:10:70524)
    at _0 (.../react-runtime/react-dom/esm-client-production.js:10:80853)
    at u1 (.../react-runtime/react-dom/esm-client-production.js:10:116404)

Component stack (top frames):
    at Ihv (.../workbench.glass.main.js:21881:29601)
    at Rhv (.../workbench.glass.main.js:21881:32266)
    at div (<anonymous>)
    at HY0 (.../workbench.glass.main.js:21881:33639)
    at div (<anonymous>)
    at nTs (.../workbench.glass.main.js:21907:300099)

(Paths abbreviated from vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/. The full stack and component stack are much longer — happy to paste the untruncated version if that helps.)

How this differs from the existing reports

There are several open threads on “AgentPanel failed to render”, but each fails on a different property and — more importantly — has a different recovery profile:

In those threads staff identified the cause as one conversation’s saved state being corrupted: reopening that specific conversation crashes the panel every time, and only a full restart — or deleting the conversation without opening it — recovers.

That is not what I’m seeing. In my case clicking Retry recovers the panel immediately, and the same session usually opens fine afterwards. It is intermittent rather than tied to one reproducibly-broken conversation. That points to a transient race during panel render on session switch — some object whose .label is read before it has been populated — rather than persistent state corruption. It may well be a distinct bug that happens to surface through the same error boundary.

A few clarifying details on my setup, since they rule out the paths in the threads above:

  • Plain local chat sessions only. No Multitask, no cloud agents, no background agents involved.
  • It seems more likely to occur when many sessions exist in the workspace, or when the sessions are long — which is consistent with a render-timing/race explanation rather than a corrupted record.
  • Nothing is written to the on-disk logs when this happens (no matching entry anywhere under ~/Library/Application Support/Cursor/logs/), since it is caught by the in-renderer React error boundary. So the copied stack above is the only artifact available, and there is no Request ID — the failure is entirely client-side and does not involve a model request.

Steps to Reproduce

  1. Have a number of existing local chat sessions in the workspace (the more sessions, and the longer they are, the more often it seems to happen).
  2. Switch between sessions in the agent panel repeatedly.
  3. Intermittently the panel is replaced by “Something went wrong” with the reading 'label' TypeError above.
  4. Click Retry — the panel renders correctly again.

Onset: began roughly a week ago (~Aug 23, 2026). I had not run into this error before that. I am currently on 3.18.9 (built Aug 27), so the problem predates this build and persists into it.

Expected Behavior

Switching between chat sessions renders the target session’s panel without throwing, and without needing a Retry.

Operating System

MacOS

Version Information

Version: 3.18.9
VSCode Version: 1.128.0
Commit: 2ba48ff3f7514cc4643c52ca9f7b3173d9b66130
Date: 2026-08-27T01:42:22.092Z
Layout: glass
Build Type: Stable
OS: macOS 26.6.2 (build 25G83), Darwin arm64 25.6.0

Does this stop you from using Cursor?

No - Cursor works, but with this issue

Hey @OmryA, thanks for the detailed report!

This is a transient render issue during session switching, not corrupted conversation state, which is why Retry recovers immediately! The panel can briefly render while a session’s metadata is unavailable mid-switch, and that read is what throws.

The good news: a fix has already landed and is queued for an upcoming 3.18 update (fix merged today). In the meantime, Retry remains the quickest recovery.