# INTERNAL_ERROR

> INTERNAL_ERROR is a structural error: Agentic Mermaid hit an internal defect while drawing this source; the failure is not caused by the source.

- **Tier:** structural
- **Severity:** error
- **Origins:** engine

## What triggers it

A failed internal consistency check — a lowered Scene that disagrees with its own derivation, a broken layout-pass contract, a layout that could not be certified — or a runtime error such as a `TypeError` inside the engine. `defaultRender` says whether an ordinary render still produces output: `succeeds-unchecked` when it does, but the extra consistency checks verify runs failed, so its layout evidence cannot be trusted; `fails` when rendering throws.

## How to fix it

Do not rewrite the diagram to work around it. Report it with the source and the warning’s `reason`; layout is deterministic, so the source reproduces it exactly. A typed edit to a diagram that already had this defect is still accepted.

Run `am verify diagram.mmd --json` and inspect this code. Agentic Mermaid causes it, not the diagram: follow the fix above and report the source.

Full page: https://agentic-mermaid.dev/warnings/INTERNAL_ERROR/
