github / github/app

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

Open
#1,717 0 comments 1 reaction 0 assignees View on GitHub
Bugs
Dominant language
No language data
Stars
2.1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

### 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_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the behavior with a .claude/settings.json file containing hooks that depend on CLAUDE_PROJECT_DIR, using GitHub Copilot app v1.0.16. Determine how Claude Code settings are discovered and how that behavior could be disabled or made compatible; done means the hooks are not unexpectedly executed, or users have a documented configuration control.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
desktop, developer-experience
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.