Skip to content

fix(server): tell agents how to nest fenced code inside code blocks - #1

Open
pc-style wants to merge 440 commits into
mainfrom
t3code/fix-markdown-code-blocks
Open

pc-style wants to merge 440 commits into
mainfrom
t3code/fix-markdown-code-blocks

Conversation

@pc-style

@pc-style pc-style commented Sep 9, 2026

Copy link
Copy Markdown
Owner

When an agent replies with a code block that itself contains a fenced block (a prompt to paste, a README snippet), the chat renders it broken: the inner closing fence ends the outer block and the rest of the content spills out as plain prose. The renderer is right, that is standard CommonMark. The agent just never knew it had to use a longer fence.

This adds one sentence to the shared runtime instructions every provider adapter appends (Codex, Claude, Cursor, Grok, OpenCode, Antigravity): a code block containing triple backticks must be fenced with four backticks or ~~~. No parser change, since diverging from CommonMark would break copy/paste round-trips with GitHub and every other markdown surface.

Validation:

  • vp test run apps/server/src/provider/RuntimeInstructions.test.ts passes (6 tests, including a new one for the guidance).

Done with Claude Fable 5.1 in Claude Code.

🤖 Generated with Claude Code

@pc-style

pc-style commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@pc-style
pc-style force-pushed the t3code/fix-markdown-code-blocks branch from f4a9b2b to c79ab38 Compare September 9, 2026 23:45
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XXL labels Sep 14, 2026
akj and others added 24 commits September 14, 2026 09:10
…de_modules (pingdotgg#11750)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…og (pingdotgg#11753)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Julius Marminge <51714798+juliusmarminge@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
… only (pingdotgg#11770)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…e palette open (pingdotgg#11762)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
… on the clone (pingdotgg#11774)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…1765)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…nect login (pingdotgg#11794)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…ingdotgg#11811)

Co-authored-by: Bil0000 <bilal.bakr.elsherif@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…rets (pingdotgg#11760)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
juliusmarminge and others added 30 commits September 18, 2026 12:55
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Co-authored-by: Julius Marminge <julius0216@outlook.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
…7861)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
…exists (pingdotgg#12540)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.