Plugin hot-reload never picks up changed plugin code (stale QML component cache)
System details
13th Gen Intel(R) Core(TM), AMD Radeon AI PRO R9700
What's wrong?
Title: Plugin hot-reload silently reloads stale code — Qt.clearComponentCache doesn't exist in QML
Note: analysis and report generated with AI (GLM 5-3), but reviewed and tested by a human in the loop (me)
Summary
When a locally installed plugin's files change (e.g. after omarchy plugin update),
the shell notices and logs Local plugin changed, reloading: <id>, and plugin
services/widgets are re-instantiated — but they are re-created from the old
compiled QML, so the update has no effect until the whole shell is restarted.
Environment
- Omarchy 4.0.0-1 (stable channel,
4.0.0.alpha) - quickshell 0.3.0 (quickshell-git, revision 28771c7c)
- Plugin under test:
lobo.omaspaces(any third-party bar-widget plugin shows this)
Reproduction
- Install a git-managed bar-widget plugin at an older version, with the shell running.
- Run
omarchy plugin update <id>(or just edit a file under~/.config/omarchy/plugins/<id>/— the file watcher triggers the same path). - The shell logs
Local plugin changed, reloading: <id>and reloads. - Observe: the widget still runs the old code. Only
omarchy restart shellapplies the update.
Concrete example: after updating lobo.omaspaces to a version that added a
right-click handler on its workspace pills, right-click kept doing nothing
after the automatic reload; omarchy restart shell fixed it.
A minimal proof that edits are ignored by the reload: adding a visible change
(e.g. a marker character in the widget's label) plus a
Component.onCompleted: console.warn(...) line to the plugin's QML triggered
the reloading log line, but the marker never appeared and the log line never
fired — the live instance was re-created from the previous compilation.
Root cause
shell.qml reload path: file change → localPluginReloadTimer (line 61) →
reloadPlugins() (line 739) → finishPluginReload() (line 751):
if (typeof Qt.clearComponentCache === "function") Qt.clearComponentCache()
Qt.clearComponentCache is a C++-only method on QQmlEngine; it is not
exposed to the QML Qt object. Verified live — a quickshell config evaluating
typeof Qt.clearComponentCache prints undefined.
Because the guard is silently always false, the engine's in-memory component
cache is never cleared, and the subsequent Qt.createComponent(url) in
loadPluginWidget() (line 794) returns the cached stale Component for
the same URL. Qt's in-memory component cache is keyed by URL and is not
mtime-invalidated — only clearComponentCache() drops it.
Quickshell's own live-reload can't cover this either: it only watches files
under its config path (-p /usr/share/omarchy/shell), while plugins live in
~/.config/omarchy/plugins, outside that tree — which is why the custom
watcher exists in the first place.
The same stale-cache limitation applies to the shell rescanPlugins IPC
function: it re-runs syncPluginWidgets(), which for an unchanged entry-point
URL explicitly re-registers the existing (old) component
("If the component URL is unchanged, just refresh the metadata in place").
Expected behavior
omarchy plugin update (or any plugin file change) should take effect without
a manual shell restart — or, if that's not technically possible from QML, the
reload path should not silently pretend it succeeded.
Suggested fixes
- In
finishPluginReload(), detect that the cache cannot be cleared from QML (typeof Qt.clearComponentCache !== "function") and fall back to a full shell restart (theomarchy-restart-shellflow) instead of silently reloading stale code. - Simpler alternative: have
omarchy-plugin-update/omarchy-plugin-addinvokeomarchy-restart-shellwhen the shell is running. - Long-term: expose engine cache clearing (or a reload command) in quickshell
itself; there is currently no
quickshell reloadsubcommand, andkill+ relaunch is the only way to get a fresh engine.
Workaround
omarchy restart shell after any plugin update. (Note: omarchy refresh shell
also restarts but resets shell.json to defaults — not what you want.)
One correction, since it widens the fix options here:
there is currently no
quickshell reloadsubcommand, andkill+ relaunch is the only way to get a fresh engine
There's no CLI subcommand, but Quickshell.reload(hard: bool) is exposed to QML on QuickshellGlobal (present in the installed quickshell-core.qmltypes) and triggers Quickshell's generation-based reload — a new QQmlEngine with state transfer, so a fresh engine is reachable without killing the process.
PR #8766 takes that route, replacing the guarded Qt.clearComponentCache call with Quickshell.reload(false). Worth reading the discussion there before treating it as settled — it raises a teardown-safety question on quickshell 0.3.1 (use-after-free at the EngineGeneration boundary, quickshell-mirror/quickshell#956) that is still open.
I hit this exact issue too, on a bar-widget plugin of mine (~/.config/omarchy/plugins/privacyscreen, a ThinkPad privacy-screen indicator).
Reproduction: I edited the widget's .qml, saved, and the shell logged Local plugin changed, reloading: privacyscreen on every save — but the visible change never appeared, and neither did a Component.onCompleted: console.log(...) marker I added to the file. Service plugins (idle, polkit) reloaded fine; only the bar widget stayed on its old compiled version until omarchy restart shell.
root cause: I verified Qt.clearComponentCache is genuinely unavailable from QML on this install — strings /usr/bin/quickshell | grep clearComponentCache returns nothing and the Quickshell qmltypes expose no such method — so the guard in shell.qml (current finishPluginReload, line 757) is silently always false. The watcher and re-registration all work; the engine just hands back the stale compiled Component for the unchanged URL, and no new .qmlc cache entry is produced. That squarely matches the diagnosis in this issue.
PR #9606 fixes it: when the cache can't be cleared from QML, the reload path now falls back to a supervised shell restart via omarchy-restart-shell (so the fresh engine recompiles the plugin from source), coalesced with a pluginRestartPending flag so rapid saves don't pile up restarts. This turns the documented omarchy restart shell workaround into an automatic one — anyone editing plugin code under ~/.config/omarchy/plugins/ gets their changes on save instead of silent stale output.
Independent confirmation from a third plugin author. I hit this while fixing the zerobearing.omatalk bar widget (~/.config/omarchy/plugins/zerobearing.omatalk).
Same reproduction: I edited the widget's QML (added a Component.onCompleted: console.warn(...) marker and a heartbeat Timer), saved, and the shell logged Local plugin changed, reloading: zerobearing.omatalk — but the marker never fired and the widget kept running the previous compiled code until omarchy restart shell. After the restart the new code ran immediately, so the file on disk was correct all along.
That matches the root cause here: typeof Qt.clearComponentCache is undefined from QML, so the guard in finishPluginReload() is silently always false and the engine re-registers the stale compiled Component for the unchanged URL.
Environment: Omarchy 4.0.0-1, quickshell 0.3.0 (quickshell-git 28771c7c), Qt 6.11.2. omarchy restart shell remains the only reliable workaround. Watching #8766 / #9606 for the real fix.
Triaged against current quattro (d3d23fd). Confirmed in source — the diagnosis in the report holds up.
The guard at shell/shell.qml:780 is dead:
if (typeof Qt.clearComponentCache === "function") Qt.clearComponentCache()
clearComponentCache() is a plain, non-Q_INVOKABLE C++ method on QQmlEngine, so it is not on the QML Qt object and the branch never runs — which farangkao, aTotland and ryenski have each verified live, from three directions (typeof at runtime, the missing symbol in the quickshell binary, the qmltypes). Plugin QML enters the engine at four sites, all keyed on an entry-point URL that does not change when a file is edited: the replacement bar (shell.qml:246), services (:294), panels (:647) and bar widgets (:818). So the reload unloads and re-instantiates, and every one of those gets the previously compiled component back. It has never worked — the line arrived in 92246a50 and first shipped in 4.0.0-beta3 — and shell/README.md:164 still documents plugin reload on save as working.
Three plugin authors have now reproduced it independently, on lobo.omaspaces, privacyscreen and zerobearing.omatalk. #9772 is a fourth report of the same dead guard with a different surface: a plugin that gained a .js file mid-session, whose on-demand panel then failed to resolve it until a restart.
@rishwanth-th's correction is right, and it widens the options. Quickshell.reload(hard) is a real QML API: QuickshellGlobal is exported as the Quickshell singleton and declares reload(bool hard) in quickshell-core.qmltypes, both in the quickshell-git 0.3.0.r20.g28771c7 build these reports are against and in the quickshell 0.3.1-1 package Omarchy moved to in migrations/1787399318.sh. A fresh engine without killing the process is reachable. It is not a targeted reload, though: it rebuilds the whole configuration in a new EngineGeneration with Reloadable state transfer, and nothing QML-reachable evicts a single component or a single URL. Every route on the table therefore rebuilds the whole shell; the only choice is in-process or by restart. The cache-busting query string floated on #8766 is not a third way out — a relative import replaces the base URL's query, so Helper.js and sibling QML types still resolve to their canonical, still-cached URLs.
Two changes are up, and which one lands is a maintainer decision rather than a triage one:
- #9606 (aTotland) makes the documented workaround automatic: when the cache cannot be cleared, restart the shell through
omarchy-restart-shell. It does apply the edit. One finding worth naming here, since it is about this issue's fix rather than PR housekeeping: the fallback returns beforepluginRegistry.rescan(), so on the paths whereomarchy-restart-shellexits without restarting — a locked session most of all — the old process stays alive with panels closed, plugin widgets unregistered and a replacement bar unloaded, andpluginReloadinglatched true, so no later save recovers it. - #8766 (catlee) takes the
Quickshell.reload(false)route, which covers all four load sites at once, and is currently gated on quickshell-mirror/quickshell#956 — a use-after-free at generation teardown that Arch'squickshell 0.3.1-1predates.
So: restart the process on every plugin save, or reload in-process and wait for a quickshell package carrying the upstream teardown fix. That call is the maintainer's.
A second opinion was taken from codex at xhigh reasoning. It agreed on the mechanism and added two things this review had not: the fourth load site — the replacement-bar Loader, which had been counted as three — and that after a refused restart under #9606 no later save can recover, because reloadPlugins() returns early on pluginReloading with no scan left to clear it.
Corroboration from a service-kind plugin — the reports so far are all bar-widget plugins, and @aTotland's comment notes "service plugins (idle, polkit) reloaded fine; only the bar widget stayed stale" — but services are equally affected, which matches the triage note that services load at shell.qml:294 on the same unchanging-URL path.
Environment: Omarchy 4.0.0-1, quickshell 0.3.0 (quickshell-git r20.g28771c7), plugin h3nr1.d14z.notif-history (service + bar-widget entry points).
Reproduction: with the shell running, edit the plugin's Service.qml — e.g. change what an IpcHandler function returns. The journal logs Local plugin changed, reloading on every save and the service instance is destroyed and recreated, but the recreated instance answers omarchy-shell <target> <function> with the old code's output. Only omarchy restart shell swaps in the new behavior (a fresh process always loads the new file, so the file itself is fine).
Ruled out on my end: single write vs. rapid multi-write, explicit omarchy-shell shell rescanPlugins via IPC, cleared ~/.cache/quickshell/qmlcache, and a stale-instance/wedged-pluginReloading state (a fresh process + one clean single-file save also fails to swap).
Workaround remains omarchy restart shell — watching #8766 / #9606 for the real fix. Thanks for the thorough triage on this one.
Confirming the same stale-cache behavior for an overlay-kind plugin (not just bar-widget / service).
Environment: Omarchy 4.0.4-1, quickshell 0.3.1-1
Setup: third-party overlay at ~/.config/omarchy/plugins/havok.screen/ with entry point Overlay.qml.
Reproduction:
- Plugin root was a
PanelWindow(layer-shell). Summoned viaomarchy-shell shell summon havok.screen '{}'— appeared as aquickshelllayer (~320×200, top-right). - Changed the entry point to the documented
Item+FloatingWindowlifecycle pattern (same file URL). - Save triggered
Local plugin changed, reloading: havok.screen. Also ranomarchy-shell shell rescanPluginsmanually. - Re-summoned: still got the old layer-shell
PanelWindowsurface (visible inhyprctl layers), not anorg.quickshelltoplevel. - Only
omarchy restart shellthen summon produced the newFloatingWindowclient (class: org.quickshell, title: Screen Mirror) with no leftover layer.
Matches the dead Qt.clearComponentCache guard: unload/remount ran, but the unchanged entry-point URL kept serving the previously compiled component until process restart.
Confirmed still reproducible on Omarchy 4.0.4-1 / quickshell 0.3.1-1 on 2026-09-24. This is a local retest with an existing user bar-widget plugin, not just a source-code inspection.
Tested ~/.config/omarchy/plugins/arkohut.capture/BarWidget.qml (manifest: kinds: ["bar-widget"], entryPoints.barWidget: "BarWidget.qml"):
- Changed the
BarIconButton'stextfrom its screenshot glyph to"X"and added this at the plugin root:Component.onCompleted: console.log("RELOAD_VERIFY_20260924_V2 Qt.clearComponentCache=" + typeof Qt.clearComponentCache) - Saved and waited. The shell logged
Local plugin changed, reloading: arkohut.capture, but the original glyph remained and the new completion marker did not appear in the journal. - Called
omarchy-shell shell rescanPluginsand waited again. The completion marker was still absent. - Ran
omarchy restart shell. The bar immediately showedXand the journal printed:RELOAD_VERIFY_20260924_V2 Qt.clearComponentCache=undefined
Screenshots taken after the save and after restart confirmed the old glyph versus X. This also verifies at runtime that the guarded Qt.clearComponentCache call discussed above is unavailable on this installed version.
The temporary edits were restored byte-for-byte and the shell restarted to restore the original widget. No system-owned files were modified, and the existing QML cache was not cleared.
Posting here rather than opening another duplicate. This retest was performed with a coding agent; no proposed fix was tested.
A targeted, in-process route does exist. It needs no Quickshell.reload() and no restart: change the plugin's directory URL on each reload, not only the file's.
The engine caches by URL. With ?rev=N on the entry file (#7771, #10576), sibling types and import "x.js" still resolve against the unchanged directory, so they stay stale. If the plugin is loaded through a per-reload alias instead ($XDG_RUNTIME_DIR/omarchy-shell/plugin-src/<epoch>/<dir> → symlink to the real plugin dir), every URL under it is new and everything recompiles from disk. qs.* imports keep working.
Tested on Omarchy 4.0.4-1 / quickshell 0.3.1-1 / Qt 6.11.2 (ASUS GU605CP). The bar-widget has a sibling Sub.qml and an imported Helper.js. All three were edited, then rescanPlugins was called:
same path: C js=js1 sub=sub1 (stale)
new alias: D js=js2 sub=sub2 (all fresh)
All four load sites go through PluginRegistry.entryPointUrl(), so the change can stay in one place. Bump an epoch in finishPluginReload() in place of the dead guard. Have the rescan script create <epoch>/<dir> symlinks for third-party plugins and delete older epochs. Have entryPointUrl() return the alias path for non-first-party manifests, and keep __sourceDir real for the escape check, settings and scripts. Costs: old compiled units stay in memory, and the disk cache gains an entry per reload per file (bounded per session). Unlike #8766/#11408, this isn't gated on quickshell#956.
Filed by Claude Opus 5.5 via Claude Code.
Looked again at current quattro (902fd8aeb), after the four reports above and the change in which pull requests are open. The bug is still there. finishPluginReload() still guards the call with typeof Qt.clearComponentCache === "function" (shell/shell.qml:1499), and nothing else in the reload path changes a component's URL. All four plugin load sites still resolve through PluginRegistry.entryPointUrl() (shell/services/PluginRegistry.qml:118), which returns the same file:// URL however often the file is edited. Bar widgets, services and overlays are all affected, as the reports above found. keepLoaded services are not torn down at all (shell/shell.qml:1022), so a URL change alone would not refresh them either.
Since the last review, #9606 has been closed. Four open pull requests now offer fixes, and they differ in how much they refresh:
- #7771 (adamritter, the oldest) adds a
#reload=<revision>to entry-point URLs, per-plugin reload hooks, andQuickshell.reload(false)when imported QML or JS changes. One defect:reloadLocalPluginEntryPoint()treats a change as handled if any one widget instance handles it, so other instances of the same plugin that lack the hook, returnfalseor throw get no fallback reload. - #8766 (catlee) replaces the in-engine reload with
Quickshell.reload(false). Its last review stands: it conflicts withquattro, and once merged withquattroit fails thekeepLoadedchecks inruntime-smoke-testandplugin-auth-boundary-test. - #10576 (fresh3nough) appends
?omarchyReload=<epoch>to the entry-point URL. That fixes an edit to the entry file itself. A siblingFoo.qmlor animport "x.js"still resolves against the unchanged directory, without the query, so edits there stay stale. It closes #10568, a closed duplicate of this issue, rather than this one. - #11408 (thelonewander3r) calls
Quickshell.reload(false)when a.qml,.js,.mjsorqmldirchanges, and holds the reload while an authentication service has the session locked. That covers the whole import graph on save. A manualomarchy-shell shell rescanPluginsstill takes the old path, which after this change no longer even attempts to clear the cache.
@sergihrs's suggestion above is a different approach that none of these implements: load third-party plugins through a symlinked directory that changes on each reload. Then sibling types and relative imports get new URLs too, without rebuilding the whole engine and without waiting on quickshell-mirror/quickshell#956, which is still open. The second opinion found nothing in entryPointUrl() or __sourceDir that rules it out, as long as __sourceDir stays the real directory. Neither of us has run it.
Which approach lands is the maintainer's decision. This issue now waits on that. This review was done by Claude Opus 5.5 reading the source, without running a worker, since the bug is already reproduced above and proven in source. Codex Medium gave the second opinion and agreed on the mechanism. It can see this session's notes, so its agreement is not guaranteed to be independent. It added the #7771 fallback defect and the gap in #11408's rescanPlugins path, both checked against the source.
One more symptom from the same cause, not covered above: the cache also keeps load errors, so a file that was missing on first load stays "missing" after you create it.
Omarchy 4.0.4-1, qt6-declarative 6.11.2-1:
- Clone a bar plugin (
omarchy.clock) into~/.config/omarchy/plugins/<id>. RewriteBarWidget.qmlso aLoader { source: Qt.resolvedUrl("Panel.qml") }loads its popup, beforePanel.qmlexists. - Create
Panel.qml, then save it a few more times so the plugin hot-reloads. - After every reload, the log still shows:
It also shows a warning pointing toWARN scene: file:///…/plugins/<id>/Panel.qml[-1:-1]: No such file or directoryBarWidget.qmlline 129. That line exists only in the original clone; the current file has 70 lines.quickshell ipc showstill lists the clone'somarchy.clockIPC target, even thoughomarchy.clockis disabled. panelLoader.itemstaysnull, so clicking the widget silently does nothing. The plugin has no visible error, andomarchy plugin validateand qmllint both pass.
Loading the same files in a fresh Quickshell instance works, and omarchy restart shell fixes it. The same thing happens in a standalone qml6 test: after a file is created, Qt.createComponent keeps returning the cached "No such file" error.
This makes the bug especially confusing for new plugin authors who follow the develop guide and create files one by one: the plugin looks broken even though the code is correct. The directory-alias approach suggested above would also fix this case, because the new URL misses the cached error.
Looked again at current quattro (9830142), after @warpek's report and two open pull requests the last review missed. The bug is unchanged: finishPluginReload() still guards the call with typeof Qt.clearComponentCache === "function" (shell/shell.qml:1527), and PluginRegistry.entryPointUrl() still returns the same URL on every reload.
@warpek's case, a sibling file that was missing at first load and created afterwards, separates the fixes on offer. The cache keys on the sibling's URL. Qt.resolvedUrl("Panel.qml") resolves a relative path, which drops any query or fragment on the entry point's URL, so BarWidget.qml?v=3 still resolves to the unchanged Panel.qml and gets the cached "No such file" back. Only a fresh engine, or a new directory URL as @sergihrs suggested above, gets past it. Quickshell.reload(false) builds a new engine with its own type cache.
How the six open pull requests handle the three cases, for edits made by hand under ~/.config/omarchy/plugins/<id>/:
| PR | Entry-point edit | Sibling .qml/.js edit |
Sibling created after first load |
|---|---|---|---|
| #7259 (ilyaZar) | no | no | no |
| #7771 (adamritter) | yes | yes | yes |
| #8766 (catlee) | yes | yes | yes |
| #10576 (fresh3nough) | yes | no | no |
| #11408 (thelonewander3r) | yes, after unlock | yes, after unlock | yes, after unlock |
| #13911 (alexandresebrao) | yes | no | no |
- #7259, the oldest, does not touch the watcher. It replaces the rescan in
omarchy plugin updateandomarchy plugin removewithomarchy-restart-shell, so it helps only those two commands and restarts the whole shell after each. It references this issue without closing it. - #13911 appends
?v=<generation>to local entry-point URLs. It has the same limit as #10576, which its description states, but it is marked as closing this issue. Its generation counter is global, so any plugin reload gives every local plugin's entry point a new URL, including a reload caused only by a manifest change. - The defects named in the last review still stand: #7771's fallback when one widget instance handles a change, #8766's conflict with
quattroand failingkeepLoadedchecks, and #11408'srescanPluginspath.keepLoadedservices keep their live instance under every URL-based fix, #13911 included.
Which approach lands is still the maintainer's decision, and this issue waits on it. This review was done by Claude Opus 5.5, reading the source and the six diffs. No worker was run, since the bug is reproduced above and proven in source. Codex Medium gave the second opinion and reached the same table, citing Qt's QUrl::resolved() and Quickshell's EngineGeneration for the two facts it rests on. It can read this session's notes, so its agreement is not guaranteed to be independent. It added the global-generation point about #13911.
Still happens on the packaged release: Omarchy 4.0.6-1, Quickshell 0.3.2 (rev 2b4501a), qt6-declarative 6.12.0-1. The guard is now at shell/shell.qml:1473.
I edited a third-party bar widget's Panel.qml (io.github.androydified.omasony). The shell logged Local plugin changed, reloading, and omarchy-shell shell rescanPlugins didn't help either: an IPC function I had just added returned Function not found. Only omarchy-restart-shell loaded the new code. A minimal qs -p probe reports typeof Qt.clearComponentCache as undefined on this Quickshell.
Inline widget settings in shell.json are not affected, since they are data, not code. So a plugin option still applies live; only code edits need a restart.
Looked again at current quattro (087f73d), after @OuttaSpaceTime's report on 4.0.6 and the changes in which pull requests are open. The bug is unchanged. finishPluginReload() still guards the call with typeof Qt.clearComponentCache === "function" (shell/shell.qml:1528), and PluginRegistry.entryPointUrl() still returns the same URL on every reload. The manual omarchy-shell shell rescanPlugins takes the same path (shell/shell.qml:1790), which is why it did not help in that report either.
Since the last review, #13911 has been closed, and two new pull requests are open:
- #15023 (kstorm12) loads plugins through a directory symlink that changes on every rescan, the approach @sergihrs suggested above. It is the only one so far that recompiles sibling files without rebuilding the engine. As written it breaks the bar's indicators:
Indicators.qmlloads its icons from../indicators/, which resolves outside the new directory. It also starts the shim cleanup alongside the first scan, so cleanup can delete the links that scan has just made. It conflicts withquattro. - #15688 (chillboy0101) calls
Quickshell.reload(false)on a local plugin change and defers it whileomarchy.lockreports locked. That is the same approach as #11408, which is older. It reloads the whole engine on every write the watcher reports, not only.qml,.jsorqmldir, so a manifest, a README or a plugin's own runtime output also restarts the shell. Its lock check reads only theomarchy.lockentry'slockedproperty, so an open polkit prompt is torn down by a source edit, as it is on #11408.
#11408 (thelonewander3r) is the fix recommended to the maintainer, and it is marked as closing this issue. It was run on a disposable worker VM built from the Omarchy ISO: its runtime test fails on quattro and passes on the branch, for an edited QML file and an edited imported .js, and saves made while the session is locked wait until it unlocks. It is waiting on its author for one finding: a source edit while a polkit password prompt is open closes the prompt and fails the pkexec call. The details are on #11408.
This issue now waits on that fix. This review was done by Claude Opus 5.5, reading the source on quattro and the seven open diffs. No worker was run for this issue, since the bug is reproduced by six reporters above and proven in source. Codex Medium gave the second opinion and reached the same recommendation. It can read this session's notes, so that agreement is not guaranteed to be independent. It added the points about #15688 reloading on any file write and #15023's startup cleanup race, both checked against the source.
A fourth option, tested: a targeted in-process cache clear, if Quickshell exposes QQmlEngine::clearComponentCache() to QML. The options so far either rebuild the whole engine (#11408, #15688) or change every plugin URL (#15023). I have proposed the Quickshell side upstream: quickshell-mirror/quickshell#1363.
The Quickshell change is a 21-line Q_INVOKABLE void clearComponentCache() on the Quickshell global, next to reload(). I built it from quickshell-mirror 9b0f339 against Qt 6.12.0 and ran offscreen configs shaped like an Omarchy plugin: a plugin outside the config directory, loaded through a Loader, importing qs.Commons, with a sibling QML file.
What it does:
- A sibling file changed on disk is picked up after unload,
Quickshell.clearComponentCache(), and load. Without the clear it stays stale, as reported above. - The shell's own singletons stay shared: a
qs.Commonssingleton property set after the reload is seen by the shell and by the reloaded plugin alike. - The shell's live objects keep working, including their
.pragma librarystate. - Keeping the old
Componentreferenced from JS (aspluginWidgetComponentsdoes) did not stop the refresh. - The engine is not rebuilt, so nothing outside the reloaded plugin is torn down. I have not tested this against the lock screen or a polkit prompt.
Limits found:
- Asynchronous loads in flight at the moment of the clear never finish. 30 of 30
Component.Asynchronousloads stayed inLoading(without the clear, all 30 were ready). This reproduces in plain Qt 6.12.0 through PySide6, so it is Qt's behaviour, not Quickshell's. Filed as QTBUG-151759. Omarchy loads panels and widgets asynchronously, so the clear has to run only when nothing is loading: after unloading the plugins and before the rescan starts any load. - A plugin's own
pragma Singletonstays stale. The engine keeps singleton instances, andclearSingletons()would drop the shell's too. - New objects get fresh copies of
.pragma libraryscripts. Omarchy's only one,Commons/BorderGeometry.js, holds no state. keepLoadedservices keep their old code, as they do today.
On the Omarchy side it would replace the dead guard in finishPluginReload() with a call to Quickshell.clearComponentCache() (feature-checked, so older Quickshell keeps today's behaviour), made after the old plugin objects are gone and before the rescan loads anything.
Not tested: the real Omarchy shell running on the patched Quickshell. Compared with #11408 this avoids a full reload, but it needs a Quickshell release first and careful placement because of the asynchronous-load hazard.
@igouss, I checked the Omarchy side of the upstream proposal (quickshell-mirror/quickshell#1363) against current quattro (3c7027d).
- Where the call would go.
reloadPlugins()unloads panels, plugin services and widgets, then defers tofinishPluginReload()(shell/shell.qml:1510-1529). That is the point where the deadQt.clearComponentCacheguard sits. It is the only point where nothing the reload owns is still alive. - What could still be loading there. The shell itself has three kinds of asynchronous component load: panel
Loaders, the third-party barLoader, andQt.createComponent(..., Component.Asynchronous)inloadPluginWidget(). The panel model is cleared, includingkeepLoadedpanels. The bar loader is inactive whilepluginReloadingis set. The widget map is replaced, but a widget load that started just before the reload is not cancelled. After the rescan,syncPluginWidgets()starts a fresh request for that widget, because the old marker is gone. Nobody has tested whether that fresh request completes after the clear, given QTBUG-151759. - What stays alive. Eleven bundled plugins are
keepLoaded, lock and polkit among them, and they are kept through the reload. None of them loads a component asynchronously; the lock feedLoaderis synchronous. A user's ownkeepLoadedplugin could load components asynchronously, and the shell has no way to wait for that. - What it changes today. Quickshell 0.3.2, the current package, has no
clearComponentCacheon theQuickshellglobal. A feature-checked call would leave today's behaviour unchanged until a Quickshell release includes the method.
So this is a path that avoids rebuilding the engine. It depends on a Quickshell release first. On the Omarchy side it also needs a test on the real shell, covering a widget load in flight at the moment of the clear. Until then, the open fixes are unchanged. #11408 remains the one in front of the maintainer, and it still waits on its author for the polkit prompt finding. This issue waits on that.
This was a source review by Claude Opus 5.5, with no worker run. Codex Medium gave the second opinion and agreed. It can read this session's notes, so its agreement is not guaranteed to be independent.
Confirming on omarchy 4.0.6-1 with Quickshell 0.3.2 (2b4501a), in support of #15023.
Setup: a local plugin under ~/.config/omarchy/plugins/ whose entry QML loads several sibling files (Rim.qml, OsdFace.qml, Cutout.qml, …).
What happens: after an edit, the log shows Local plugin changed, reloading: <id>, but the sibling files stay at their old version. Line numbers in the warnings point to the old sources. Several reloads in a row (for example a git commit that touches a few files) can leave a mixed state: parts of the plugin's UI disappear, and other plugins log QQmlVMEMetaObject: Internal error - attempted to evaluate a function in an invalid context and TypeError: Cannot read property 'foreground' of null until the next omarchy-restart-shell.
Cause: the same as described above. In this build the guard is at shell/shell.qml:1473, and typeof Qt.clearComponentCache is "undefined", so the cache is never cleared.
Workaround tested: loading the same plugin through a new path on every reload (a timestamped symlink to the plugin directory) recompiles every file, siblings included. That is the approach #15023 takes, and it works here. Until a fix lands, omarchy-restart-shell after each plugin edit is the only reliable route. The packaged omarchy skill still says plugin code hot-reloads, which is misleading.
Still present on Omarchy 4.5.0rc2-1 (quickshell 0.3.2.r7.g2b4501a-1, qt6-declarative 6.12.0-2), and it also hits a freshly cloned bar widget, not only third-party or service plugins.
Repro
omarchy plugin clone omarchy.weather(the bar switches to<user>.weather)- Edit
~/.config/omarchy/plugins/<user>.weather/BarWidget.qml, e.g. add aComponent.onCompleted: console.log(...) - The log shows
Local plugin changed, reloading: <user>.weather, then nothing. The newconsole.lognever fires, andomarchy-shell shell rescanPluginsdoesn't change that. omarchy restart shell: the log line fires and the edit appears in the bar.
So the widget keeps running whatever was compiled at clone time, which makes the clone-then-edit workflow in plugins.md look broken until you restart. Same cause as described above: typeof Qt.clearComponentCache is "undefined", so the guarded call in finishPluginReload() never runs.
Looked again at current quattro (e2c7007) after the reports from @austrasien on 4.0.6 and @spaaghetti on 4.5.0rc2. The bug is unchanged: finishPluginReload() still only clears the component cache behind typeof Qt.clearComponentCache === "function" (shell/shell.qml:1536), and omarchy-shell shell rescanPlugins goes through the same path (shell/shell.qml:1816).
- Cloned bar widgets are the same bug.
omarchy plugin clonecopies the widget into~/.config/omarchy/plugins/<user>.<name>, which the local plugin watcher covers (shell/services/PluginRegistry.qml:726). So an edit to the clone'sBarWidget.qmltakes the same reload path and stays stale. #11408 reloads the shell for any.qml,.js,.mjsorqmldirchange under that directory, so as written it covers this case and the sibling-file case from @austrasien. - The shipped docs promise behaviour the shell does not have.
default/agents/skills/omarchy/plugins.md:123and:129-131,default/agents/skills/omarchy/SKILL.md:179anddocs/omarchy-shell.md:80and:120all say saved plugin code reloads automatically, andplugins.mdoffersrescanPluginsas the fallback, which hits the same bug. Until a fix lands,omarchy restart shellis the only way to apply a code change. Whether to correct those lines now or let the fix make them true is left to the maintainer. - #17034 is related but separate. It reports the shell crashing shortly after a plugin's files change, with the same
QQmlVMEMetaObject ... invalid contextwarning @austrasien saw after repeated reloads. That is a crash in the partial reload's teardown rather than stale code, and its cause is not established. It is not a duplicate of this issue. Nothing shows yet whether #11408 avoids it. - #11408 no longer merges cleanly. It now conflicts with
quattrointest/shell.d/runtime-smoke-test.sh.shell/shell.qmlandPluginRegistry.qmlstill merge without conflicts. It still waits on its author for the polkit prompt finding described there.
The other open approaches are unchanged since the last review (#7259, #7771, #8766, #15023, #15688), and #10576 has been closed. This issue waits on #11408.
This was a source review by Claude Opus 5.5, with no worker run, because nothing new needed running. Codex Medium and muse-wonder (via pi, high thinking) gave second opinions. Both agreed with the points above. Both can read this session's notes, so that agreement is not guaranteed to be independent. muse-wonder added the plugins.md:129-131 fallback line. Codex added docs/omarchy-shell.md:80. Both points were checked against the source.
Correcting an invalid full-bar plugin did not clear its old load error through file watching, explicit rescan, or bar re-selection. A shell restart loaded the corrected source. This adds a failed-load recovery case on ARM64 to #6981.
Environment
Observed on 2 November 2026:
- Architecture: AArch64, Asahi Linux.
- Omarchy:
omarchy-dev 4.0.0.r7544.g901af70-1. - Quickshell:
0.3.2.r7.g2b4501a-5. - Qt base and declarative:
6.12.0-3. - Local plugin:
kinds: ["bar"], with aBar.qmlentry point outside the packaged shell directory.
Recorded recovery sequence
This is the observed sequence, not a new minimal reproducer.
- An older local clone referenced
ScreenMoveRemap, which was absent from the installed shell. The journal repeatedly reportedScreenMoveRemap is not a typeatBar.qml:1714, then a fallback toomarchy.bar. - We removed the helper instance and its visibility condition. The resulting visibility expression matches the installed native bar. We confirmed that the old type name was absent from the saved source. No packaged files were edited.
- The watcher logged
Local plugin changed, reloading. We also ranomarchy-shell shell rescanPluginsand re-selected the bar throughomarchy bar use. The journal still reported the deleted type at its old line number. - After the session was unlocked, we ran
omarchy restart shell. The fresh process reported the corrected clone active, 31 widget slots, 29 reported visible, a mappedomarchy-barsurface, andpingreturningok. Its log had no removed-type or bar-fallback error. - One further plugin rescan retained the slot counts and working IPC. Null-property warnings from Indicators and Agent Status still appeared during reload. They did not prevent bar reconstruction in this check.
Scope and suggested regression coverage
The initial missing-helper error was local clone maintenance debt. The separate reload failure prevented corrected source from taking effect through the documented save/rescan workflow. These results are consistent with the stale component behavior already discussed here. We did not independently measure engine-cache internals or evaluate typeof Qt.clearComponentCache at runtime.
A useful regression case for the existing fixes is recovery from an already failed full-bar component at the same path:
- Correct the entry point, then verify that supported reload loads the new source and registers its widgets.
- Include sibling QML and imported JavaScript changes.
- Preserve a secure lock and an active polkit authentication request. Verify that deferred recovery completes without leaving the reload state latched or widgets missing.
These are proposed acceptance checks. We tested no candidate upstream patch, active-polkit reload, or sibling-file change in this session. The locked-session checks used the existing installed shell; they do not validate the lock safety of any proposed fix. The fix options and safety concerns already discussed here still apply.
The user's original intermittent disappearance was not captured in progress. These checks do not establish its complete cause. Successful restart and one further rescan do not establish long-term, suspend/resume, or physical visual acceptance.
Filed by GPT-6 via Codex. Local checks were executed by the agent with owner authorization.
Still present on the 4.5.0 release: Omarchy 4.5.0-3, Quickshell 0.3.2 (rev 2b4501a), Qt 6.12.0.
In a throwaway Quickshell config on this build, typeof Qt.clearComponentCache and typeof Qt.trimComponentCache are both "undefined" (Quickshell.reload is a function), so the guard in finishPluginReload() never fires.
Seen with a third-party bar widget: after changing its Panel.qml and Model.js and adding a sibling SettingControl.qml, the shell logged Local plugin changed, reloading: io.github.s-w-3.soundcore with no warning and kept showing the old panel. omarchy restart shell loaded the new code.