kai-voice-system.md tokens exceed maximum
When trying to install the kai-voice-system with this command Install @PAI/Packs/kai-voice-system.md use PAI_DIR="/home/john/.claude" and DA="Kai" , I got this error:
Error: File content (28780 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.
Is it possible to reduce the token count or is this acceptable for the voice system?
it still installed fine for me
Additional Data Point: Confirms Hard Limit Issue
I also experienced this exact error when attempting to work with the kai-voice-system pack. This is a real blocker for some installation paths, not just a warning.
Technical Context
Claude Code has a hard 25000-token limit for single file reading operations. The kai-voice-system.md at 28780 tokens exceeds this, causing the Read operation to fail entirely.
Why This Matters
While @ecielam reports it "still installed fine," that may depend on:
- Whether the installer uses Read (blocked) vs other access patterns
- Specific hook paths and initialization order
- Whether the error is caught/ignored in the installation workflow
Suggested Solutions
-
Split the pack into modular files: Break kai-voice-system.md into:
kai-voice-system.md(core config - <25k tokens)kai-voice-system-advanced.md(extended docs)kai-voice-system-api-reference.md(API details)
-
Document the limitation: Packs should be designed with Claude Code's token limits in mind
-
Update installation: Ensure installers use chunked reading (offset/limit parameters) for large files
This appears to be a broader architectural constraint affecting how large packs should be structured for Claude Code compatibility.
Mine hallucinated that it installed correctly, but it didn't.
Also got this
Input (from AI):
🎯 COMPLETED: Fixed the authentication bug in the JWT token refresh logic
Prosody Enhancement:
[✨ success] **Fixed** the authentication bug in the JWT token refresh logic!
This has been resolved in PAI v2.1.0!
All packs (including kai-voice-system) have been migrated from single markdown files to a directory-based structure:
kai-voice-system/
├── README.md # Overview (manageable size)
├── INSTALL.md # Installation steps
├── VERIFY.md # Verification checklist
└── src/ # Actual source code files
The token limit issue occurred because embedding all source code in a single markdown file exceeded 28k tokens. Now the code lives in separate .ts files in src/, and the documentation files are well under the limit.
To install, point your AI at the directory instead of the old .md file:
Install the kai-voice-system pack from PAI/Packs/kai-voice-system/
Thanks for reporting this - it was one of the driving factors behind the v2.1.0 directory structure migration!