github / github/app

.claude/settings.json hooks are now automatically picked up in a non-configurable way

オープン
#1,717 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
Bugs
主要言語
言語のデータがありません
スター
2.1k
フォーク
153
PR マージ指標
30日以内にマージされた PR はありません

説明

### Short summary

claude hooks are now unexpectedly picked up automatically without a way to turn them off

### Affected version or release

v1.0.16

### Installation context

_No response_

### What happened?

In a recent update to the GitHub Copilot app (not sure which, but it began recently), I noticed weird errors in my sessions. It turns out they were caused by hooks in .claude/settings.json that were not previously picked up by the GitHub Copilot app. Claude Code users in the same repo were obviously not expecting their hooks to get picked up by anything other than Claude Code, so the hooks made use of Claude-specific environment variables like CLAUDE_PROJECT_DIR. I added a quick workaround with a fallback if the environment variable that worked on Windows but broke things for our devs on macOS, so I'm working on a second fix to an issue that should not have "appeared" in the first place.

I understand it's great that it tries picking up Claude hooks, but I couldn't find a way to turn it off, and others are likely to find this unexpected surprise feature to be a breaking change, especially if the hooks use Claude-specific environment variables like ours do.

### Steps to reproduce

Use a .claude/settings.json file with hooks configured that assume Claude Code, and that will definitely break outside of it. For instance, assuming CLAUDE_PROJECT_DIR is set.

### Expected behavior

Not picking up Claude Code settings as-is, and especially not without a way to configure it, and even less without a better compatibility layer. It's the automatic picking up of the Claude Code settings without a setting to control it that is the biggest issue.

### Additional context

_No response_

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、CLAUDE_PROJECT_DIRに依存するhooksを含む.claude/settings.jsonファイルを使用し、GitHub Copilot app v1.0.16で動作を再現します。Claude Codeの設定がどのように検出されるか、またその動作を無効化するか互換性を持たせるにはどうすればよいかを確認します。hooksが予期せず実行されないか、ユーザーが文書化された設定制御を利用できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
github
領域
desktop, developer-experience
issue の種類
バグ
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。