From f922133b633675e1b527b01ab682ecc0f30c1bde Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Wed, 27 May 2026 00:16:32 +0000 Subject: [PATCH] fix(prompt): prohibit angle-bracket autolinks in output format The output format instruction said to use [text](url) links but left 'bare URL' ambiguous. The model was using angle-bracket autolinks (valid GFM but Slack-mrkdwn-flavored) and then combining them with **...** bold markers. The closing ** ended up inside the angle brackets: ** making the URL itself malformed. Since the reply body uses the Slack markdown block (GFM), [text](url) is correct for all links. Prohibit explicitly and clarify 'bare' to mean raw URL text on its own line. Reported: https://sentry.slack.com/archives/C0AHB7N2JCR/p1779840248376049 --- packages/junior/src/chat/prompt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/junior/src/chat/prompt.ts b/packages/junior/src/chat/prompt.ts index 562bd4ee..b53d511c 100644 --- a/packages/junior/src/chat/prompt.ts +++ b/packages/junior/src/chat/prompt.ts @@ -465,7 +465,7 @@ function buildOutputSection(): string { return [ openTag, "- Start with the answer or result, not internal process narration.", - "- Use Slack-flavored Markdown: **bold** section labels, `code`, [text](url) links, bullet lists, and fenced code blocks. No tables. When the answer primarily lists several URLs, show each URL bare instead of as a labeled link.", + "- Use Slack-flavored Markdown: **bold** section labels, `code`, [text](url) links, bullet lists, and fenced code blocks. No tables. For links always use `[text](url)`; never use angle-bracket autolink format (``). When the answer primarily lists several URLs, show each URL bare on its own line rather than as a labeled link.", "- Keep replies brief and scannable; use bullets or short code blocks when helpful, and one compact thread reply when it fits.", "- When a research or document-style answer would benefit from continuation, multiple sections, or future reference value, create a Slack canvas and keep the thread reply to one or two short sentences plus the link; do not recap the canvas contents.", "- Unless a successful Slack side-effect tool intentionally satisfied the request by itself, end every turn with a final user-facing markdown response.",