github / github/app

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

Ouverte
#1,717 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Bugs
Langage dominant
Aucune donnée de langage
Étoiles
2.1k
Forks
153
Métriques de merge des PR
Aucune PR mergée en 30 j

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_

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par reproduire le comportement avec un fichier .claude/settings.json contenant des hooks qui dépendent de CLAUDE_PROJECT_DIR, en utilisant GitHub Copilot app v1.0.16. Déterminez comment les paramètres de Claude Code sont découverts et comment ce comportement pourrait être désactivé ou rendu compatible ; le travail est considéré comme terminé lorsque les hooks ne sont pas exécutés de manière inattendue ou que les utilisateurs disposent d’un contrôle de configuration documenté.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github
Domaine
desktop, developer-experience
Type d'issue
Bug
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
Calme
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.