Flutter "Wrap with" fails: Actual command not found _dart.applySnippetTextEdit

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Bug Report

Where does the bug appear?

  • Cursor IDE (desktop) — reproducible
  • Same project / same Dart & Flutter extensions in VS Code work correctly (control case)

Describe the Bug

Using Flutter/Dart refactor “Wrap with…” (and related wrap actions) fails in Cursor with:

Actual command not found, wanted to execute _dart.applySnippetTextEdit /217 __vsc… undefined

The Dart extension activates successfully. The failure is in Cursor’s CommandsConverter when applying the code action command that Dart injects for LSP snippet TextEdits (_dart.applySnippetTextEdit). Lookup of the internal $ident returns undefined.

This is not an issue with the Dart extension itself: VS Code with the same extension version and dart.lspSnippetTextEdits: true (default) works.

Steps to Reproduce

  1. Open any Flutter/Dart project in Cursor
  2. Ensure extensions Dart and Flutter (Dart-Code) are installed and a .dart file is open
  3. Place the cursor on a widget (e.g. Text(...) / Image.network(...))
  4. Open Quick Fix / Refactor (Cmd+. on macOS)
  5. Choose Wrap with widget… or Wrap with Center / Column / etc.
  6. Observe the error; the edit is not applied

Expected Behavior

Widget is wrapped and the snippet placeholder (e.g. widget) is selected — same as in VS Code.

Actual Behavior

Code action fails. Extension Host log:

[error] Actual command not found, wanted to execute _dart.applySnippetTextEdit /217 __vscba8cd60a-cc68-4001-b9ad-50c7e79b898f undefined

Dart extension activation in the same session succeeds beforehand:

Extension activated success: Dart-Code.dart-code
Extension activated success: Dart-Code.flutter

Screenshots / Screen Recordings

N/A — error is from Extension Host (CommandsConverter#EXECUTE).

Operating System

macOS 26.5.2 (Build 25F84), Apple Silicon

Current Cursor Version

  • Cursor: 3.14.27 (commit 047548b00c1a079373d74d00183f32510a4a41e0, arm64)
  • Dart extension: 3.140.0 (Dart-Code.dart-code)
  • Flutter extension: 3.140.0 (Dart-Code.flutter)
  • Flutter SDK: 3.44.6 / Dart 3.12.2

Additional Information / Technical notes

  • Dart middleware rewrites snippet workspace edits from code actions into command _dart.applySnippetTextEdit so the editor can expand the snippet and place the cursor.
  • VS Code’s command converter keeps the $ident mapping; Cursor loses it (undefined at the end of the error).
  • Workaround that restores Wrap with in Cursor (losing snippet cursor placement): set "dart.lspSnippetTextEdits": falsenot needed in VS Code.
  • Error originates from Cursor/VS Code fork path:
    CommandsConverter#EXECUTEActual command not found, wanted to execute ${e[0]}
    in extensionHostProcess.js.

Does this stop you from using Cursor?

  • Yes — partially. Flutter refactor “Wrap with” is unusable without disabling snippet TextEdits (or switching to VS Code for those refactors).

Steps to Reproduce

  1. Open any Flutter/Dart project in Cursor (not VS Code).
  2. Confirm extensions Dart and Flutter (Dart-Code) are installed and enabled.
  3. Open a .dart file with a widget, e.g. Text('hello') or Image.network(...).
  4. Place the caret on the widget name.
  5. Open Quick Fix / Refactor (Cmd+. on macOS / Ctrl+. on Windows/Linux).
  6. Choose Wrap with widget… (or Wrap with Center / Column / etc.).
  7. Observe the failure: edit is not applied; Extension Host shows
    Actual command not found, wanted to execute _dart.applySnippetTextEdit … undefined.

Control: repeat steps 3–6 in VS Code with the same project and Dart extension → Wrap with works.

Operating System

MacOS

Version Information

Version Information

  • Cursor: 3.14.27 (047548b00c1a079373d74d00183f32510a4a41e0, arm64)
  • OS: macOS 26.5.2 (Build 25F84), Apple Silicon
  • Dart extension: 3.140.0 (Dart-Code.dart-code)
  • Flutter extension: 3.140.0 (Dart-Code.flutter)
  • Flutter SDK: 3.44.6 (stable)
  • Dart SDK: 3.12.2

Additional Information

This is a critical Flutter workflow issue. Wrap with (and related wrap/remove widget refactors) is one of the most frequently used actions when building Flutter UIs — we use it constantly while composing widget trees.

Losing it in Cursor forces either:

  • manually rewriting wrappers by hand, or
  • switching back to VS Code just for refactors, or
  • disabling dart.lspSnippetTextEdits (workaround that restores Wrap but loses snippet cursor placement).

Same project + same Dart/Flutter extension versions work correctly in VS Code, so this appears to be a Cursor-specific regression in how code-action commands (_dart.applySnippetTextEdit / CommandsConverter) are resolved.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. The repro, the control case in VS Code, plus the logs and versions really help.

What you’re seeing isn’t intended behavior, and it’s not related to your setup. It looks like something changed in a recent release in how code action commands are handled in the extension host. CommandsConverter is dropping $ident, which is why the error ends with undefined. That’s also why everything works in VS Code with the same extensions. I’ve shared this with the team and we’re tracking it. This likely impacts not only Dart, but any extension code actions that rely on contributed commands with arguments.

As a temporary workaround, the one you already found is valid:

"dart.lspSnippetTextEdits": false

With that, Wrap with works again. The downside is you lose cursor placement in the snippet placeholder. Until an update lands, this is a reasonable stopgap. Another option is to do these refactors in VS Code.

I can’t share a timeline yet, but I’ll post here once there’s an update.

Is this issue affecting Code Spell Checker? I received the error message.

2026-08-07 11:27:15.250 [error] Actual command not found, wanted to execute cSpell.addWordsToVSCodeSettingsFromServer /4 __vscfb35888a-a52d-4978-a166-63f266d3d1fa undefined

Hey, yeah, it’s the same root cause, it just shows up in a different extension. The Actual command not found ... undefined error isn’t coming from Code Spell Checker itself. It’s coming from how Cursor currently handles code-action commands from extensions, the ones that use contributed commands with arguments. Dart Wrap with was the first case, and cSpell.addWordsToVSCodeSettingsFromServer hits the same path.

This isn’t anything in your setup, and it isn’t intended behavior. It looks like something changed in a recent release. We’re already tracking it in this same thread.

As a temporary workaround for Code Spell Checker, add words directly in settings.json under cSpell.words or in cspell.json at the project root, instead of using the quick fix from the menu. That avoids the broken path.

I can’t share a timeline yet, but I’ll reply here as soon as there’s an update.

Hello! Im having a very similar issue with eslint after todays update. I get this error whenever trying “Fix all autofixable problems” from the context menu.

Actual command not found, wanted to execute eslint.applyAllFixes /262

At least doing it from the cmd+shift+p works. But none of the eslint commands work from the context menu

Hey, thanks for the report. This is the same root cause as the one earlier in the thread, it just shows up in a different extension. The Actual command not found ... undefined error isn’t coming from ESLint or Prettier. It’s coming from how Cursor currently handles code-action commands from extensions that use contributed commands with arguments. Dart Wrap with was the first case, and eslint.applyAllFixes hits the same path.

This isn’t anything in your setup and it isn’t intended behavior. It looks like something changed in a recent release. We’re already tracking it in this same thread.

As a temporary workaround, you found the right one. Running the same commands via the command palette Cmd+Shift+P works because it doesn’t use that path. You can also run fixes from the terminal with eslint --fix, or enable fix on save in the ESLint settings. The broken path is only the call through the context Quick Fix menu.

I can’t share a timeline yet, but I’ll post here as soon as there’s an update.

Greetings!

fix faster please, or i will move to VS Code

Heyo!

Wanted to bump this here to try and up the priority. As OP mentioned, this is a critical feature that Flutter devs use constantly. Without it, we’re basically forced to use a different IDE (which I don’t want to since I love Cursor) but this basically forces the hand if we can’t refactor with a click.

Appreciate you looking into this!

Hi, I am having exact same issue as Luis in the thread as regard to applying eslint fixes. Attached is the screenshot. Hope this gets prioritized quickly.

Hey, thanks for the screenshot. I’m seeing the same error Actual command not found, wanted to execute eslint.applyAllFixes ... undefined. It’s the same root cause as earlier in the thread, it just shows up in a different extension.

This isn’t an ESLint issue and it’s not your settings, and it’s not intended behavior. It’s about how Cursor currently handles code action commands from extensions that use contributed commands with arguments. Wrap with in Dart was the first case, and eslint.applyAllFixes hits the same path. We’re tracking it.

Until an update ships, working ESLint workarounds are:

  • Run fixes from the Command Palette Cmd+Shift+P, that uses a different path and works
  • Run eslint --fix in the terminal
  • Turn on fix on save in ESLint settings

Only the call from the context Quick Fix menu is broken.

I can’t share a timeline yet, but I’ll reply in the thread as soon as there’s an update.

The same issue happens in ReSharper as well. Cannot apply Quick Fixes.

I was having this issue with resharper too but it looks like it got fixed on the latest update

Hmm nevermind, still broken :confused:

confirmed that it’s still extra broken (_and super duper annoying_) when using rust-analyzer

Hey, thanks for the screenshot. This is the same root cause as earlier in the thread. The code action command call from the Quick Fix context menu Cmd+. was breaking for extensions that contribute commands with arguments. rust-analyzer hits the same path.

Good news: this was fixed in version 3.16. Update Cursor to 3.16 via Cursor > Check for Updates, then restart and try rust-analyzer.resolveCodeAction again from Quick Fix.

If it still happens after the update, share the Cursor version you’re on via Cursor > About and I’ll take another look.

Same thing is happening to me and my Typescript Quick Actions (I previously experienced it in Flutter too).

Actual command not found, wanted to execute _typescript.didApplyRefactoring /1324863

Cursor version 3.16.17

The temporary workaround works for Flutter, but I haven’t found anything to fix the Typescript.

I’m on Cursor 3.16.17 and this is still ocurring with rust-analyzer. The error text is “Actual command not found, wanted to execute rust-analyzer.resolveCodeAction /812”. This thread on rust-analyzer may help you find the cause (it contains a hotfix on rust-analyzer for cursor specifically):

when it will be fixed???

I just updated Cursor to 3.17.8 and the Quick Actions for Typescript appear fixed, but I’ll report back if anything breaks during my workday.

still fails on 3.17.8 for me