DTK0057: Command Not Registered
Message
Command "
{id}" is not registered
Cause
The kit's commands host throws this error from two paths:
- The handle's
update(patch)was called after the underlying command was already unregistered. 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
packages/kit/src/node/host-commands.ts—executeand theupdateclosure both throwDTK0057when the command id can't be resolved viafindCommand/commands.get.