[FEATURE] Mods: a headless way to write .claude-plugin/types for CI type-checks

Status Open
Reported on v2.1.295
Maintainer reply None cached
Activity 0 comments · opened Oct 9, 2026

2.1.295 changed this: "Fixed generated type files being written into a --plugin-dir plugin's folder in -p and SDK sessions; they are now written only where a mod is being developed."

That broke type-checking in mod CI. A runner has no login, so the only way we had to get the declarations was letting a headless run lay them before it bailed:

- run: npm install -g @anthropic-ai/claude-code@latest
- run: claude --plugin-dir . -p hi || test -d .claude-plugin/types/claude-code
- run: npx --yes -p typescript@5 tsc -p .

On 2.1.294 that works. On 2.1.295 the run prints Not logged in · Please run /login, writes no .claude-plugin/types/, and tsc fails on every import type ... from 'claude-code'. Failing run: https://github.com/NahumLitvin/prismantis/actions/runs/37902921291

The plugin-authoring reference says "There is no command to run", so right now there is no supported way to type-check a mod in CI.

Could claude plugin validate (or a new claude plugin types <dir>) write the declarations, without auth? It already reads the manifest offline. Related: #99771, validate and test do not type-check TypeScript mods.

Workaround for now: pin the CI job to 2.1.294.

View original on GitHub ↗