Add agent notes for Claude Code prompt-based hooks#142
Merged
nhorton merged 2 commits intoclaude/remove-formatting-instructions-RlKz2from Jan 23, 2026
Merged
Conversation
Add notes for AI agents working on jinja templates, specifically documenting that prompt-based hooks should not include response format instructions since Claude Code's internal instructions already specify the expected format. Reference: anthropics/claude-code#11786
Clarified instructions regarding response format in prompt-based hooks.
nhorton
added a commit
that referenced
this pull request
Jan 23, 2026
) * refactor: simplify prompt hook instructions to remove JSON formatting Remove explicit JSON response format instructions from prompt-based hooks. Instead of instructing to respond with {"ok": true} or {"ok": false, "reason": "..."}, use simpler language like "let the agent finish" or "have the agent keep working". Updated: - skill-job-step.md.jinja template - hooks_system.md documentation - Regenerated all skill files via deepwork install * Add agent notes for Claude Code prompt-based hooks (#142) * docs: add AGENTS.md for claude templates with prompt hook guidance Add notes for AI agents working on jinja templates, specifically documenting that prompt-based hooks should not include response format instructions since Claude Code's internal instructions already specify the expected format. Reference: anthropics/claude-code#11786 * Update AGENTS.md with clarification on response format Clarified instructions regarding response format in prompt-based hooks. --------- Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Added documentation for AI agents working on Claude Code jinja templates, specifically addressing best practices when implementing prompt-based hooks.
Changes
src/deepwork/templates/claude/AGENTS.mdwith guidance for prompt-based hook implementationDetails
This documentation clarifies a common pitfall when writing prompt-based hooks (e.g., Stop hooks with
type: prompt). Including redundant response format instructions can conflict with Claude Code's built-in behavior. The guide directs developers to rely on the framework's internal specifications rather than adding custom response format directives.