Skip to content

Add agent hooks for post functionality#172

Merged
pabloromeo merged 3 commits into
mainfrom
ddHooks
May 19, 2026
Merged

Add agent hooks for post functionality#172
pabloromeo merged 3 commits into
mainfrom
ddHooks

Conversation

@danieldiaz-qaa
Copy link
Copy Markdown
Contributor

This pull request adds a new unpublished post, "Your agent follows instructions. Until it doesn't.", which introduces and explains Agent Hooks in VS Code. The post provides a comprehensive overview of how Agent Hooks work, their importance compared to instructions and skills, practical usage examples, safety considerations, and integration with other customization features.

Key additions and themes:

New Content: Agent Hooks Overview

  • Adds a detailed markdown post (2.agent-hooks.md) explaining what Agent Hooks are, how they differ from instructions and skills, and why they matter for deterministic automation in agent workflows.

Practical Guidance and Examples

  • Includes practical code samples for defining and using hooks, such as auto-formatting files, blocking destructive commands, and injecting runtime context into agent sessions.
  • Explains the eight available hook events in VS Code, their lifecycle points, and how to use them effectively.

Safety and Troubleshooting

  • Highlights important safety considerations, including script permissions, validation of input, and preventing agents from editing hook scripts.
  • Provides troubleshooting tips for when hooks do not behave as expected, focusing on exit codes and the VS Code output channel.

Cross-Platform and Integration Notes

  • Notes compatibility and differences with Claude Code hooks, and how VS Code supports reading from Claude-style configuration files.

Copilot AI review requested due to automatic review settings May 14, 2026 14:53
@danieldiaz-qaa danieldiaz-qaa requested a review from a team as a code owner May 14, 2026 14:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new unpublished markdown post introducing VS Code Agent Hooks and how they fit into the broader Copilot customization workflow.

Changes:

  • Adds a full Agent Hooks explainer post with lifecycle event descriptions.
  • Includes hook configuration examples for formatting, blocking commands, and injecting context.
  • Adds safety, troubleshooting, Claude compatibility, and customization-stack guidance.
Comments suppressed due to low confidence (1)

posts/danieldiaz-qaa/2.agent-hooks.md:210

  • This section states that VS Code hook inputs use camelCase, but the earlier PreToolUse example and parser use tool_name / tool_input in snake_case. One of these examples is wrong; align the payload shape and parser throughout the post so readers can copy a working hook.
- **Tool input property names**: Claude Code uses `snake_case` (e.g. `tool_input.file_path`), VS Code uses `camelCase` (e.g. `tool_input.filePath`)
- **Tool names**: different. Claude uses `Write`/`Edit`, VS Code uses `create_file`/`replace_string_in_file`

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread posts/danieldiaz-qaa/2.agent-hooks.md
@github-actions
Copy link
Copy Markdown

Dry-run output:

[UPDATED] [PUBLISHED] Stop getting generic output from Copilot. Teach it y… 
[CREATED] [PUBLISHED] Your agent follows instructions. Until it doesn't.    

@pabloromeo pabloromeo merged commit 4774d1d into main May 19, 2026
6 checks passed
@pabloromeo pabloromeo deleted the ddHooks branch May 19, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants