---
title: "DF8403: Duplicate Command Id"
description: "Command id \"{id}\" is already used by another command or child command"
canonical_url: "https://devfra.me/errors/df8403"
---
# DF8403: Duplicate Command Id

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

## 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.


## Sitemap

See the full [sitemap](https://devfra.me/sitemap.md) for all pages.
