From 9c33bafbf3cdb9b7ab2023cfbb3f84be1fd7386e Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Feb 2026 20:10:41 +0000 Subject: [PATCH] Prohibit markdown in email reply text Tell the LLM explicitly that the reply field must be plain text with no markdown (no bold, italic, headers, bullet points, or backticks). Email clients display raw text so markdown syntax would appear as literal characters rather than formatting. https://claude.ai/code/session_01HaUFs7SaLD5SoiuGCY27Tw --- src/agent/prompts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/agent/prompts.py b/src/agent/prompts.py index 79f5003..15d249b 100644 --- a/src/agent/prompts.py +++ b/src/agent/prompts.py @@ -90,7 +90,8 @@ Rules: - Dates must be YYYY-MM-DD. Postal codes must be exactly 4 digits. - Valid days: "monday", "wednesday", "thursday" (indoor) or "monday" (outdoor). - `language` must be "de" or "en" based on the parent's message. -- The `reply` field must be natural, friendly, conversational text — not JSON and not a list of fields.""" +- The `reply` field must be natural, friendly, conversational text — not JSON and not a list of fields. +- The `reply` field must be plain text only. No markdown: no **bold**, no _italic_, no # headers, no bullet points with - or *, no backticks. Use plain sentences and line breaks only.""" _POST_COMPLETION_RESPONSE_FORMAT = """## CRITICAL: Response Format @@ -129,6 +130,7 @@ Rules: - Use `null` for all `updates` fields when intent is `"question"` or `"new_child"`. - `language` must be "de" or "en" based on the parent's message. - The `reply` field must be natural, friendly, conversational text — not JSON and not a list of fields. +- The `reply` field must be plain text only. No markdown: no **bold**, no _italic_, no # headers, no bullet points with - or *, no backticks. Use plain sentences and line breaks only. - If you are unsure of the parent's intent, ask a clarifying question and set intent to `"question"`."""