Unexpected high token usage: schema validation error loads massive JSON into context
Problem
During a simple ~/.claude/settings.json edit session, a validation error caused the full JSON schema (~500+ lines) to be loaded into context, resulting in ~8% weekly token consumption for a single file edit operation.
Steps to Reproduce
- Edit
~/.claude/settings.jsonvia Claude Code - Make an edit that triggers schema validation (e.g. leaving an empty
envobject after removing a key) - The full JSON schema is dumped into the error message and loaded into context
Expected Behavior
Validation error should return a short, human-readable message pointing to the specific invalid field.
Actual Behavior
The entire JSON schema (~500 lines) is included in the error response and loaded into the conversation context, consuming a disproportionate amount of tokens for a simple edit operation.
Impact
Two conversations about settings configuration consumed ~16% of the weekly token limit on a Max plan. The schema validation error alone appears to account for a significant portion of this usage.
Environment
- Plan: Max
- OS: macOS 25.3.0 (Darwin)
- Claude Code CLI
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗