Skip to content

fix(prompt): prohibit angle-bracket autolinks in output format#419

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/prompt-no-angle-bracket-links
Open

fix(prompt): prohibit angle-bracket autolinks in output format#419
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/prompt-no-angle-bracket-links

Conversation

@sentry-junior
Copy link
Copy Markdown
Contributor

@sentry-junior sentry-junior Bot commented May 27, 2026

The output format instruction told the model to use [text](url) links but left "bare URL" ambiguous. The model was reaching for Slack mrkdwn <url> angle-bracket autolinks and then wrapping them with **...** bold markers. The closing ** ended up inside the angle brackets:

**<https://github.com/getsentry/sentry/pull/116264**>

Slack renders the URL as https://...pull/116264** — a broken link.

Why <url> is wrong here

Reply bodies are sent as Slack markdown blocks (GFM), not mrkdwn. <url> is valid GFM as an autolink, but it's the Slack mrkdwn syntax the model gravitates toward. There's no rendering difference between <url> and [url](url) that would justify using it, and mixing it with **...** is fragile.

Fix

One line in buildOutputSection() in prompt.ts: explicitly prohibit <url> format and clarify that "bare" means raw URL text on its own line (not <url>).

Reported: https://sentry.slack.com/archives/C0AHB7N2JCR/p1779840248376049


View Session in Sentry

The output format instruction said to use [text](url) links but left
'bare URL' ambiguous. The model was using <url> angle-bracket autolinks
(valid GFM but Slack-mrkdwn-flavored) and then combining them with **...**
bold markers. The closing ** ended up inside the angle brackets:

  **<https://github.com/...pull/1234**>

making the URL itself malformed. Since the reply body uses the Slack
markdown block (GFM), [text](url) is correct for all links. Prohibit
<url> explicitly and clarify 'bare' to mean raw URL text on its own line.

Reported: https://sentry.slack.com/archives/C0AHB7N2JCR/p1779840248376049
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment May 27, 2026 12:17am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants