Skip to main content
← Back to list
01Issue
BugShippedSwamp CLIPublic
Assigneesstack72

Relationships

#2846 Model add-ons that extend a built-in model type never attach in CLI processes

Opened by stack72 · 9/30/2026· Shipped 10/2/2026

Summary

An extension add-on (export const extension) whose target is a built-in model type such as command/shell is catalogued and reported healthy by swamp doctor extensions, but its methods never attach in a normal CLI process. model method run fails with unknown_method, and model type describe lists only the built-in methods. The same add-on targeting a local model type attaches fine. Found while live-testing swamp-club#2745.

Steps to reproduce

  1. swamp repo init --tool none in a scratch dir.
  2. Add extensions/models/localaddon.ts exporting extension with type command/shell and one method, hello.
  3. swamp model create command/shell shelly --global-arg run=true
  4. swamp model method run shelly hello

Result: unknown_method, Available methods: execute. Reproduced on the released binary (20260929, sha cd8f2d24) and on current main. Wiping .swamp/_extension_catalog.db and .swamp/bundles does not help. Pulled add-ons behave the same way.

Why (from reading the code)

Add-ons are attached by attachPendingExtensionsForType, which runs only from loadSingleType (lazy extension types), for types whose rows were re-bundled in the current catalog pass, or from the auto-resolver after it loaded new bases. Built-in types are registered eagerly, so ensureTypeLoaded returns early and none of these paths runs for them on a warm start. In swamp serve the add-on does attach, because a hot reload's discovery pass fully loads pulled extension dirs.

Expected

An add-on that extends a built-in type attaches wherever the type is used, as it does for local types.

02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 15 MOREREVIEW+ 21 MOREPR_MERGED+ 2 MORESESSION_SUMMARIZED

Shipped

10/2/2026, 11:43:49 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/2/2026, 5:44:08 PM

Sign in to post a ripple.