Skip to content

Strip markdown from the Stop notification response - #95

Open
morvy wants to merge 1 commit into
warpdotdev:mainfrom
morvy:fix/strip-markdown-stop-response
Open

morvy wants to merge 1 commit into
warpdotdev:mainfrom
morvy:fix/strip-markdown-stop-response

Conversation

@morvy

@morvy morvy commented Oct 13, 2026

Copy link
Copy Markdown

Warp shows the notification body as plain text, so markdown in the agent's last reply comes through literally. A typical Stop notification currently reads:

0.3.4 is fine.\n\n- **Your past releases:** 0.3.1 to 0.3.3 were ... `master` ...

Change

  • New strip_markdown helper in build-payload.sh. It removes heading markers, bullet and numbered-list markers, **, backticks, and [text](url) links (the text is kept), and turns newlines into spaces.
  • on-stop.sh runs the response through it before truncating to 200 characters, so the markup no longer uses up the character budget.
  • Underscores are left alone on purpose so identifiers like __init__ and snake_case survive. Single-* italics are left alone as well.

Tests

7 cases added to plugins/warp/tests/test-hooks.sh (bold/code, headings and bullets, numbered lists, links, underscores kept, plain text unchanged, empty input). The suite reports 73 passed, 0 failed.

I also ran the helper on the last reply of a real Claude Code transcript, and the notification text came out as plain prose.

Warp shows the notification body as plain text, so markdown in the
agent's last reply came through literally: **bold**, `code`, bullets,
headings and raw newlines. on-stop.sh now passes the response through a
new strip_markdown helper in build-payload.sh before truncating it.
Underscores are left alone so identifiers like __init__ survive.
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.

1 participant