Skip to content

[BUG] Claude Code intermittenly fails to include Co-Authored-By in git commit messages #58033

Description

@marcindulak

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

The commit messages often lack the expected Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> attribution. This behaved erratically as early as in Jnauary 2026, or maybe eariler, but recently the attribution appears to be lacking more often.

What Should Happen?

All commit messages include the attribution.

Error Messages/Logs

No errors printed in the CLI.

Steps to Reproduce

See https://github.com/marcindulak/learning-api-styles-gen-ai-experiments/pull/45/commits.

All commits, except the earliest three and the lastest commit should have the defailt Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> attribution added, but this is not the case.

This is the .claude/CLAUDE.md file used, and here is the prompt.

Here are the full project level .claude/settings.json

{
  "autoMemoryEnabled": false,
  "env": {
    "CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR": "1",
    "CLAUDE_CODE_DISABLE_AUTO_MEMORY": "1",
    "CLAUDE_CODE_DISABLE_FEEDBACK_SURVEY": "1",
    "CLAUDE_CODE_HIDE_ACCOUNT_INFO": 1,
    "DISABLE_AUTOUPDATER": "1",
    "DISABLE_ERROR_REPORTING": "1",
    "DISABLE_TELEMETRY": "1",
    "IS_DEMO": "1",
    "PIP_CACHE_DIR": ".cache/pip",
    "XDG_CACHE_HOME": ".cache",
    "npm_config_cache": ".cache/npm"
  },
  "model": "opus",
  "permissions": {
    "allow": [
      "Bash(behave *)",
      "Bash(cat *)",
      "Bash(docker *)",
      "Bash(find *)",
      "Bash(grep *)",
      "Bash(ls *)",
      "Bash(sort *)",
      "Bash(wc *)"
    ],
    "ask": [],
    "defaultMode": "default",
    "deny": [
      "Bash(git config *)",
      "Bash(git push *)",
      "Bash(sudo *)",
      "Edit(**/.gitconfig)",
      "Read(./.azure/**)",
      "Read(./.env)",
      "Read(./.terraform/**)",
      "Read(~/.aws/**)",
      "Read(~/.azure/**)",
      "Read(~/.config/gcloud/**)",
      "Read(~/.ssh/**)",
      "Read(~/.terraform.d/**)",
      "Write(**/.gitconfig)"
    ]
  },
  "sandbox": {
    "allowUnsandboxedCommands": false,
    "autoAllowBashIfSandboxed": true,
    "enabled": true,
    "network": {
      "allowAllUnixSockets": true,
      "allowLocalBinding": true
    }
  }
}

and here the user ~/.claude/settings.json

{
  "autoUpdatesChannel": "stable"
}

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

No response

Claude Code Version

2.1.126 (Claude Code)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

See the screenshot below of the example commits that lack attribution.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions