Chat file citation clicks don't reveal open editor tabs (TrustedScript blocked) - macOS 3.10.20

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

On Cursor 3.10.20 (macOS arm64), clicking file/code citation links in Agent Chat does not navigate to the file in the editor — even when the file is already open in a tab (e.g. config/controller/Api/BirFatura.php).

Workarounds that DO work:

  • Cmd+P → type filename → opens correctly

Workarounds that do NOT work:

  • Single click on citation header in chat
  • Double click on citation header
  • workbench.editor.revealIfOpen: true
  • workbench.editor.enablePreview: false
  • workbench.editor.showTabs: “multiple”

Developer Console shows on chat interaction:

  • “This document requires ‘TrustedScript’ assignment. The action has been blocked.”
  • “The JavaScript Function constructor does not accept TrustedString arguments.”
  • Lexical errors: “setEditorState: the editor state is empty”
  • TypeError: Cannot read properties of undefined (reading ‘type’)

Installed user extensions: only remote-ssh and remote-containers (ms-python/copilot warnings appear to be built-in).

Layout: unifiedAgent. Client: stable 3.10.20, darwin arm64.

Steps to Reproduce

  1. Open a project folder in Cursor (single-root workspace).
  2. Open a file manually in an editor tab, e.g. config/controller/Api/BirFatura.php.
  3. Start an Agent chat and ask the agent to reference or modify that file.
  4. When the agent responds with a code citation block (file path header like config/controller/Api/BirFatura.php), click the citation header/link.
  5. Observe: focus stays on chat; the already-open editor tab is not revealed/focused.
  6. Open Developer Tools (Help → Toggle Developer Tools) and repeat step 4 — TrustedScript and Lexical errors appear in Console.

Optional verification:

  • Cmd+P → BirFatura.php → file opens/focuses correctly (proves editor/tabs work).
  • Launch with: open -na “Cursor” --args --disable-features=TrustedDOMTypes — not yet confirmed if this fixes navigation.

Expected Behavior

Clicking a file citation link in Agent Chat should reveal and focus the target file in the editor. If the file is already open in a tab, Cursor should switch to that existing tab (revealIfOpen behavior). If not open, it should open the file at the cited line/range.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.10.20
VS Code Extension API: 1.125.0
Commit: 23b9fb205fe595ea2be29da7214e19762d037fc0
Date: 2026-07-07T07:03:33.071Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

For AI issues: which model did you use?

Auto (Agent mode) / Composer — issue is UI navigation, not model-specific. Reproduced across multiple agent turns in the same chat session.

Additional Information

  • settings.json includes revealIfOpen, enablePreview:false, showTabs:multiple — no effect.
  • Warning in console: “More than one setting with key workbench.editor.enablePreview found” (only one entry in user settings.json).
  • Video attached showing: file open in tab bar → click chat citation → tab not focused.
  • Related forum threads: TrustedScript blocking UI (Agents window blank), code citation navigation known bug.
  • Partial workaround: Cmd+P. Suggested by Cursor staff: --disable-features=TrustedDOMTypes (testing).

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. The console logs and steps really helped.

This looks like a real client-side bug. On 3.10.x with Chromium 144, stricter Trusted Types enforcement gets enabled for the Function constructor, and that partially breaks the chat renderer. That’s why you’re seeing TrustedScript and Lexical errors, and why the citation click handlers are dead. It also explains why workbench.editor.revealIfOpen, enablePreview, and showTabs don’t change anything. The issue is higher up in the stack, in chat itself, not in the editor logic. Cmd+P works because it goes through a different path.

For the workaround you wanted to test, launch Cursor with this flag and tell me if clicking citations starts working:

open -na "Cursor" --args --disable-features=TrustedDOMTypes

We’re already tracking the root cause. The same TrustedScript block shows up in other parts of the UI too. I can’t share an ETA for the fix yet, but I’ll post an update in the thread when I have one. If the flag works, please let me know. That’s a useful signal.

Thanks for the quick follow-up.

I tested launching Cursor with:

open -na “Cursor” --args --disable-features=TrustedDOMTypes

Result: the workaround did not fix the issue.

What still happens

  1. Open a file manually in an editor tab (e.g. config/controller/Api/BirFatura.php).
  2. In Agent Chat, click a code citation / file reference in the assistant response.
  3. Expected: focus switches to the existing editor tab (or opens the file).
  4. Actual: nothing happens — focus stays in chat; the open tab is not revealed.

Cmd+P → filename still works and correctly opens/focuses the file.

Settings tried (no effect)

“workbench.editor.revealIfOpen”: true,

“workbench.editor.enablePreview”: false,

“workbench.editor.showTabs”: “multiple”

Also tried double-clicking the citation header — same result.

Console (still present after launching with --disable-features=TrustedDOMTypes)

This document requires ‘TrustedScript’ assignment. The action has been blocked.

The JavaScript Function constructor does not accept TrustedString arguments.

Lexical: setEditorState: the editor state is empty

TypeError: Cannot read properties of undefined (reading 'typ

Thanks for testing. The fact that the console errors are still there even with the flag is a useful signal.

My guess is the flag didn’t apply at all. If Cursor was already open when you ran it, open -na "Cursor" --args ... might have attached to the existing process and ignored the args. Let’s re-check with a clean start:

  1. Fully quit Cursor with Cmd+Q and make sure it’s not still running in the Dock.
  2. Run this in Terminal:
    open -na "Cursor" --args --disable-features=TrustedDOMTypes
    
  3. Reload the window via Cmd+Shift+P then run “Reload Window”, and click the citation again.

If the TrustedScript or Lexical console errors disappear after a full restart but the click still doesn’t work, that’s a separate issue and we’ll dig into navigation. If the errors are still there, it means the flag isn’t taking effect, and that’s also important to know.

Also, please send the full Console error text, including the stack trace for TypeError: Cannot read properties of undefined (reading 'type'). It might point to the exact spot where it fails.

We’re tracking the root cause. I can’t share an ETA for a fix yet. After you test, let me know what you find.

Thanks for the follow-up.

I re-tested exactly as you described:

  1. Fully quit Cursor with Cmd+Q (confirmed it was not still running in the Dock)

  2. Launched from Terminal:

    open -na “Cursor” --args --disable-features=TrustedDOMTypes

  3. Reload Window via Cmd+Shift+P

  4. Opened a file in an editor tab, then clicked a code citation in Agent Chat

Result: Citation click still does not focus/reveal the open tab. Cmd+P still works.

Console: The TrustedScript, Lexical, and TypeError errors are still present after the flagged launch — so the flag likely did not take effect, or the issue persists regardless.

Full console output (including stack traces) from a clean repro is pasted below:

“workbench.desktop.main.js:2072 This document requires ‘TrustedScript’ assignment. The action has been blocked.
(anonymous) @ workbench.desktop.main.js:2072
workbench.desktop.main.js:2072 The JavaScript Function constructor does not accept TrustedString arguments. See Trusted Types for function constructor · w3c/trusted-types Wiki · GitHub for more information.
workbench.desktop.main.js:7722 This document requires ‘TrustedScript’ assignment. The action has been blocked.
(anonymous) @ workbench.desktop.main.js:7722
workbench.desktop.main.js:7722 The JavaScript Function constructor does not accept TrustedString arguments. See Trusted Types for function constructor · w3c/trusted-types Wiki · GitHub for more information.
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘ms-toolsai.datawrangler’ wants API proposal ‘debugFocus’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘ms-vscode.vscode-copilot-data-analysis’ wants API proposal ‘chatVariableResolver’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘ms-python.python’ wants API proposal ‘terminalShellType’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘ms-python.vscode-python-envs’ wants API proposal ‘terminalShellType’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘github.copilot-chat’ wants API proposal ‘chatReadonlyPromptReference’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘ms-azuretools.vscode-azure-github-copilot’ wants API proposal ‘lmTools’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘vscjava.vscode-java-pack’ wants API proposal ‘lmTools’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘apidev.azure-api-center’ wants API proposal ‘chatParticipant’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN Via ‘product.json#extensionEnabledApiProposals’ extension ‘apidev.azure-api-center’ wants API proposal ‘languageModels’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN [typescript-language-features]: Couldn’t find message for key configuration.tsserver.experimental.useBundledNode.unifiedDeprecationMessage.
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 ERR Extension ‘vscode.git’ wants API proposal ‘quickInputButtonLocation’ but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check ‘vscode.d.ts’) or was abandoned.
error @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 WARN No search provider registered for scheme: file, waiting
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:64 ERR [Extension Host:retrieval] (node:3425) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use Cursor Helper (Plugin) --trace-deprecation ... to show where the warning was created)
error @ workbench.desktop.main.js:64
workbench.desktop.main.js:17205 [Extension Host:retrieval] (node:3425) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use Cursor Helper (Plugin) --trace-deprecation ... to show where the warning was created)
Zqf @ workbench.desktop.main.js:17205
workbench.desktop.main.js:20562 Failed to get git telemetry attributes: Error: Failed to execute git
getGitAttributes @ workbench.desktop.main.js:20562
workbench.desktop.main.js:22058 Failed to load team commands: ConnectError: [unauthenticated] You must be a team member to access this resource
at SBm (workbench.desktop.main.js:22392:63147)
at Object.e [as unary] (workbench.desktop.main.js:22392:67911)
at async Object.getTeamCommands (workbench.desktop.main.js:7839:31420)
at async I2a.loadTeamCommands (workbench.desktop.main.js:22058:6027)
loadTeamCommands @ workbench.desktop.main.js:22058
workbench.desktop.main.js:9048 [PluginsProviderService] getPluginMcpServers took 2918.1ms
_callWithTimeout @ workbench.desktop.main.js:9048
workbench.desktop.main.js:9048 [PluginsProviderService] getPluginHooks took 2770.1ms
_callWithTimeout @ workbench.desktop.main.js:9048
workbench.desktop.main.js:9048 [PluginsProviderService] getPluginMcpServers took 1657.0ms
_callWithTimeout @ workbench.desktop.main.js:9048
2workbench.desktop.main.js:20713 [HOOKS] Failed to parse project hooks configuration undefined
logError @ workbench.desktop.main.js:20713
workbench.desktop.main.js:17205 [Extension Host:agent-exec] 14:35:56.094 WARN computeGlobalCache: slow ctx=LocalRequestContextExecutor.rebuildGlobalCache/LocalRequestContextExecutor.computeGlobalCache meta={totalMs: 1971, cloudRule: 1, codebaseRef: 2, subagents: 1639, cursorRules: 1970, ruleCount: 18}
Zqf @ workbench.desktop.main.js:17205
workbench.desktop.main.js:64 WARN [WorktreeManager] Timed out after 5000ms waiting for local agent scan; orphan classification disabled this pass
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:20360 [composer] No first token received within 2s Object
_log @ workbench.desktop.main.js:20360
workbench.desktop.main.js:64 WARN [AlwaysLocalSingleton privacy] {“level”:“warn”,“key”:“composer”,“message”:“No first token received within 2s”,“metadata”:{“arch”:“arm64”,“platform”:“darwin”,“channel”:“stable”,“client_version”:“3.10.20”,“layout”:“unifiedAgent”,“requestId”:“6a5a360a-177b-4d17-a734-a0c78e6231c0”,“composerId”:“cef0c61c-7764-44e4-9690-6b03d5523400”,“thresholdMs”:“2000”,“chatService”:“agent”}}
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:20360 [composer] No first token received within 4s Object
_log @ workbench.desktop.main.js:20360
workbench.desktop.main.js:64 WARN [AlwaysLocalSingleton privacy] {“level”:“warn”,“key”:“composer”,“message”:“No first token received within 4s”,“metadata”:{“arch”:“arm64”,“platform”:“darwin”,“channel”:“stable”,“client_version”:“3.10.20”,“layout”:“unifiedAgent”,“requestId”:“6a5a360a-177b-4d17-a734-a0c78e6231c0”,“composerId”:“cef0c61c-7764-44e4-9690-6b03d5523400”,“thresholdMs”:“4000”,“chatService”:“agent”}}
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:20360 [composer] No first token received within 6s Object
_log @ workbench.desktop.main.js:20360
workbench.desktop.main.js:64 WARN [AlwaysLocalSingleton privacy] {“level”:“warn”,“key”:“composer”,“message”:“No first token received within 6s”,“metadata”:{“arch”:“arm64”,“platform”:“darwin”,“channel”:“stable”,“client_version”:“3.10.20”,“layout”:“unifiedAgent”,“requestId”:“6a5a360a-177b-4d17-a734-a0c78e6231c0”,“composerId”:“cef0c61c-7764-44e4-9690-6b03d5523400”,“thresholdMs”:“6000”,“chatService”:“agent”}}
warn @ workbench.desktop.main.js:64
workbench.desktop.main.js:20360 [composer] No first token received within 2s Object
_log @ workbench.desktop.main.js:20360
workbench.desktop.main.js:64 WARN [AlwaysLocalSingleton privacy] {“level”:“warn”,“key”:“composer”,“message”:“No first token received within 2s”,“metadata”:{“arch”:“arm64”,“platform”:“darwin”,“channel”:“stable”,“client_version”:“3.10.20”,“layout”:“unifiedAgent”,“requestId”:“65b05085-2530-4fa2-8747-03947d1ce87e”,“composerId”:“cef0c61c-7764-44e4-9690-6b03d5523400”,“thresholdMs”:“2000”,“chatService”:“agent”}}”

Thanks for the full console dump and for re-checking after a clean start. That’s exactly what we needed.

Conclusion: the --disable-features=TrustedDOMTypes flag doesn’t disable enforcement on Chromium 144. The TrustedScript and Lexical errors are still there after a clean restart, so in this build the disable switch isn’t using that flag name. So you didn’t do anything wrong, the workaround just doesn’t apply to 3.10.x.

The bug itself is the one I mentioned earlier. Stricter Trusted Types enforcement on the Function constructor partially breaks the chat renderer, so the citation click handler is dead. This is on our side and we’re tracking the root cause. I can’t share an ETA for a fix yet, but I’ll post an update in the thread as soon as I have one.

What you can do for now:

  • Cmd+P then type the filename, this works reliably and goes through a separate path.
  • If citation navigation is critical, you can temporarily roll back to a stable build before 3.10, where Chromium doesn’t have this enforcement yet. Since it doesn’t fully block your work, it’s up to you whether a rollback is worth it.

I’ve forwarded the full console output you shared along with the repro details. Thanks for seeing the test through to the end.