[BUG] claude-api built-in skill overflows 200k context window on first message from empty session

Resolved 💬 1 comment Opened Jul 1, 2026 by rezabidardev Closed Jul 1, 2026

Summary

The claude-api built-in skill loads too much content (~100–150k tokens) when invoked, making it impossible to use on models with a 200k context window (e.g. Sonnet 4.6). On a fresh session with no prior conversation, a simple first message like how to use sonnet 5 triggers the skill, which immediately causes "Context limit reached" before Claude can respond.

Steps to reproduce

  1. Open Claude Code with a 200k model (e.g. Sonnet 4.6 / ml-asset:static-model/claude-sonnet-4-6)
  2. Start a fresh session (empty context)
  3. Send first message: how to use sonnet 5
  4. Claude invokes claude-api skill
  5. "Context limit reached" — no response generated

Expected behavior

The skill should either:

  • Load lazily (detect language/topic first, load only the relevant sub-file)
  • Fit within a 200k context window from a fresh session
  • Have a lightweight entrypoint that answers without loading the full bundle

Actual behavior

Skill dumps the entire documentation bundle (all language sub-files: python/, typescript/, java/, go/, ruby/, csharp/, php/ + shared docs) into context in one shot, consuming ~100–150k tokens. Combined with fixed session overhead (~50k tokens for system prompt, tool schemas, MCP schemas), this immediately exceeds the 200k limit.

Environment

  • Claude Code version: 2.1.197
  • Model: ml-asset:static-model/claude-sonnet-4-6 (200k context window)
  • Platform: macOS
  • Reproducible by multiple users independently

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗