github mksglu/context-mode v1.0.121

2 hours ago

v1.0.121 — Windows + Codex + Pi hotfixes

Community-driven hotfix landing 4 user-reported issues across Windows, Codex CLI, Pi adapter, and the v1.0.119 G3 CI guardrail. Every fix verified against actual source — Codex Rust references re-checked in refs/platforms/codex/, Pi loader behavior confirmed empirically. No LLM speculation.

What broke

#525 — Codex marketplace was discoverable in zero places

PR #512 (v1.0.119) shipped .codex-plugin/marketplace.json, but Codex CLI never opened that path. Three load-bearing facts verified against the Rust source:

  1. codex-rs/core-plugins/src/marketplace.rs:21 declares MARKETPLACE_MANIFEST_RELATIVE_PATHS = [.agents/plugins/marketplace.json, .claude-plugin/marketplace.json]. .codex-plugin/marketplace.json is not in this list.
  2. resolve_local_plugin_source_path (marketplace.rs:502-518) does path.strip_prefix("./") then rejects empty results — our .claude-plugin/marketplace.json used source: "./", which hit this rejection.
  3. The resolution error was swallowed at marketplace.rs:446-452 via warn!(... skipping marketplace plugin that failed to resolve), so codex plugin marketplace add succeeded with exit 0 but listed zero plugins.

Fix: ship .agents/plugins/marketplace.json (Codex's discoverable path) as a symlink/copy, set source: "./<subdir>" correctly, add a regression test that parses both manifests and validates against the Rust shape constants. Thanks @tedjy971 for filing the report — the v1.0.119 ship looked green but didn't actually let Codex users install context-mode.

#527 / #496 — Pi loader stumbled on stray markdown in skills/

The v1.0.112 fix (#428) moved skills/UPSTREAM-CREDITS.md to docs/, but npm pack still shipped package/skills/UPSTREAM-CREDITS.md in the v1.0.120 tarball. Pi's plugin loader treats every .md under skills/ as a skill, and choked on this orphan. Fix: ship skills/.ignore so Pi's loader explicitly skips the file. Thanks @benyounes-ousama for the report + PR.

#528/ctx-upgrade poisoned hooks/hooks.json with the upgrade tmpdir path (Windows)

The fifth heal in the post-upgrade cascade family (after v1.0.114 enabledPlugins, v1.0.116 settings.json, v1.0.119 plugin.json mcpServers.args). scripts/postinstall.mjs called normalizeHooksOnStartup({pluginRoot: pkgRoot}) where pkgRoot was the upgrade tmpdir. After tmpdir cleanup, every Windows hook fired MODULE_NOT_FOUND.

Fix:

  • scripts/postinstall.mjs — skip the normalize when pkgRoot matches the context-mode-upgrade-<digits> regex (cross-OS [/\\] covers POSIX and Windows separators)
  • src/cli.ts — after the in-place cpSync, call normalizeHooksOnStartup against the real plugin dir so the first hook fire after upgrade works without waiting for the next MCP boot
  • Legacy poisoned configs self-heal via the cpSync overwrite from the fresh source

Reviewed by 6 parallel architect-level agents (claim verifier + solution correctness + Windows specialist + cascade architect + QA + skeptic). 2 additional behavioral test slices added on top of the PR's slice 7b to close coverage gaps for the cli.ts post-cpSync path and legacy poison self-heal — 7/7 tests pass.

Thanks @asozyurt for the staff-grade diagnosis (file:line citations through the chain from cli.ts:771 → postinstall → cpSync), and for verifying manually on Windows 11.

Bonus: v1.0.119 G3 was silently a no-op on Windows

scripts/assert-bundle.mjs's direct-invocation check compared import.meta.url (which has forward slashes on Windows) against file://${process.argv[1]} (which has backslashes). The strings never matched on Windows → main() never ran → the bundle invariant guardrail exited 0 silently. Fix: use pathToFileURL(process.argv[1]).href so both sides normalize to the canonical file:///C:/... form. Now the G3 invariant is actually enforced on the windows-latest runner.

Tests

  • 2912 pass · 9 pre-existing baseline failures (8 OpenCodeAdapter config-paths + 1 insight-cors flake — verified absent from this changeset, present on origin/next at v1.0.120 too)
  • 8 new test slices across the 4 fixes (3 from #528 + 2 from my gap-fill, plus regression coverage for #525 and #527)
  • 0 new regressions

Compatibility

15 adapters / 3 OS. Codex CLI discovery now works end-to-end (verified by manifest test against the Rust source-of-truth paths). Pi loader skip works on every install. Windows users no longer hit MODULE_NOT_FOUND after /ctx-upgrade. G3 bundle guardrail now enforces on all 3 OS.

Upgrade

npm install -g context-mode@latest
# inside Claude Code:
/ctx-upgrade
# restart your session

If you were on a v1.0.112-v1.0.120 install with poisoned hooks/hooks.json on Windows, the upgrade self-heals via cpSync overwrite + post-cpSync renormalize — no manual cleanup required.

Thanks

@tedjy971 for chasing the Codex discovery rabbit hole and confirming with the Rust source that v1.0.119's marketplace shape was wrong. @benyounes-ousama for the Pi skills/.ignore fix. @asozyurt (first-time contributor) for the Windows /ctx-upgrade hooks.json fix and the matching behavioral test. Every report this cycle came with file:line citations and decoded environment paths — exactly what makes the work mechanical.

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.