github / github/app

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

Aperta
#1,717 0 commenti 1 reazione 0 assegnatari Vedi su GitHub
Bugs
Lingua principale
Nessun dato sulla lingua
Stelle
2.1k
Fork
153
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
github
Ambito
desktop, developer-experience
Tipo di issue
Bug
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Tranquilla
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.