---
title: "X18N4004: Plan is stale"
description: "Plan is stale. Files changed since the plan was made. Plan again."
canonical_url: "https://x18n.dev/errors/x18n4004"
---
# X18N4004: Plan is stale

> Plan is stale. Files changed since the plan was made. Plan again.

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

## Message

```
[X18N4004] Plan is stale <detail>
├▶ fix: Files changed since the plan was made. Plan again.
╰▶ see: https://x18n.dev/errors/x18n4004
```

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

A file changed after x18n made the plan, so x18n did not write anything. For `x18n extract --apply`, the source file changed after you wrote the plan file.

1. Run the command again. x18n makes a new plan from the current files.
2. For extraction, run `x18n extract --plan <file>` again and edit the new plan.

## Exit code

The CLI exits with code `4`.

## Source

- [`packages/builtins/src/extractors/index.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/builtins/src/extractors/index.ts)
- [`packages/cli/src/context.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/cli/src/context.ts)
- [`packages/core/src/project/planner.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/core/src/project/planner.ts)
- [`packages/core/src/project/translate.ts`](https://github.com/x18n-dev/x18n/blob/main/packages/core/src/project/translate.ts)


## Sitemap

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