cowork install/status: home-discovery heuristic doesn't match current Desktop app storage, confirmed empirically after a full relaunch
Summary
iai-mcp cowork install/cowork status never find a Cowork home on a real, actively-used Windows install, even after a full quit, relaunch, and brand-new Cowork session, exactly the remedy cmd_cowork_install itself suggests ("rerun install after the first Cowork session"). This is a different bug than #114: #114 is about the combined capture-hooks status output being misleading about what "WIRED" means. This one is about _discover_cowork_homes() looking for files that this Desktop app version apparently never writes, regardless of usage history.
Follows up on #113 and #114, same machine, same install.
Environment: Windows 11, Claude Desktop appVersion 1.32352.0 (electron 42.9.2), iai_pme 3.0.1.
What the code checks
From src/iai_mcp/cli/_cowork.py:
def _cowork_session_roots() -> list[Path]:
...
if os.name == "nt":
appdata = os.environ.get("APPDATA")
base = Path(appdata) if appdata else home / "AppData" / "Roaming"
return [base / "Claude" / "local-agent-mode-sessions"]
...
def _looks_like_cowork_home(d: Path) -> bool:
return (
(d / "cowork_settings.json").exists()
or (d / "cowork_plugins").is_dir()
or (d / ".claude.json").exists()
)
It walks local-agent-mode-sessions/<account-uuid>/<device-uuid>/ and only counts a directory as a home if one of those three markers exists directly inside it.
What's actually on disk
Only one account uuid exists under local-agent-mode-sessions (fc1855e9-...), with one device uuid inside it (e15b7a21-...). That directory is demonstrably the live, actively-used home, not a stale one: it contains today's session data, rpm/ (the plugin cache) has entries like rpm/plugin_01J1ZUJcofzWJxiajSBsZ8US/.claude-plugin/plugin.json matching every marketplace plugin currently enabled in the session (cockroachdb, zoom-plugin, etc., visible in the running Cowork skills list).
Test-Path for the three files _looks_like_cowork_home checks for, run directly against that directory: cowork_settings.json → False, cowork_plugins → False, .claude.json → False.
A recursive search of every .json file in that home for the keys _patch_cowork_settings writes (extraKnownMarketplaces, enabledPlugins) found no real matches, only a false positive: the literal word "marketplace" inside a systemPrompt string in a session transcript, not a JSON key. So this app version's actual plugin-enablement mechanism (whatever loads rpm/plugin_<opaque-id>/ for the marketplace plugins that clearly are active) doesn't appear to go through a home-level settings file with this schema at all, at least not one visible client-side.
Empirical test (done live, at my request, specifically to rule out "just needs a fresh session")
- Before:
iai-mcp cowork status→Cowork homes: none found,status: INACTIVE. - Fully quit Claude Desktop (not just minimized), relaunched it, started a brand-new Cowork session.
- Confirmed the relaunch actually produced fresh state:
rpm/'sLastWriteTimemoved forward to match the relaunch, so this wasn't a stale read. - After:
iai-mcp cowork status→ identical output,Cowork homes: none found,status: INACTIVE. None of the three marker files exist.
Implication
The "rerun after the first Cowork session" guidance in cmd_cowork_install is misleading in a way #114 doesn't cover: it's not that Cowork had never been used, it's that even a demonstrably fresh, actively-used Cowork session on this app version never produces cowork_settings.json, cowork_plugins/, or .claude.json at the path the script looks in. As currently written, cowork install can't succeed on this app version no matter how many times the advice is followed.
What I don't know
I didn't find where this app version actually persists plugin enablement locally (if it does at all, it may be account/server-scoped rather than a local per-home file, the marketplace plugin IDs under rpm/ are opaque server-issued IDs, not directory-source plugins). Not proposing a fix here since I don't have visibility into the current Cowork plugin loader. Happy to help verify a candidate schema/path if someone with more context can point at one.
Update: tried the GUI's own "add from repository" path, same conclusion, ruled out fork-specific causes
Follow-up investigation, same session, same machine.
Confirmed the plugin-enablement mechanism is centralized, not a local file: rpm/manifest.json in the live home shows all 7 currently-enabled plugins carrying a server-issued marketplaceId (marketplace_01QRn9XAjzzeAokB5nPWVMxP, marketplaceName: "knowledge-work-plugins"), installedBy: "user". This is consistent with the "What I don't know" note above — plugin enablement in this app version looks account/server-scoped, not a home-level settings file.
Desktop does have a manual "Add marketplace" flow (Settings → Plugins → "Agregar marketplace"), with two options: browse Anthropic's curated sources, or "Agregar desde un repositorio" (owner/repo or git URL — this is presumably what backs the /plugin marketplace add owner/repo command documented in the README's Quick Start). This looked like a promising path independent of _cowork.py entirely: oscampo/iai-personal-memory-engine already ships a well-formed .claude-plugin/marketplace.json at repo root (plugins: [{"name": "iai-memory", "source": "./plugin", ...}]), pointing at plugin/.claude-plugin/plugin.json, which also exists and is well-formed.
Tried it against the fork: owner/repo = oscampo/iai-personal-memory-engine → "Error al sincronizar el marketplace. Verifica la URL del repositorio e intenta de nuevo." Tried the full https://github.com/... URL form too, same error.
Control test, tried the upstream repo the README itself documents as canonical: owner/repo = CodeAbra/iai-personal-memory-engine (this exact repo) → identical error.
Ruled out along the way:
- Not a private-repo issue — confirmed
oscampo/iai-personal-memory-engineis public (repository_public: truevia an unauthenticated fetch of the repo page, which also rendered fully rather than a private/404 page). - Not something wrong with either repo's
marketplace.json/plugin.json— both are well-formed, and the official upstream repo (this one) fails identically to the fork.
Conclusion: since the canonical repo documented in this project's own README fails the exact same way as the fork, the problem isn't in iai-mcp's code or plugin manifest at all — it's in Claude Desktop's "sync marketplace from repository" feature itself on this install (possibly a GitHub App authorization step never completed for this account, possibly a transient GitHub API rate limit on Desktop's backend, no visibility into which from the client side). Not something a PR to this project can fix. Leaving this here mainly so the next person who tries cowork install on a similar Desktop version doesn't re-walk the same two dead ends (local settings file and manual repo-marketplace add) before concluding it's an app-level issue outside this project's control.
possibly the same root cause as #159 — the app appears to have moved plugin loading to rpm/, which has no representation for a directory-source marketplace. https://github.com/CodeAbra/iai-personal-memory-engine/issues/159