中文摘要:DSH Desktop 0.9.1(core 0.1.5-rc.2)上,第三方外掛的 apply() 執行時 fiber 已是 inactive 狀態,導致 ctx.on / ctx.inject / ctx.tools.register / ctx.effect 全部被 Fiber.assertActive 拒絕。外掛靜默失效,宿主不中斷。0.6.3 上無此問題。
Environment
| Item |
Value |
| DSH Desktop |
0.9.1 (Windows 10/11 x64) |
Harness core (@deepseek-ai/*) |
0.1.5-rc.2 |
@deepseek-ai/cordis |
4.0.2 |
| Node |
v24.9.0 |
| Previous working version |
0.6.3 (core 0.1.1-rc.2) |
| Profile |
web |
| Onset |
Immediately after updating 0.6.3 → 0.9.1 |
Summary
On every launch of the web profile, several third-party plugins fail their apply() with:
Error: cannot create effect on inactive context
The thrown frames are always inside cordis:
at Fiber.assertActive (…/@deepseek-ai/cordis/lib/index.js:1132:9)
at Proxy.on (…/@deepseek-ai/cordis/lib/index.js:373:18) // ctx.on(...)
and the same happens for ctx.inject(...), ctx.tools.register(...), ctx.effect(...).
The plugin's own fiber is already inactive while its apply() is running.
Impact
- Affected plugins load but register nothing — silent, complete loss of function.
dsh-vision-router (never modified by the reporter) loses all vision routing.
dsh-context loses tool attribution.
@liustack/modlens loses its modlens_read_image tool.
dsh-my-guardian also cannot initialise and says so explicitly.
Each boot emits 12 × cannot create effect on inactive context.
Reproduction
- Fresh DSH Desktop 0.9.1 on Windows.
- Launch the
web profile containing third-party plugins.
- Observe
%APPDATA%\dsh-desktop\logs\harness.log:
[2026-09-23T05:04:54.482Z] +6125ms [stderr] [modlens] modlens_read_image registration skipped:
Error: cannot create effect on inactive context
[2026-09-23T05:04:54.485Z] +6128ms [stderr] [harness-log] error dsh-context:
Error: cannot create effect on inactive context
[2026-09-23T05:04:54.485Z] +6128ms [stderr] [harness-log] at Fiber.assertActive
(…/@deepseek-ai/cordis/lib/index.js:1132:9)
[2026-09-23T05:04:54.485Z] +6128ms [stderr] [harness-log] at Proxy.on
(…/@deepseek-ai/cordis/lib/index.js:373:18)
[2026-09-23T05:04:54.485Z] +6128ms [stderr] [harness-log] at createToolAttribution
(…/dsh-context/lib/index.js:2045:6)
[2026-09-23T05:04:54.485Z] +6128ms [stderr] [harness-log] at new apply
(…/dsh-context/lib/index.js:3458:22)
[2026-09-23T05:04:54.485Z] +6128ms [stderr] [harness-log] at Fiber.execute
(…/@deepseek-ai/cordis/lib/index.js:1067:24)
[2026-09-23T05:04:54.485Z] +6128ms [stderr] [harness-log] at file:///…/profiles/web/#dsh-context
[2026-09-23T05:04:54.485Z] +6128ms [stderr] [harness-log] at file:///…/profiles/web/#include
Also emitted on every boot:
warn hmr: Error: failed to apply loader entry dsh-context (dsh-context): cannot create effect on inactive context
warn hmr: Error: failed to apply loader entry vision-router (dsh-vision-router): cannot create effect on inactive context
warn root: [dsh-my-guardian] loader/timer 服务尚未就绪 — guardian 等待局部 inject;本次 apply 暂不初始化(不 fatal)
Expected
A plugin's apply() should run on an active fiber, so that ctx.on / ctx.inject / ctx.tools.register create their effects normally. Registering a service consumer during apply must not be refused.
Hypotheses already tested and falsified (please skip these)
I spent significant effort ruling these out. None of them changed the outcome:
| # |
Hypothesis |
How it was falsified |
| 1 |
Plugin-specific bug in @liustack/modlens |
dsh-vision-router — never modified — fails identically |
| 2 |
.generations-deferred.json blocking the generation migration |
The error first appeared at 02:59:26; the deferred file was first written at 04:45:18 — an hour later |
| 3 |
The tool-registration call site itself |
Wrapping it changed the error's line number but not the outcome — it is a symptom |
| 4 |
Third-party bundles disabling core rows (id: workspace, `id: ui-sidebar``, …) |
Removing the two offending bundles made patch: entry ui-settings-unarchive-sessions not found go to 0, but the inactive-context errors were unchanged |
| 5 |
plugin node_modules entries being junctions into .generations/live/ vs. real directories |
Intervention test: replaced the junctions with real directories (verified byte-for-byte preservation of the generation targets). Result was identical, item for item |
| 6 |
Duplicate loader entry ids / double mounting |
No real duplicates; every plugin appears exactly once in dsh.profile.bundles; no insert: in the profile patch |
| 7 |
Generation closure bundling a second copy of @deepseek-ai/cordis |
The generation's node_modules contains no @deepseek-ai packages at all |
| 8 |
timer service missing |
It is a readiness-timing message, not a missing service; cordis-plugin-timer is present in core |
Intervention experiments 4 and 5 are the important ones: changing the hypothesised cause did not change the symptom at all. This strongly suggests the cause is inside cordis's fiber lifecycle during the bundle/plugin tree apply, not in any plugin or profile configuration.
Request
Please confirm whether include / bundle rows on 0.1.5-rc.2 are meant to apply plugins on a fiber that is still active, and whether the loader expects ctx.inject during a bundle apply to be deferred rather than refused.
Happy to provide the full harness.log, the profile's package.json / cordis.patch.yml, or to run any instrumented build you suggest.
中文摘要:DSH Desktop 0.9.1(core
0.1.5-rc.2)上,第三方外掛的apply()執行時 fiber 已是 inactive 狀態,導致ctx.on/ctx.inject/ctx.tools.register/ctx.effect全部被Fiber.assertActive拒絕。外掛靜默失效,宿主不中斷。0.6.3 上無此問題。Environment
@deepseek-ai/*)@deepseek-ai/cordis0.1.1-rc.2)webSummary
On every launch of the
webprofile, several third-party plugins fail theirapply()with:The thrown frames are always inside cordis:
and the same happens for
ctx.inject(...),ctx.tools.register(...),ctx.effect(...).The plugin's own fiber is already inactive while its
apply()is running.Impact
dsh-vision-router(never modified by the reporter) loses all vision routing.dsh-contextloses tool attribution.@liustack/modlensloses itsmodlens_read_imagetool.dsh-my-guardianalso cannot initialise and says so explicitly.Each boot emits 12 ×
cannot create effect on inactive context.Reproduction
webprofile containing third-party plugins.%APPDATA%\dsh-desktop\logs\harness.log:Also emitted on every boot:
Expected
A plugin's
apply()should run on an active fiber, so thatctx.on/ctx.inject/ctx.tools.registercreate their effects normally. Registering a service consumer duringapplymust not be refused.Hypotheses already tested and falsified (please skip these)
I spent significant effort ruling these out. None of them changed the outcome:
@liustack/modlensdsh-vision-router— never modified — fails identically.generations-deferred.jsonblocking the generation migrationid: workspace, `id: ui-sidebar``, …)patch: entry ui-settings-unarchive-sessions not foundgo to 0, but the inactive-context errors were unchangednode_modulesentries being junctions into.generations/live/vs. real directoriesdsh.profile.bundles; noinsert:in the profile patch@deepseek-ai/cordisnode_modulescontains no@deepseek-aipackages at alltimerservice missingcordis-plugin-timeris present in coreIntervention experiments 4 and 5 are the important ones: changing the hypothesised cause did not change the symptom at all. This strongly suggests the cause is inside cordis's fiber lifecycle during the bundle/plugin tree apply, not in any plugin or profile configuration.
Request
Please confirm whether
include/ bundle rows on 0.1.5-rc.2 are meant to apply plugins on a fiber that is still active, and whether the loader expectsctx.injectduring a bundle apply to be deferred rather than refused.Happy to provide the full
harness.log, the profile'spackage.json/cordis.patch.yml, or to run any instrumented build you suggest.