Search the documentation
9 pages for additionalcontext.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…fer-a-tool-call-for-later). * For `PostToolUse` hooks, you can set `additionalContext` to append information to the tool result. To replace the tool's output before Claude sees it, set `updatedToolO…
Modifying system prompts
Claude Code CLI · in the page
agent-sdk/modifying-system-prompts
…ctions in the next user message you send. * **From a hook**: return [`additionalContext`](/docs/en/hooks#add-context-for-claude) from a `UserPromptSubmit` or `PostToolUse` [hook callback](/docs/en/age…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…n: NotRequired[str] updatedInput: NotRequired[dict[str, Any]] additionalContext: NotRequired[str] class PostToolUseHookSpecificOutput(TypedDict): hookEventName: Literal["PostToolUse"]…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…son?: string; updatedInput?: Record<string, unknown>; additionalContext?: string; } | { hookEventName: "UserPromptSubmit"; additionalContext?: string;…
Explore the context window
Claude Code CLI · in the page
context-window
…ettier after every file edit and reports back via `hookSpecificOutput.additionalContext`. That field enters Claude\'s context. Plain stdout on exit 0 does not. It is written to the debug log only.',…
Hooks reference
Claude Code CLI · in the page
hooks
…field the event supports is honored, including `permissionDecision`, `additionalContext`, `updatedInput`, and `systemMessage`, and the hook isn't reported as an error. * [Decision control](#decision…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…wer applies, in the order `deny`, `defer`, `ask`, `allow`. Text from `additionalContext` is kept from every hook and passed to Claude together. The example below registers two `PreToolUse` hooks on `…
Monitoring
Claude Code CLI · in the page
monitoring-usage
…v2.1.280 or later * `additional_context_chars`: Total characters of `additionalContext` returned by the matching hooks. Requires Claude Code v2.1.280 or later * `system_message_chars`: Total characte…
Week 23 · June 1–5, 2026
Claude Code CLI · in the page
whats-new/2026-w23
…">Stop and SubagentStop hooks</a> can return <code>hookSpecificOutput.additionalContext</code> to give Claude feedback and keep the turn going instead of being treated as an error</div> <div><code…