Repository navigation
Description
Pre-submission checklist
- I have searched existing issues and this hasn't been mentioned before
- I have read the project documentation and confirmed this issue doesn't already exist
- This issue is specific to MemOS and not a general software issue
Bug Description
Summary
In core/pipeline/deps.ts, attachSkillSubscriber is wired with llm: bgLlm (the main model), never bgReflectLlm (the dedicated client built from the skillEvolver config block). As a result the skill subscriber's LLM-backed work (crystallization evaluation, evolution) always runs on the main model regardless of skillEvolver.* config, and skillEvolver.lastOkAt never updates because the dedicated client is never invoked.
Root cause
// deps.ts, attachSkillSubscriber call
const skillHandle = attachSkillSubscriber({
repos: deps.repos,
embedder: bgEmbedder,
llm: bgLlm, // ← BUG: should be bgReflectLlm
bus: buses.skill,
l2Bus: buses.l2,
rewardBus: buses.reward,
log: log.child({ channel: "core.skill" }),
config: algorithm.skill,
...
});bgReflectLlm is constructed earlier in the same file specifically from the skillEvolver config block, but is only read for metadata (health/overview endpoint), never passed into the skill subscriber itself.
Verified via git log -L on this call site: it has never been wired to bgReflectLlm since the v2.0 Reflect2Evolve rewrite (60b97444) — this is not a regression, it's never worked.
Relation to #2148
This is a distinct instance of the same wiring-bug class fixed in #2148 (PR #2151) — that issue was about captureRunner's reflectLlm slot getting the wrong client (skill-evolver client where main llm was needed). This issue is the opposite direction: the skill subscriber never gets the dedicated skillEvolver client it's supposed to have. Different call site, not fixed by #2151.
Impact
- Operators configuring a distinct
skillEvolver.*model (e.g. to isolate skill-evolution cost/quality from the main model) get silently ignored — the mainllmhandles it instead. skillEvolver.lastOkAtin the overview/health endpoint readsnullindefinitely on any install that relies on it as a liveness signal for skill evolution, even when skill evolution is running fine (just on the wrong model).
Suggested Fix
const skillHandle = attachSkillSubscriber({
...
llm: bgReflectLlm ?? bgLlm,
...
});
Activity
Memtensor-AI commentedon Sep 14, 2026
🤖 AutoDev has picked up this issue and started working on it.
Task ID:
864b1ca0f6c45de2Working branch:
bugfix/autodev-2362-20260914203903343Target branch:
latest dev* branchWorkflow: opsp (analysis → coding → testing → PR)
I will post the PR link here once done. If I need more information, I will ask in the comments.
fix(pipeline): wire attachSkillSubscriber with bgReflectLlm
Memtensor-AI commentedon Sep 14, 2026
✅ AutoDev task
864b1ca0f6c45de2completed.Summary: Fixes #2362 —
attachSkillSubscriberinapps/memos-local-plugin/core/pipeline/deps.tswas wired withllm: bgLlm(the main model) instead ofbgReflectLlm(the dedicated client built from theskillEvolver.*config block). As a result, operators configuring a distinctskillEvolver.provider/skillEvolver.modelwere silently ignored — skill crystallization and evolution ran on the main model regardless — andoverview.skillEvolver.lastOkAtwas pinned tonullbecause the dedicated client was never invoked. This is a distinct instance of the wiring-bug class fixed in #2148 (opposite direction: that fix correctedcaptureRunner's slot; this one corrects the skill subscriber's slot). Verified viagit log -Lin the issue: this call site has never been wired tobgReflectLlmsince the v2.0 Reflect2Evolve rewrite.Change is a single line at
deps.ts:339:llm: bgReflectLlm ?? bgLlm. The??fallback preserves existing behaviour for installs without a distinctskillEvolverconfig block.Guarded by a new dedicated regression test
apps/memos-local-plugin/tests/unit/pipeline/skill-reflect-llm-wiring.test.ts(2 cases) mirroring the pattern ofcapture-reflect-llm-wiring.test.ts(the sibling #2148 guard). RED was reproduced before the fix (expected 'main-llm' to be 'skill-evolver-llm'); GREEN confirmed after. Full pipeline + skill-subscriber suite: 14 files / 92 tests pass, including the siblingcapture-reflect-llm-wiringandhealth-model-displayneighbours.npm run lint(tsc --noEmit) clean.Path classification: Bug quick-fix — one-line DI correction, no openspec artifacts required. Task file archived to sibling specs repo (memos-autodev-specs / main, commit
ff25a7f). Reviewer: @WeiminLee.Base branch:
mainBranch:
bugfix/autodev-2362-20260914203903343Commit:
d5b3beaPR: #2365
Assigned to: @wustzdy
Reviewers: @WeiminLee
chiefmojo commentedon Sep 16, 2026
Production confirmation — three-install fleet, all affected
Environment:
memos-local-pluginv2.0.16, Hermes host agent,skillEvolverconfigured with an explicit (non-inherited) provider/model. Three independent production installs.Call site still present. Verified against
main(176d4f67) and the newestdev-v2.0.30:deps.ts:339is stillllm: bgLlm, andbgReflectLlm(constructed at:220) is read only for metadata at:279-280. The AutoDev PR #2365 targetingdev-v2.0.34was closed unmerged, and no equivalent change has landed on either branch.Observed state —
GET /api/v1/health, identical shape on all three:Row evidence —
api_logswheretool_name='system_model_status':llmembeddingskillEvolverskillEvolverrowThe dedicated client is demonstrably not being used, and the skill work is running on the main model. Nothing looks wrong in the logs, which is the point: install A's reflection pass completes normally all day —
capture.reflect.done … llmCalls={reflectionSynth,alphaScoring,batchedReflection,…} warnings=0— against a dedicated model that is configured, built (reflectLlm.readyat every boot) and never called.Worth deciding alongside #2148 / PR #2151: that change deliberately moved the capture batch-reflection path off the dedicated client onto the main
llm. Taken together with this issue, both the capture and the skill-subscriber reflection paths now land on the main model, so a distinctskillEvolver.*config is effectively inert on a current install. Confirming the intended routing for both call sites at once seems worth doing while this is open.A second defect in the same card, independent of the wiring
Even once the wiring above is fixed, this card can still misreport, because the lookup is a fixed top-N scan that filters after the limit:
findLatestPersistedModelStatus()(memory-core.ts:5900) callsapiLogs.list({ toolName: "system_model_status", limit: 500 })(:5913) and only then comparesrole/provider/model.On installs B and C the newest
skillEvolverrow sits 2,193 and 4,896 status rows below the head of that table — outside the 500-row window — so the row exists but is unreachable. The endpoint then falls back to a per-process in-memory counter that resets tonullon every bridge restart, which is what presents as "Not called yet" indefinitely.The tell is that B and C do have history: their most recent
skillEvolverrows are dated 2026-08-29 and 2026-08-23. On those installs the card is not reporting a stale slot — it is reporting nothing, because it cannot see the rows.Since that is a distinct root cause from the wiring bug, I've opened it separately as #2380 so it isn't lost in this thread.
Environment and fuller logs available on request.
chiefmojo commentedon Sep 17, 2026
Addendum — the rolling cap, and a date for the silence
Re-running the same query three hours later produced two things.
1.
api_logsis a rolling 10,000-row window, so the counts above decay.skillEvolverrowsInstall C lost 96
skillEvolverrows in three hours — its oldest rows were the evicted ones — while gaining 380 rows above the target. That's a corollary for this class rather than a problem with the fix: the evidence that a low-frequency slot used to fire is itself on a clock, and on a busy install it ages out within weeks of the slot going quiet.2. The silence has a date, and it matches a change in this same wiring family.
The two installs that still hold history show:
git log -S"reflectLlm: deps.reflectLlm"oncore/pipeline/deps.tsreturns exactly two commits: the v2.0 Reflect2Evolve rewrite that introduced it, and the merge that replaced it withreflectLlm: deps.llm— carrying the fix for #2148 / PR #2151, with the explanatory comment citing that issue.That reconciles this report with #2148 rather than contradicting it. Before that change landed here,
captureRunnerwas the only caller of the dedicatedskillEvolverclient, which is why it was the only source ofsystem_model_statusrows for that role. Once it moved to the mainllm, the slot went silent — whilebgReflectLlmis still constructed and still advertised to the Overview card, so the card shows a configured model that nothing invokes.Which is why the two issues are worth landing as a pair:
Neither alone gets the card telling the truth. Raw row dumps, the per-install dates, or the
git log -Soutput available on request.github-actions commentedon Oct 18, 2026
This issue has been automatically marked as stale due to inactivity.
github-actions commentedon Oct 27, 2026
This issue has been automatically closed due to inactivity.