Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
When an MCP tool call (specifically get_merge_request_diffs from @zereight/mcp-gitlab) returns a large response, the Cursor window becomes unresponsive and reloads. The MCP tool call itself succeeds — the crash happens when Cursor’s chat UI tries to render the response as markdown.
Steps to Reproduce
- Configure the @zereight/mcp-gitlab MCP server (or any MCP server that returns large text responses)
- In agent mode, trigger a tool call that returns a large diff response (e.g., get_merge_request_diffs for an MR with many changed files)
- The tool call completes successfully, but ~20 seconds later the window freezes and reloads
Expected Behavior
Large MCP tool responses should render without crashing the window. Ideally the markdown renderer would handle large text gracefully (truncation, streaming, or lazy rendering).
Operating System
MacOS
Version Information
Version: 2.5.26 (Universal)
VSCode Version: 1.105.1
Commit: 7d96c2a03bb088ad367615e9da1a3fe20fbbc6a0
Date: 2026-02-26T04:57:56.825Z (1 day ago)
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0
For AI issues: which model did you use?
Opus 4.6 Max
Additional Information
Log Evidence
main.log — unresponsive detection:
2026-02-27 10:29:49.162 [error] CodeWindow: detected unresponsive
2026-02-27 10:30:04.169 [error] [uncaught exception in main]: UnresponsiveSampleError: from window with ID 1 belonging to process with pid 1222
2026-02-27 10:29:49.162 [error] CodeWindow: detected unresponsive2026-02-27 10:30:04.169 [error] [uncaught exception in main]: UnresponsiveSampleError: from window with ID 1 belonging to process with pid 1222
main.log — all 14 unresponsive samples show the same stack (markdown regex):
<14>
at RegExp.exec (<anonymous>)
at y.link (workbench.desktop.main.js:780:908)
at u.inlineTokens (workbench.desktop.main.js:794:1416)
at u.lex (workbench.desktop.main.js:781:110)
at u.lex (workbench.desktop.main.js:780:4769)
at De (workbench.desktop.main.js:822:240)
at Object.useMemo (workbench.desktop.main.js:41563:65673)
<14> at RegExp.exec (<anonymous>) at y.link (workbench.desktop.main.js:780:908) at u.inlineTokens (workbench.desktop.main.js:794:1416) at u.lex (workbench.desktop.main.js:781:110) at u.lex (workbench.desktop.main.js:780:4769) at De (workbench.desktop.main.js:822:240) at Object.useMemo (workbench.desktop.main.js:41563:65673)
MCP user-GitLab.log — the tool call succeeded before the crash:
10:29:28.949 Calling tool 'get_merge_request_diffs'
10:29:29.779 Successfully called tool 'get_merge_request_diffs'
10:29:28.949 Calling tool 'get_merge_request_diffs'10:29:29.779 Successfully called tool 'get_merge_request_diffs'
Timeline:
- 10:29:29 — MCP tool returns successfully
- 10:29:49 — Window detected as unresponsive (20s later)
- 10:30:04 — UnresponsiveSampleError logged
- 10:30:39 — Window reloads, extension hosts terminated
Root Cause Analysis
The y.link function in the markdown lexer uses RegExp.exec to detect links in inline tokens. When the MCP response is very large (merge request diffs can be tens of thousands of lines), this regex runs on the renderer thread and either hits catastrophic backtracking or simply takes too long, blocking the UI.
Does this stop you from using Cursor
Yes - Cursor is unusable