Agentic Mermaid

What triggers it. An agent re-adding an edge that already exists, typically an add_edge issued without checking the current edge list, or copy-pasted source lines.

How to fix it. Remove one copy with remove_edge (or delete the duplicate source line); if two parallel edges are intentional, give them distinct labels so they stop being duplicates.

Minimal reproducer

This source triggers DUPLICATE_EDGE — checked at build time against the same engine the editor runs.

flowchart LR
  A[Start] --> B[Finish]
  A --> B

Open this reproducer in the editor

Run am verify diagram.mmd --json, inspect this code, and apply the smallest source or typed mutation that clears it. If it persists after two mechanical attempts, return the warning and ask for human review.

In the cloned repo, am is bun run bin/am.ts.

Machine-readable: this page as Markdown.

Back to all warning codes, or open a blank editor to try a fix.