Skip to content

Comments

Fix/remove unneeded tool in review mode#439

Closed
uc4w6c wants to merge 2 commits intoanthropics:mainfrom
uc4w6c:fix/remove-unneeded-tool-in-review-mode
Closed

Fix/remove unneeded tool in review mode#439
uc4w6c wants to merge 2 commits intoanthropics:mainfrom
uc4w6c:fix/remove-unneeded-tool-in-review-mode

Conversation

@uc4w6c
Copy link
Contributor

@uc4w6c uc4w6c commented Aug 11, 2025

In review mode, the expected way to post comments is via Bash(gh issue comment:*) or mcp__github_inline_comment__create_inline_comment.
However, mcp__github_comment__update_claude_comment is included in the available tools even when no Claude comment existed.
https://github.com/anthropics/claude-code-action/blob/main/src/mcp/install-mcp-server.ts#L75

Updated prepareMcpConfig to include this tool only if claudeCommentId is set.

When claudeCommentId is not set, it causes an error on the MCP side, so this change has no impact.
https://github.com/anthropics/claude-code-action/blob/main/src/mcp/github-comment-server.ts#L41

uc4w6c and others added 2 commits August 11, 2025 15:37
Updated  to include  only if  is set.
Add test cases for github_inline_comment server installation in experimental-review mode:
- Include server when mode is experimental-review and isPR is true
- Exclude server when mode is not experimental-review
- Exclude server when isPR is false but mode is experimental-review

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
process.env.DEFAULT_WORKFLOW_TOKEN = oldTokenEnv;
});

test("should include github_inline_comment server when mode is experimental-review and isPR is true", async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added tests for the github_inline_comment server, which were previously missing.

@art-shen
Copy link

Would it properly attach comments to the parent review with this?

@uc4w6c
Copy link
Contributor Author

uc4w6c commented Sep 1, 2025

@amal
No. This fix only prevents the error, so it doesn’t add comments to the parent review.

@uc4w6c
Copy link
Contributor Author

uc4w6c commented Sep 1, 2025

Version 1.0.0 has been released and the review mode has been removed.
The new Agent mode resolves this issue, so I’m closing this PR.

@uc4w6c uc4w6c closed this Sep 1, 2025
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.

2 participants