Follow Discord
Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
Claude Code v2.1.271 ·

Plugins can now declare TypeScript type contracts for /plugin-types

Plugins can declare a validated types file describing what they add, generated into a new claude-code-plugins.d.ts

TierUnder the hoodhow much it should matter to you
Useful2my rating, 1 to 5
Signal2worth watching, 1 to 5
AreaPluginswhat it touches
KindInternal Changesin v2.1.271,
Group of 5 Under the hood

Plugins can declare a validated types file describing what they add, generated into a new claude-code-plugins.d.ts

What

  • Plugin manifests (plugin.json) can now declare a types field pointing at a .d.ts file that describes the plugin's type contract: what it adds to the shared $ object via engine.create and declares on EngineInterface. The path must end in .d.ts and stay inside the plugin directory.
  • A new validator strictly checks the declared type contract: it rejects imports/requires/references, runnable code, stray tokens, non-ASCII or control characters, @ts- pragmas, and anything other than declare module 'claude-code' { ... } or type/interface exports.
  • Valid contracts are copied into a claude-code-plugins/ folder and referenced from a generated claude-code-plugins.d.ts file.
  • The /plugin-types command now writes this claude-code-plugins.d.ts file in addition to the existing claude-code.d.ts and claude-code-mcp.d.ts.
  • Plugin validation also reports, as a warning, which members of the plugin's declared interface it exposes on $.

Why

This lets plugin authors declare and get type-checking for the custom functionality their plugin adds, with /plugin-types generating declaration files that editors and tooling can use for autocomplete and validation.

Read from
Names in the bundletypes
Since it was published

The entry above is what we published on the day. These lines were added later, as Anthropic's own pages caught up, and they sit beside the original rather than replacing it.

Added since A small documentation edit on How the agent loop works touched a line naming types after this was published. All result subtypes carry `total_cost_usd`, `usage`, `num_turns`, and `session_id` so you can track cost and resume even after errors. Guard for these cases: agent-sdk/agent-loop see the edit
Confirmed since Anthropic's documentation has since written up types, on Persist sessions to external storage. Both SDK repositories include runnable reference adapters under [`examples/session-stores/`](https://github.com/anthropics/claude-agent-sdk-typescript/tree/main/examples/session-stores) in TypeScript and [`examples/session_stores/`](https:… agent-sdk/session-storage see the edit
How sure we are
One source agreesOne thing we can check says the same as this entry.
Anthropic's documentation agreesAnthropic's documentation has since written up types, on Persist sessions to external storage.

See this entry in the whole of v2.1.271 →

Feedback