Skip to content

[Bug]: Attributes lines not written by AI to AI #761

@DraqueT

Description

@DraqueT

What broke?

Exactly what it says in the title. It can mis-attribute lines of code to AI when this is inappropriate.
AI: Tested with both gpt-5.3-codex and gpt-5.4
OS: Mac OS 15.5

Steps to reproduce

  1. Make changes to an existing file in a repo. Generally, try to make mistakes, or have code that is sloppy.
  2. Stage code, but do not commit.
  3. Using Codex, request a code review, but forbid any modification to code by Codex.
  4. Address the issues caught by codex, but specifically in a way that is contrary to the advice of the AI.
  5. Commit.

Expected vs actual behavior

Expected: The code is attributed entirely to human creation, as none was written by AI.
Actual: Despite the code being written entirely by human hands and in contradiction to the advice of the AI, many lines will be attributed to codex in the commit and the percentage bar.

Diagnostics (git-ai debug)

git-ai debug report
Generated (UTC): 2026-03-19T18:26:04.015666+00:00

== Versions ==
Git AI version: 1.1.15
Git AI binary: /Users/**********/.git-ai/bin/git-ai
Git binary path: /usr/local/bin/git
Git version: git version 2.33.0

== Platform ==
OS family: unix
OS: macos
Arch: aarch64
Kernel: Darwin 24.5.0 arm64
Hostname: **********
Shell: /bin/zsh
Current dir: /Users/**********

== Hardware ==
CPU: Apple M1 Pro
Physical cores: 10
Logical cores: 10
Memory: 16.00 GB (17179869184 bytes)

== Repository ==
In repository: true
Workdir: /Users/**********
Git dir: /Users/**********/.git
Git common dir: /Users/**********/.git
Branch: main
HEAD: **********
Remotes:
  origin = https://github.com/**********

== Git Config ==
Command: /usr/local/bin/git config --list --show-origin --show-scope
. . .
  global	file:/Users/**********/.gitconfig	user.email=**********
  global	file:/Users/**********/.gitconfig	user.name=**********
  global	file:/Users/**********/.gitconfig	http.postbuffer=**********
  global	file:/Users/**********/.gitconfig	core.autocrlf=input
  local	file:.git/config	core.repositoryformatversion=0
  local	file:.git/config	core.filemode=true
  local	file:.git/config	core.bare=false
  local	file:.git/config	core.logallrefupdates=true
  local	file:.git/config	core.ignorecase=true
  local	file:.git/config	core.precomposeunicode=true
  local	file:.git/config	remote.origin.url=https://github.com/**********
  local	file:.git/config	remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
  local	file:.git/config	branch.main.remote=origin
  local	file:.git/config	branch.main.merge=refs/heads/main
  local	file:.git/config	branch.main.vscode-merge-base=origin/main
  local	file:.git/config	pull.rebase=false

== Git AI Config ==
  config_file_path: /Users/**********/.git-ai/config.json
  git_ai_dir: /Users/**********/.git-ai
  runtime_config:
    {
      "git_path": "/usr/local/bin/git",
      "exclude_prompts_in_repositories": [],
      "include_prompts_in_repositories": [],
      "allow_repositories": [],
      "exclude_repositories": [],
      "telemetry_oss_disabled": false,
      "telemetry_enterprise_dsn": null,
      "disable_version_checks": false,
      "disable_auto_updates": false,
      "update_channel": "latest",
      "feature_flags": {
        "rewrite_stash": false,
        "inter_commit_move": false,
        "auth_keyring": false,
        "git_hooks_enabled": false,
        "git_hooks_externally_managed": false
      },
      "api_base_url": "https://usegitai.com",
      "prompt_storage": "default",
      "default_prompt_storage": null,
      "api_key": null,
      "quiet": false,
      "custom_attributes": {}
    }

== Git AI Login ==
Credential backend: file
Status: logged out

== Git AI Environment ==
No GIT_AI_* environment variables are set.

Extra context (optional)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions