[Error Report] Expression highlighting sometimes disappears in AI Agent prompts

The idea is:

Add more reliable expression highlighting in long text fields, especially in AI Agent system prompts, so expressions inside {{ }} stay visually distinct from plain text.

My use case:

I often build AI workflows with long system prompts that mix static instructions and dynamic expressions. When the green highlighting disappears, it becomes difficult to quickly identify expressions while reviewing or editing the prompt.

I think it would be beneficial to add this because:

This would improve readability, reduce editing mistakes, and make AI workflow prompts much easier to debug and maintain.

Any resources to support this?

I’ve seen this behavior directly in AI Agent prompts, and there are already related community discussions around expression highlighting and editor rendering behavior.

Are you willing to work on this?

Not directly at the moment, but I’d be happy to help test and provide reproducible examples.

This issue also happens on the latest n8n versions. I have personally tested it on n8n 2.22.4 self-hosted, and the problem is still there.

If you’ve experienced the same thing, please vote for this request. It may look small, but it creates a lot of friction when working with long AI Agent prompts.