The Empty String Your Go Template Invented — missingkey=error Is Not Optional
Nov 26, 2026
5 min read
There is a class of bug in Go that produces no panic, no error return, and no log line. It happens whenever you render a map[string]any through text/template, and it looks like this: your agent’s wake prompt says Please continue the task: {{.task}}, the task key is missing, and the template cheerfully renders Please continue the task: and hands it to the model.
The empty string is not a fact about your data. Your template invented it. And the only reason I know this personally is that two different subsystems in mule render untyped maps through templates, and I made the mistake in both before I learned better.
Read Article