# Cursor AI auto completion (ghost text) does not work

**URL:** <https://forum.cursor.com/t/cursor-ai-auto-completion-ghost-text-does-not-work/79984>\
**Category:** Bug Reports\
**Created:** [April 16, 2025, 10:11am UTC](https://forum.cursor.com/t/cursor-ai-auto-completion-ghost-text-does-not-work/79984 "2025-04-16T10:11:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![danixxx](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@danixxx](https://forum.cursor.com/u/danixxx)\
**Post date:** [April 16, 2025, 10:11am UTC](https://forum.cursor.com/t/cursor-ai-auto-completion-ghost-text-does-not-work/79984/1 "2025-04-16T10:11:37Z")

</div>

Hey everyone!

I’ve got a weired bug in Cursor. The autocompletion is sometimes working and sometimes dont, while the Chat features are available and working properly. I was trying to switch HTTP2 back and forth, but it doesn’t help. The issue has the same behaviour in Windows, WSL and via SSH.

Here are the logs that i get in the developer tools Console:

```auto

[Cpp] Error updating ghost text TypeError: Cannot read properties of undefined (reading 'getHTMLElement')
    at omi.isFocused (workbench.desktop.main.js:4020:48145)
    at lEi.isProblemFocused (workbench.desktop.main.js:4975:2905)
    at lEi.isTextFocusedOrSimilarlyFocused (workbench.desktop.main.js:4975:3016)
    at workbench.desktop.main.js:4975:3194
    at Array.find (<anonymous>)
    at lEi.getFocusedCodeEditor (workbench.desktop.main.js:4975:3181)
    at lEi.lc (workbench.desktop.main.js:4987:3817)
    at ve (workbench.desktop.main.js:4972:8217)
    at new lEi (workbench.desktop.main.js:4972:8274)
    at QTi.o (workbench.desktop.main.js:3217:1592)
update @ workbench.desktop.main.js:2349
workbench.desktop.main.js:2371 [Extension Host] (node:17276) ExperimentalWarning: Use `importAttributes` instead of `importAssertions`
(Use `Cursor --trace-warnings ...` to show where the warning was created)
Nkr @ workbench.desktop.main.js:2371
workbench.desktop.main.js:4922 Extension Host
6workbench.desktop.main.js:2349 [Cpp] Error updating ghost text TypeError: Cannot read properties of undefined (reading 'getHTMLElement')
    at omi.isFocused (workbench.desktop.main.js:4020:48145)
    at lEi.isProblemFocused (workbench.desktop.main.js:4975:2905)
    at lEi.isTextFocusedOrSimilarlyFocused (workbench.desktop.main.js:4975:3016)
    at workbench.desktop.main.js:4975:3194
    at Array.find (<anonymous>)
    at lEi.getFocusedCodeEditor (workbench.desktop.main.js:4975:3181)
    at lEi.lc (workbench.desktop.main.js:4987:3817)
    at ve (workbench.desktop.main.js:4972:8217)
    at new lEi (workbench.desktop.main.js:4972:8274)
    at QTi.o (workbench.desktop.main.js:3217:1592)
update @ workbench.desktop.main.js:2349
2workbench.desktop.main.js:4852 Writing file file:///c%3A/Users/Admin/.cursor/extensions/ms-vscode-remote.remote-wsl-0.81.8/dist/node/wslDaemon.js
2workbench.desktop.main.js:4852 Writing file file:///c%3A/Users/Admin/.cursor/extensions/ms-vscode-remote.remote-wsl-0.81.8/dist/node/extension.js
3workbench.desktop.main.js:2349 [Cpp] Error updating ghost text TypeError: Cannot read properties of undefined (reading 'getHTMLElement')
    at omi.isFocused (workbench.desktop.main.js:4020:48145)
    at lEi.isProblemFocused (workbench.desktop.main.js:4975:2905)
    at lEi.isTextFocusedOrSimilarlyFocused (workbench.desktop.main.js:4975:3016)
    at workbench.desktop.main.js:4975:3194
    at Array.find (<anonymous>)
    at lEi.getFocusedCodeEditor (workbench.desktop.main.js:4975:3181)
    at lEi.lc (workbench.desktop.main.js:4987:3817)
    at ve (workbench.desktop.main.js:4972:8217)
    at new lEi (workbench.desktop.main.js:4972:8274)
    at QTi.o (workbench.desktop.main.js:3217:1592)
update @ workbench.desktop.main.js:2349
workbench.desktop.main.js:4940 Error refreshing background composers ConnectError: [invalid_argument] Error
    at t (workbench.desktop.main.js:2405:131870)
    at async Object.listBackgroundComposers (workbench.desktop.main.js:98:15147)
    at async jki.refreshBackgroundComposers (workbench.desktop.main.js:4940:7887)
(anonymous) @ workbench.desktop.main.js:4940
www.vscode-unpkg.net/_gallery/anysphere/pyright/latest:1 
        
        
       Failed to load resource: the server responded with a status of 404 ()
workbench.desktop.main.js:593 Failed to refresh server config from server: ConnectError: [invalid_argument] Error
    at t (workbench.desktop.main.js:2405:131870)
    at async Object.getServerConfig (workbench.desktop.main.js:98:15147)
    at async m3t.forceRefreshServerConfig (workbench.desktop.main.js:593:32293)
forceRefreshServerConfig @ workbench.desktop.main.js:593
2workbench.desktop.main.js:4020 Uncaught TypeError: Cannot read properties of undefined (reading 'getHTMLElement')
    at omi.isFocused (workbench.desktop.main.js:4020:48145)
    at lEi.isProblemFocused (workbench.desktop.main.js:4975:2905)
    at lEi.isTextFocusedOrSimilarlyFocused (workbench.desktop.main.js:4975:3016)
    at workbench.desktop.main.js:4975:3194
    at Array.find (<anonymous>)
    at lEi.getFocusedCodeEditor (workbench.desktop.main.js:4975:3181)
    at lEi.lc (workbench.desktop.main.js:4987:3817)
    at HTMLDocument.handleKeyDownForCppKeys (workbench.desktop.main.js:4972:3157)

```

---

<div class="post-metadata">

**Author:** ![MaxBernasconiCodes](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/maxbernasconicodes/32/49306_2.png) [@MaxBernasconiCodes](https://forum.cursor.com/u/MaxBernasconiCodes)\
**Post date:** [April 23, 2025, 8:41am UTC](https://forum.cursor.com/t/cursor-ai-auto-completion-ghost-text-does-not-work/79984/2 "2025-04-23T08:41:29Z")

</div>

Same problem here

---

<div class="post-metadata">

**Author:** ![CS-5](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/cs-5/32/41318_2.png) [@CS-5](https://forum.cursor.com/u/CS-5)\
**Post date:** [April 28, 2025, 2:06pm UTC](https://forum.cursor.com/t/cursor-ai-auto-completion-ghost-text-does-not-work/79984/3 "2025-04-28T14:06:39Z")

</div>

I’m having the same issue. It seems to fix itself randomly, but broken 90% of the time.

I’m using the latest version of Cursor on MacOS. I also have a Windows machine with Cursor which works fine, leading me to believe this is either an issue specific to my Macbook or a MacOS Cursor bug.

---

<div class="post-metadata">

**Author:** ![danixxx](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@danixxx](https://forum.cursor.com/u/danixxx)\
**Post date:** [May 8, 2025, 11:35am UTC](https://forum.cursor.com/t/cursor-ai-auto-completion-ghost-text-does-not-work/79984/4 "2025-05-08T11:35:50Z")

</div>

Okay, i’ve managed to fix it with developer console

It turned out that there is a problem with PyRight compatibility, because both PyRight and ghost text are trying to modify the UI. So the PyRight removal helped the situation

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 7, 2025, 11:35am UTC](https://forum.cursor.com/t/cursor-ai-auto-completion-ghost-text-does-not-work/79984/5 "2025-06-07T11:35:53Z")

</div>

Closed on June 7, 2025, 11:35am UTC

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