---
outline: deep
---

# DF8403: Duplicate Command Id

## Message

> Command id "`{id}`" is already used by another command or child command

## Cause

`ctx.commands.register(command)` or a command handle `update()` received a command tree where at least one id is already owned by another top-level command or child command. Command ids are globally unique per hub context, including child commands.

## Fix

- Namespace every command id under your tool, such as `my-tool:reload` or `my-tool:open-settings`.
- Give each child command its own id instead of reusing the parent id.
- Unregister the previous command before replacing it with a different command tree.

## Source

- [`packages/hub/src/node/host-commands.ts`](https://github.com/devframes/devframe/blob/main/packages/hub/src/node/host-commands.ts) — `DevframeCommandsHost.register()` and command handle `update()` throw when a command id is duplicated.
