github / github/copilot-cli

includeCoAuthoredBy: false is not inherited by task subagents; their commits still get the Co-authored-by trailer

Đang mở
#4,576 0 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

triage
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

Describe the bug

includeCoAuthoredBy: false in ~/.copilot/settings.json is respected by the interactive session, but is not inherited by task-tool subagents. Commits created by subagents still get the Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> trailer.

This is a follow-up to #3181, which added the opt-out. The setting works for the main session — it just doesn't reach spawned subagents.

Beyond silently ignoring the setting, subagents appear to be told the trailer is mandatory. During a plan-execution run, one subagent amended an otherwise-finished commit purely to add it, and logged:

note: amended cleanup commit to <sha> to add the required Co-authored-by trailer; no file changes.

That "required" wording suggests the subagent's system prompt carries the coauthor instruction unconditionally, rather than gated on coauthorEnabled.

Affected version

GitHub Copilot CLI 1.0.80

Steps to reproduce the behavior
  1. Set the opt-out in ~/.copilot/settings.json:
    { "includeCoAuthoredBy": false }
    
  2. Start an interactive session in a git repo.
  3. Ask the main session to make a commit directly (e.g. via a shell git commit). ✅ No trailer — setting respected.
  4. Now delegate committing work to a subagent, e.g. via the task tool with agent_type: "general-purpose", instructing it to implement a change, commit it, and stop.
  5. Inspect the resulting commit:
    git log -1 --format='%b'
    
  6. ❌ The message contains Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>.

In my case 8/8 commits created by subagents carried the trailer, while every commit made directly from the main session had none. Stripping them across the branch required:

git rebase <base> --exec "git log -1 --pretty=%B | grep -v '^Co-authored-by:' | git commit --amend --quiet -F -"
Expected behavior

includeCoAuthoredBy: false should apply to all commits produced by the CLI, including those created by subagents — the setting reads as global, not session-scoped.

Additional context
  • The setting key itself is correct and current: app.js computes coauthorEnabled: T.includeCoAuthoredBy !== false, and includeCoAuthoredBy?: boolean is declared in sdk/index.d.ts. (The changelog entry for #3181 calls it include_coauthor, which no longer matches the settings.json key — minor doc drift, possibly worth fixing too.)
  • Ruled out as causes in my repo: no git hooks, core.hooksPath unset, and commit.template pointed at an empty file. Raw git commit from the main session never adds the trailer.
  • settings.json had includeCoAuthoredBy: false for ~2 weeks before the affected session, so this isn't a case of the setting being applied late.
  • Environment: macOS 26.5.2, arm64, zsh, iTerm2/agterm.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu trong app.js, nơi coauthorEnabled được tính toán, và sdk/index.d.ts, nơi includeCoAuthoredBy được khai báo. Theo dõi cách các subagent của task-tool nhận cài đặt và chỉ dẫn coauthor, sau đó tái hiện với includeCoAuthoredBy được đặt thành false và kiểm tra git log. Được xem là hoàn tất khi các commit do subagent tạo ra bỏ qua trailer khi bị tắt, trong khi hành vi mặc định vẫn được bật.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
git, shell
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
58/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.