$TOOL_INPUT_FILE_PATH for chat hooks doesn't work
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beschreibung
### Describe the bug
https://code.visualstudio.com/docs/copilot/customization/hooks#_quick-start-your-first-hook
I tested the exact script provided there (prettier) and it complains
`2026-05-10 19:33:34.811 [info] [#38] [PostToolUse] Output: [error] No parser and no file path given, couldn't infer a parser.`
So I did a print of that variable, it doesn't seem to parse/pass correctly.
```
{
"hooks": {
"PostToolUse": [
{
"type": "command",
"command": "echo \"file path is $TOOL_INPUT_FILE_PATH\"",
}
]
}
}
```
2026-05-10 20:24:19.441 [info] [#42] [PostToolUse] Output: file path is
### Affected version
VS 1.119.0
### Steps to reproduce the behavior
Literally https://code.visualstudio.com/docs/copilot/customization/hooks#_quick-start-your-first-hook
And then tell copilot to make an edit and watch the github copilot chat hooks output
### Expected behavior
$TOOL_INPUT_FILE_PATH to be populated with the path of the file edited by copilot.
### Additional context
_No response_
Beitragsleitfaden
Rechercherichtung
Beginne mit dem verlinkten VS Code Copilot hooks quick-start und reproduziere den Prettier-Befehl unter VS 1.119.0. Prüfe die Ausgabe des PostToolUse-Hooks auf TOOL_INPUT_FILE_PATH und vergleiche sie mit dem Pfad der bearbeiteten Datei. Erledigt bedeutet, dass die Variable bei einer Bearbeitung befüllt ist und das dokumentierte Skript ohne den Parser- oder Missing-Path-Fehler ausgeführt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- shell, vscode
- Bereich
- cli, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100