[BUG] `SessionStart` hook output truncated to 2000 characters when 10,000 character limit exceeded

Resolved 💬 5 comments Opened Apr 6, 2026 by flux627 Closed Jun 28, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The documentation says that hook output his truncated after 10,000 characters, but I observe that if you breach this limit, the output is truncated to 2000 characters.

What Should Happen?

Output should be truncated to 10,000 characters when over the 10,000 character limit. Below is what is rendered to the model, templated with [SIZE], [PATH], and [TRUNCATED HOOK OUTPUT].

Error Messages/Logs

SessionStart:startup hook success: <persisted-output>
Output too large ([SIZE]KB). Full output saved to: [PATH]

Preview (first 2KB):
[TRUNCATED HOOK OUTPUT]
</persisted-output>

Steps to Reproduce

Create a hook that outputs more than 10,000 characters. Ask the model what it sees.

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.92

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗