-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Bug
When using mcp__github_comment__update_claude_comment to post a comment containing an HTML comment marker like <!-- claude-code-review -->, the ! character gets escaped to \!, resulting in <\!-- claude-code-review --> being stored in the comment body.
Since <\!-- is not valid HTML comment syntax, GitHub renders it as visible text instead of hiding it.
Reproduction
- Configure a workflow that uses
claude-code-actionwith a prompt instructing Claude to include<!-- some-marker -->in a comment body viamcp__github_comment__update_claude_comment - Trigger the workflow
- Observe the posted comment contains
<\!-- some-marker -->(with\!)
Expected behavior
The HTML comment <!-- some-marker --> should be posted verbatim, so GitHub hides it as intended.
Actual behavior
The ! is escaped to \!, producing <\!-- some-marker --> which renders as visible text.
Root cause
This is likely bash history expansion escaping the ! character when the comment body passes through a shell context with double quotes. In bash, ! triggers history expansion inside double-quoted strings and gets escaped to \!.
Example
- PR: chore: add error logging to down migrations and password round-trip test shellhub-io/shellhub#5868
- Comment with the issue: chore: add error logging to down migrations and password round-trip test shellhub-io/shellhub#5868 (comment)
Environment
anthropics/claude-code-action@v1--model claude-opus-4-6- Using
track_progressandmcp__github_comment__update_claude_comment