claude-api bundled skill overflows context on load (~210K tokens in one tool result → "Prompt is too long")

Status Closed — duplicate
Reported on v2.1.220
Maintainer reply None cached
Activity 1 comment · opened Jul 25, 2026 · closed Aug 15, 2026

What happened

Asking a single short question that triggers the claude-api bundled skill (e.g. "Is Opus 5 available on Bedrock?") causes the skill to inject its entire multi-language corpus in one tool result in a fresh session. In my transcript that payload was 847,560 characters (~210K tokens) — larger than the 200K context window — so the next request failed with Prompt is too long. The UI surfaced this as "context full / needs compaction," which is misleading: only one question had been asked.

Repro

  1. Fresh session, model with a 200K window.
  2. Ask a question that fires the claude-api skill trigger (names Claude/Opus/Bedrock/etc.).
  3. Skill loads → the next turn returns Prompt is too long.

Evidence (from transcript + on-disk skill)

The skill has no single SKILL.md on disk; the loaded content is assembled from shared/ plus every language variant:

| Component | Size |
|---|---|
| shared/ | 494 KB |
| python | 66 KB |
| typescript | 55 KB |
| java | 39 KB |
| go | 37 KB |
| php | 29 KB |
| csharp | 26 KB |
| curl | 17 KB |
| ruby | 16 KB |
| all .md combined | 779 KB |

The injected tool result measured in the session transcript was 847,560 chars — larger than all .md files combined. Every other record in the session was < 10 KB; this one payload was the sole cause of the overflow.

I did not re-run a fresh trigger this session (to avoid re-overflowing), so I'm reporting the observed transcript payload rather than asserting the load always includes all eight languages — but the on-disk layout and measured size are consistent with the full corpus being concatenated.

Expected

The skill should use progressive disclosure — load shared/ + the one detected/relevant language, or a small index that pulls sub-docs on demand — rather than concatenating all eight language variants. As shipped it can exceed a 200K-window model's context on the first load.

Environment

  • Claude Code 2.1.220 (latest published on npm at time of filing)
  • Bundled skills 2.1.219; skill claude-api. Note: the 2.1.219 changelog recently modified this skill ("Updated the claude-api skill to default to Claude Opus 5"), but no entry in 2.1.215–2.1.220 addresses skill payload size / context overflow.
  • Platform: macOS (darwin 24.6.0)

View original on GitHub ↗

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