What happens
When the inline-comment MCP tool (mcp__github_inline_comment__create_inline_comment) posts a comment whose body contains a suggestion block, and the suggested line contains both a double-quote and an apostrophe (e.g. an HTML/JSX tag with a quoted attribute plus a contraction), the body GitHub stores is corrupted: a span of the suggested line is silently deleted. Surrounding prose in the same comment — even prose that itself contains an apostrophe — is stored intact. Only the content inside the suggestion fence is mangled.
The result is a suggested change that would corrupt the file if applied, and it erodes trust in automated reviews.
Evidence / repro
Observed with anthropics/claude-code-action@v1 (GA, review mode) and its bundled github_inline_comment server.
The tool received this clean body argument (generalized; quotes/apostrophe preserved):
**Drop the trailing full-stop.** Single-sentence tooltips take no period.
```suggestion
<Tooltip title="We'll do the thing" placement="top" class="inline-flex items-center">
```
The comment stored on GitHub (fetched back via the REST API — i.e. the stored body, not a rendering artifact) was:
**Drop the trailing full-stop.** Single-sentence tooltips take no period.
```suggestion
<Tooltipll do the thing" placement="top" class="inline-flex items-center">
```
i.e. the span title="We' was deleted: <Tooltip title="We'll do the thing" → <Tooltipll do the thing". The deletion begins at the space before the attribute and ends at the apostrophe inside the double-quoted value.
I cross-checked the underlying telemetry (OTEL_LOG_RAW_API_BODIES=1):
- the model's
api_response_body contained the clean input;
- the
tool_result event recorded success=true with tool_input_size_bytes matching the clean input.
So the corruption happens inside the tool's POST path, not in the model output. The prose half of the same comment (which also contains an apostrophe, e.g. "don't") was stored verbatim — only the suggestion block was affected.
Expected
The suggestion block body should be sent to GitHub byte-for-byte as provided to the tool.
Notes / possible cause
- Specific to the
suggestion-block path (prose is unaffected); triggers on lines with embedded " and '. Possibly in logic that normalizes/reconciles a suggestion against the target line.
- The comment was also mildly mis-anchored (the target line had shifted by a few lines because commits landed during the review), in case re-anchoring of suggestions is part of the path.
Workaround
Avoid suggestion blocks for quote-heavy lines (HTML/JSX/quoted attributes); describe the change in prose, or use a plain (non-suggestion) fenced block.
What happens
When the inline-comment MCP tool (
mcp__github_inline_comment__create_inline_comment) posts a comment whose body contains asuggestionblock, and the suggested line contains both a double-quote and an apostrophe (e.g. an HTML/JSX tag with a quoted attribute plus a contraction), the body GitHub stores is corrupted: a span of the suggested line is silently deleted. Surrounding prose in the same comment — even prose that itself contains an apostrophe — is stored intact. Only the content inside thesuggestionfence is mangled.The result is a suggested change that would corrupt the file if applied, and it erodes trust in automated reviews.
Evidence / repro
Observed with
anthropics/claude-code-action@v1(GA, review mode) and its bundledgithub_inline_commentserver.The tool received this clean
bodyargument (generalized; quotes/apostrophe preserved):The comment stored on GitHub (fetched back via the REST API — i.e. the stored body, not a rendering artifact) was:
i.e. the span
title="We'was deleted:<Tooltip title="We'll do the thing"→<Tooltipll do the thing". The deletion begins at the space before the attribute and ends at the apostrophe inside the double-quoted value.I cross-checked the underlying telemetry (
OTEL_LOG_RAW_API_BODIES=1):api_response_bodycontained the clean input;tool_resultevent recordedsuccess=truewithtool_input_size_bytesmatching the clean input.So the corruption happens inside the tool's POST path, not in the model output. The prose half of the same comment (which also contains an apostrophe, e.g. "don't") was stored verbatim — only the
suggestionblock was affected.Expected
The
suggestionblock body should be sent to GitHub byte-for-byte as provided to the tool.Notes / possible cause
suggestion-block path (prose is unaffected); triggers on lines with embedded"and'. Possibly in logic that normalizes/reconciles a suggestion against the target line.Workaround
Avoid
suggestionblocks for quote-heavy lines (HTML/JSX/quoted attributes); describe the change in prose, or use a plain (non-suggestion) fenced block.