Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.242 Home All releases olderv2.1.241 v2.1.243newer
Claude Code v2.1.242

Plugin model calls are capped by an allowlist and a session budget

Under the hood
Useful2 Signal3
Plugins

Plugin-triggered model calls are limited to allowed models and a per-session token budget.

What

When a plugin asks Claude Code to run a model completion, the request is checked against the organization's allowed models and a per-session token budget, so a misbehaving plugin cannot spend a session's capacity.

Details
  • The requested maximum token count must be a whole number within a cap.
  • An estimated cost is reserved before the request and reconciled against actual usage afterwards.
  • Passing a fraction of the budget produces a warning log; passing the budget makes the call throw.
  • Behind the tengu_plugin_hooks_modules rollout flag.
Evidence

$.model.complete: the session's model budget for this plugin is spent

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.242 →