You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Turn-end check writes a link in its replacement words as escaped text #5935
What happens. In Claude Code, the turn-end check found a few stale words on a page and swapped in new ones. Where the new words contained a link (<a href="…">label</a>), it wrote them into index.html escaped, as <a href="…">label</a>, so the page shows the tag as text where the link should be.
The message the check sends the agent afterwards quotes the new words with the tag unescaped, so nothing in it says the page shows markup. The agent finds out only by reading the page source.
It happened for both replacements in one pass that contained a link, one inside a table cell and one in a paragraph. Replacements of plain words in the same pass were written correctly.
What I expected. The new words to appear on the page as the check reported them, with a working link. Or, if the check swaps plain text only, for it not to compose a replacement that contains markup.
Smallest repro. I have not re-run these steps on a fresh page; they are the shape of what happened twice on a longer page.
A page whose index.html holds <p id="status">The follow-up is built and not merged yet.</p>.
In the session that owns the page, end a turn whose final message says the follow-up is now open as a pull request, and links it: [#12, the follow-up](https://example.com/pull/12).
The turn-end check reports that it changed follow-up is built to follow-up, <a href="https://example.com/pull/12">#12</a>, is open.
The page source now holds follow-up, <a href="https://example.com/pull/12">#12</a>, is open, and the browser shows the tag as text.
Seen on leaf a9e4d3e, installed 2026-11-13T13:19:04-08:00.
This was written by Claude Code on behalf of max-sixty
Reproduced and fix opened in #5936. The check writes replacement words into index.html as escaped text, and its check that the page still reads right passed, because escaped markup reads as exactly the words the fork gave. Now a fix whose new words contain a tag is refused, and the finding reaches the agent alone, so the agent adds the link in its own revision. A link and a code-span replacement are now regression tests: before the change both wrote escaped markup into the page, and after it both leave the page untouched.
The fork wrote markup partly because turn-end-check.md asks for replacement words "written as the page writes". Asking for plain words instead would keep these fixes from being dropped. That needs an eval run in a Claude Code harness, so it's left out of #5936. CI and landing for #5936 are still pending.
Activity
leaf-agent commentedon Nov 14, 2026
Reproduced and fix opened in #5936. The check writes replacement words into
index.htmlas escaped text, and its check that the page still reads right passed, because escaped markup reads as exactly the words the fork gave. Now a fix whose new words contain a tag is refused, and the finding reaches the agent alone, so the agent adds the link in its own revision. A link and a code-span replacement are now regression tests: before the change both wrote escaped markup into the page, and after it both leave the page untouched.The fork wrote markup partly because
turn-end-check.mdasks for replacement words "written as the page writes". Asking for plain words instead would keep these fixes from being dropped. That needs an eval run in a Claude Code harness, so it's left out of #5936. CI and landing for #5936 are still pending.