---
title: "X18N4006: Key not found"
description: "Key not found. List keys with `x18n keys` (agents: the `x18n_keys` tool)."
canonical_url: "https://x18n.dev/errors/x18n4006"
---
# X18N4006: Key not found

> Key not found. List keys with \`x18n keys\` (agents: the \`x18n_keys\` tool).

<!-- Generated by docs/scripts/generate.ts from the source code. Do not edit. -->

## Message

```
[X18N4006] Key not found <detail>
├▶ fix: List keys with `x18n keys` (agents: the `x18n_keys` tool).
╰▶ see: https://x18n.dev/errors/x18n4006
```

The CLI prints the code and why the error happened, with details such as a file name or a field. The fix and a link to this page follow. With `--json`, the same parts are in `errors` of the [envelope](https://x18n.dev/references/json-contracts).

## What to do

The key does not exist in any locale.

1. Run `x18n keys` to list the keys, or `x18n keys "<glob>"` to search.
2. Check the namespace. In a namespaced project the key is `ns:path`, for example `common:save`.

## Exit code

The CLI exits with code `1`.

## Source

- [`packages/core/src/project/planner.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/core/src/project/planner.ts)
- [`packages/ui/src/node/agent.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/ui/src/node/agent.ts)


## Sitemap

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