This repository was archived by the owner on May 20, 2026. It is now read-only.
Fix agent-customization hooks reference: correct field names and PostToolUse format#3843
Closed
Copilot wants to merge 2 commits into
Closed
Fix agent-customization hooks reference: correct field names and PostToolUse format#3843Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
… tool names Co-authored-by: digitarald <8599+digitarald@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix field names and output format in hooks reference
Fix agent-customization hooks reference: correct field names and PostToolUse format
Feb 19, 2026
Contributor
|
@copilot Is this change very different from https://github.com/microsoft/vscode-copilot-chat/pull/3843/changes? |
Contributor
Author
No, this is the same PR - both point to commit 9b56e52. The branches Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The built-in
agent-customizationskill's hooks reference (copilot-skill:/agent-customization/references/hooks.md) had incorrect field names and output formats, causing agents to generate hooks that silently failed.Issues Fixed
Wrong field naming: Documentation didn't specify snake_case convention. Agents defaulted to camelCase (
toolName,toolInput) but VS Code contract requires snake_case (tool_name,tool_input,tool_use_id).Incomplete PostToolUse documentation: Missing input field list and output format. No mention of
tool_responsefield.Wrong output format: Documentation implied
systemMessagefor PostToolUse, but VS Code ignores this. Correct format ishookSpecificOutput.additionalContext.Missing tool name mapping: No documentation of what
tool_namevalues VS Code emits (e.g.,Edit,Read,Bash), forcing agents to guess.Changes
Added explicit snake_case convention (line 55)
Added PostToolUse input/output documentation (lines 92-115)
Input fields:
tool_name,tool_input,tool_use_id,tool_responseOutput format:
{ "hookSpecificOutput": { "hookEventName": "PostToolUse", "additionalContext": "Filtered result: ..." } }Added common tool names section (lines 124-132)
Lists 14 tool names by category: File Operations (Read, Edit, MultiEdit, Write, NotebookEdit), Search (Glob, Grep, LS), Execution (Bash, BashOutput, KillBash, Task), Network (WebFetch, WebSearch), Planning (EnterPlanMode, ExitPlanMode, TodoWrite), User Interaction (AskUserQuestion).
Added common input fields section (lines 57-64)
Documents
timestamp,hookEventName,sessionId,transcript_path,cwdfields present in all hook events.All field names and formats verified against
hookCommandTypes.ts,chatHookService.ts, andClaudeToolNamesenum.Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.