Skip to content

[Bug]: AI-authored code is not detected (0%) in Cursor remote SSH environment #674

@lujunzhi-available

Description

@lujunzhi-available

What broke?

When using Cursor (the AI IDE) with a Remote-SSH connection to a Linux server, the git-ai extension and CLI fail to track code generated by Cursor's AI (Composer/Tab). Even after applying AI-generated changes, running git-ai status shows you: 100% / ai: 0%. It seems the extension cannot intercept or attribute the edits made by Cursor's internal AI engine in a remote environment.

Steps to reproduce

1.Connect to a remote Linux server via SSH in Cursor.
2.Install git-ai extension both locally and on the SSH host.
3.Install git-ai CLI on the remote server (built from source if necessary).
4.Use Cursor's AI (Cmd+K or Composer) to add new code to a file.
5.Click "Accept" to apply the changes.
6.Run git-ai status in the integrated terminal.
7.Observed Result: The new lines are attributed to the human user (100%), and AI attribution remains 0%.

Expected vs actual behavior

Expected: Code generated and applied by Cursor's AI should be correctly identified as "ai" authored lines, reflecting an accurate percentage in git-ai status.
Actual: All code changes are attributed to the human user ("you: 100%"), even if they were entirely generated by Cursor's AI engine.

Diagnostics (git-ai debug)

luozuochen@<SERVER_HOSTNAME>:~/<PROJECT_PATH>$ git-ai debug
git-ai debug report
Generated (UTC): 2026-03-12T08:09:28.643002147+00:00

== Versions ==
Git AI version: 1.1.11
Git AI binary: /mnt/luozuochen/.git-ai/bin/git-ai
Git binary path: /usr/bin/git
Git version: git version 2.50.1

== Platform ==
OS family: unix
OS: linux
Arch: x86_64
Kernel: Linux 4.15.0-156-generic x86_64
Hostname: <HIDDEN_HOSTNAME>
Shell: /bin/bash
Current dir: /mnt/luozuochen/workspace/<HIDDEN_DIR_STRUCTURE>/Seedpace-pmu

== Hardware ==
CPU: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
Physical cores: <unavailable>
Logical cores: 56
Memory: 62.80 GB (67429449728 bytes)

== Repository ==
In repository: true
Workdir: /mnt/luozuochen/workspace/<HIDDEN_DIR_STRUCTURE>/Seedpace-pmu
Git dir: /mnt/luozuochen/workspace/<HIDDEN_DIR_STRUCTURE>/Seedpace-pmu/.git
Git common dir: /mnt/luozuochen/workspace/<HIDDEN_DIR_STRUCTURE>/Seedpace-pmu/.git
Branch: <HIDDEN_BRANCH_NAME>
HEAD: 512629a8a551d841e240d51d94807545af3e9d52
Remotes:
  <REMOTE_NAME> = <HIDDEN_REMOTE_URL>

== Git Config ==
Command: /usr/bin/git config --list --show-origin --show-scope
  global    file:/mnt/luozuochen/.gitconfig user.name=<HIDDEN_USER_NAME>
  global    file:/mnt/luozuochen/.gitconfig user.email=<HIDDEN_USER_EMAIL>
  global    file:/mnt/luozuochen/.gitconfig core.editor=vim
  global    file:/mnt/luozuochen/.gitconfig core.autocrlf=input
  global    file:/mnt/luozuochen/.gitconfig http.cookiefile=<HIDDEN_PATH>/.gitcookies
  global    file:/mnt/luozuochen/.gitconfig commit.template=~/.gitmessage.txt
  global    file:/mnt/luozuochen/.gitconfig safe.directory=<HIDDEN_SAFE_DIRECTORY>
  local     file:.git/config        remote.<REMOTE_NAME>.url=<HIDDEN_REMOTE_URL>
  local     file:.git/config        remote.<REMOTE_NAME>.projectname=<HIDDEN_PROJECT_NAME>

== Git AI Config ==
  config_file_path: /mnt/luozuochen/.git-ai/config.json
  git_ai_dir: /mnt/luozuochen/.git-ai
  runtime_config:
    {
      "git_path": "/usr/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": true,
      "disable_auto_updates": true,
      "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

    agent-supportSupport for an AI coding agentbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions