Repository navigation
Conversation
Claude Code saves additionalContext longer than 10,000 characters to a file and shows the model a preview, without asking it to read the file. The hook printed up to twenty 8 KiB messages and acknowledged all of them, so most would have been marked read and never seen. It now prints what fits whole under 9,000 characters, acknowledges only that, and leaves the rest for the next poll. The introduction is reworded as a statement of what arrived: the hooks documentation warns that text framed as an out-of-band command can trigger the model's prompt-injection defenses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RaEdVh9BoHFvqNF52ap71M
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Follow-up to #43, after checking the current Claude Code hooks docs:
additionalContext(and plain stdout) are capped at 10,000 characters; past that Claude Code stores the text in a file and passes only a preview + path, without asking the model to read it. The hook printed up to 20 × 8 KiB and acked them all. Now it prints what fits whole under 9,000 characters, acks only those, and says how many still wait (next poll orinbox.next).hookSpecificOutput.hookEventName+additionalContext) for PostToolUse and UserPromptSubmit is confirmed by the docs.Test: the real-hook test sends three ~7 KB messages and checks each poll prints exactly one, under 10,000 characters, and a fourth poll prints nothing.
🤖 Generated with Claude Code
https://claude.ai/code/session_01RaEdVh9BoHFvqNF52ap71M