criticalSystemReminder_EXPERIMENTAL silently dropped from .md agent definitions
Summary
criticalSystemReminder_EXPERIMENTAL is accepted by the Zod schema for agent definitions but silently dropped by the .md frontmatter parser (w2q) and the JSON parser (z2q). Only built-in agents (Explore, Plan) benefit from this field because they set it directly on their JS object literals.
Evidence (v2.1.81)
Zod schema validates the field:
criticalSystemReminder_EXPERIMENTAL: h.string().optional()
.describe("Experimental: Critical reminder added to system prompt")
.md parser (w2q) never extracts it:
The function manually extracts individual fields from frontmatter (name, description, model, tools, disallowedTools, etc.) but does not include criticalSystemReminder_EXPERIMENTAL in the returned object. The value is silently discarded.
JSON parser (z2q) also omits it from its return object, despite the schema accepting it.
Downstream pipeline already handles it generically:
Sk(agent runtime) passescriticalSystemReminder_EXPERIMENTALthrough toLn6gi_()emits{type: "critical_system_reminder", content: q}if the field exists- The renderer produces an
isMeta: truecontent block
The gap is exclusively in the parsers — one spread line in each would close it.
Expected behavior
Adding criticalSystemReminder_EXPERIMENTAL to a .md agent definition's YAML frontmatter should forward the value through to the system prompt assembly pipeline, the same way it works for built-in agents.
---
name: my-agent
model: opus
criticalSystemReminder_EXPERIMENTAL: "You MUST write output to the specified directory only."
---
Actual behavior
The field is silently dropped. No error, no warning. The agent runs without the critical reminder.
Impact
Users creating custom agent definitions (.md files in .claude/agents/) cannot use this field to reinforce critical constraints near the model's attention point — a capability that built-in Explore and Plan agents already benefit from.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗