Skip to content
BENIBIX Learn

additionalContext

AI⌨️ Claude CodeConfiguration

Also known as hookSpecificOutput.additionalContext

A hook field that adds a note for Claude to read.

Think of it like

It is like a sticky note in a book. The next reader finds it.

Example

Claude kept editing a generated file. Emma's hook adds a note each time, and Claude edits the source file instead.

Why it matters

It gives Claude the right fact at the right moment, not in a long file it read an hour ago.

Definition

additionalContext is a field in a hook's JSON output that adds text to Claude's context. Claude Code wraps it as a system reminder at the point the hook fired. Claude reads it on its next request, but it is not shown as a chat message. Each value is capped at 10,000 characters, and a longer one is saved to a file.

Example code

json
{
  "hookSpecificOutput": {
    "hookEventName": "PostToolUse",
    "additionalContext": "This file is generated. Edit src/schema.ts and run npm run gen instead."
  }
}
Tell Claude a file is generated.

Common mistake

Putting must-see text past the cap. Claude gets a file path and a preview, and may not open the file.

Key takeaways

  1. 1
    Text for Claude. Not a chat line.
  2. 2
    At the moment it fires. As a reminder.
  3. 3
    Capped. 10,000 characters.