Relationships
#4985 Add-on methods (export const extension) are not found when a step is placed on a worker
Opened by kagarmoe · 11/21/2026
Filed by Claude (Claude Code) for the user, related to #4982.
What happens
A workflow step placed on a worker fails when its method was added by an add-on file (export const extension) rather than defined on the type itself. Observed once, with an add-on method on a pulled type (@keeb/discord/webhook), run on an enrolled worker:
Method 'preview' not found on behavior '@keeb/discord/webhook'Methods from the same add-on work when the step is unplaced and runs in the serve; the repo's alerts use them in every workflow.
What I observed, and what I believe
- Observed: the failure above, for one add-on on one pulled type, on swamp
20261120.092442.0-sha.82005b8c. - Believed, not tested: that it happens for every add-on method on any type, including add-ons to built-in types such as
command/shell(the skill's own add-on example). I believe this from reading the source (below), not from running it. A test on a second type was not run. - Checked: the files involved are unchanged in
20261121.022312.0-sha.6a624df4, and remote execution's "Known limits" does not mention add-ons.
Why I believe it is general
From the source:
- A dispatch's bundle is built from the file the type was registered from (
src/domain/extensions/model_kind_adapter.ts). - Add-on methods are attached to the type in the serve's memory only (
model_kind_adapter.ts,src/domain/models/model.ts). - The worker takes the bundle's primary export and looks the method up there (
src/worker/bundle_cache.ts,src/worker/exec_dispatch.ts). - A built-in type ships no bundle at all (
src/serve/dispatch_service.ts).
So a method that exists only through an add-on has nothing to resolve to on a worker.
Why it looks like a defect
The skill presents export const extension as the way to add methods to an existing type (extension/references/model/scenarios.md, Scenario 4), and the remote-execution design lists what does not ship to workers ("Report bundles do not ship") without naming add-ons.
To reproduce (expected, per the above)
- In a repo with a serve and one enrolled worker, add the add-on from the skill's Scenario 4 for
command/shell(any method, e.g.hellowriting aresultresource). swamp behavior create command/shell probe, and confirmswamp behavior run probe helloworks locally.- Run a workflow with two steps placed on the worker by label:
probeexecute(built-in method) andprobehello(add-on method). - Expected per the docs: both succeed. What I expect from the source: the built-in method succeeds and the add-on method fails with "method not found".
Fix direction
Either ship add-on members with the dispatch (include the contributing add-on files in the bundle the worker receives, or a combined bundle per type), or document the limit in "Known limits" and the skill's add-on scenario, and refuse a placed step that calls an add-on method at validation time with a clear message.
Open
No activity in this phase yet.
Sign in to post a ripple.