Skip to content

Commits no longer verified due to forced use of git commit #282

@markelliot

Description

@markelliot

Describe the bug
In the last few days it seems like the system prompt has changed in a way where Claude is now instructed to strictly use git commit to produce commits. We prompt Claude to use the GitHub MCP integration which produces commits through GitHub's API and results in Verified commits.

To Reproduce
Create an issue and instruct Claude to create a PR with any commit.

Observe the commit does not show as 'verified' in the UI.

Observe in the logs that Claude chooses to use git commit over the MCP integration.

This is true even when supplying an additional custom instruction to use the MCP integration.

Expected behavior
Claude should not be forced to use git commit.

Screenshots
n/a

Workflow yml file

name: Claude Code
on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]
  issues:
    types: [opened, assigned]
  pull_request_review:
    types: [submitted]

jobs:
  claude:
    if: |
      (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
      (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
      (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
      (github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: read
      issues: read
      pull-requests: read
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: jdx/mise-action@v2
      - name: Run Claude Code
        id: claude
        uses: anthropics/claude-code-action@beta
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          custom_instructions: |
            Always open a pull request using the mcp__github__create_pull_request tool so that changes may be reviewed by the user."
            Always create commits using the mcp__github_file_ops__commit_files. Do not commit using the git cli.
          allowed_tools: "\
            Bash,\
            Task,\
            Glob,\
            Grep,\
            LS,\
            Read,\
            Edit,\
            MultiEdit,\
            Write,\
            TodoRead,\
            TodoWrite,\
            mcp__github_file_ops__commit_files,\
            mcp__github_file_ops__delete_files,\
            mcp__github_file_ops__update_claude_comment,\
            mcp__github__add_issue_comment,\
            mcp__github__add_pull_request_review_comment,\
            mcp__github__create_branch,\
            mcp__github__create_issue,\
            mcp__github__create_or_update_file,\
            mcp__github__create_pull_request,\
            mcp__github__create_pull_request_review,\
            mcp__github__delete_file,\
            mcp__github__get_commit,\
            mcp__github__get_file_contents,\
            mcp__github__get_issue,\
            mcp__github__get_issue_comments,\
            mcp__github__get_me,\
            mcp__github__get_pull_request,\
            mcp__github__get_pull_request_comments,\
            mcp__github__get_pull_request_files,\
            mcp__github__get_pull_request_reviews,\
            mcp__github__get_pull_request_status,\
            mcp__github__get_tag,\
            mcp__github__list_branches,\
            mcp__github__list_commits,\
            mcp__github__list_issues,\
            mcp__github__list_pull_requests,\
            mcp__github__list_tags,\
            mcp__github__push_files,\
            mcp__github__search_code,\
            mcp__github__search_issues,\
            mcp__github__search_repositories,\
            mcp__github__search_users,\
            mcp__github__update_issue,\
            mcp__github__update_issue_comment,\
            mcp__github__update_pull_request,\
            mcp__github__update_pull_request_branch,\
            mcp__github__update_pull_request_comment"

API Provider

[x] Anthropic First-Party API (default)
[ ] AWS Bedrock
[ ] GCP Vertex

Additional context
This functioned fine until a few days ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions