Skip to content

DTK0057: Command Not Registered

Message

Command "{id}" is not registered

Cause

The kit's commands host throws this error from two paths:

  1. The handle's update(patch) was called after the underlying command was already unregistered.
  2. ctx.commands.execute(id, ...args) was called with an id that doesn't match any registered command (top-level or child).

Fix

Verify the id exists before executing:

ts
const cmd = ctx.commands.commands.get('my-plugin:run')
if (cmd?.handler)
  await ctx.commands.execute('my-plugin:run')

For palette executions surfaced via the client, this typically indicates a race between the client palette UI and a server-side unregister. Re-render the palette after the next command:registered / command:unregistered event.

Source

Released under the MIT License.