Skip to content

Releases: mksglu/context-mode

v1.0.169

Choose a tag to compare

@mksglu mksglu released this 29 Jun 18:18

Context-savings reporting + FinOps accuracy

This release aligns context-savings reporting between the local ctx stats view and the Insight platform, and corrects per-turn cost attribution.

Improvements

  • The local "Where you are now" savings bar now reflects the whole live conversation window — the main session plus the sub-agent and sandbox sessions it spawns — rather than a single session id.
  • The kept-out ratio is reported to one decimal, so a genuine 99.9% window is no longer rounded up to a misleading 100%.

Fixes

  • Retrieval access cost (bytes_retrieved) for ctx_search / ctx_fetch_and_index is now bridged from the MCP server to the forward pipe, so the platform can derive the with/without ratio. Previously the retrieval signal never reached the dashboard.
  • "With context-mode" counts retrieval-tool returns only, not sandbox compute output, so the ratio is honest.
  • A Task sub-agent's cumulative usage is no longer priced as a single turn, preventing inflated per-event cost from poisoning FinOps aggregates.

All changes are additive and backward compatible.

v1.0.168

Choose a tag to compare

@mksglu mksglu released this 26 Jun 15:49

FinOps accuracy and context-savings reporting

Follow-up to v1.0.167's per-turn cost capture. This release corrects how savings and cost are measured and reported.

Fixes

  • Context-savings bar accuracy. ctx stats previously rendered "With context-mode: 1 B / 100% kept out" on tool-heavy sessions. The "With context-mode" figure now reflects the real bytes the model paid to access kept-out content (ctx_search + ctx_fetch_and_index returns), not sandbox compute output, so the kept-out ratio is honest.
  • With/without ratio for the platform. The plugin now forwards bytes_retrieved (the retrieval access cost) alongside bytes_avoided, so org-level reporting can derive the full kept-out percentage rather than the savings half alone.
  • Cumulative cost no longer mispriced. A Task sub-agent's usage is the total summed across its entire run; pricing it as a single turn produced inflated four-figure per-event costs that poisoned FinOps aggregates. Task usage is now tagged usage_scope: "task_cumulative" and is not priced per-turn; per-turn cost comes only from per-turn signals.

All changes are additive and backward compatible.

v1.0.167

Choose a tag to compare

@mksglu mksglu released this 26 Jun 09:40

Per-turn token, cost, and savings capture (FinOps)

Events now carry real per-turn token usage, model id, and cost_usd, replacing the flat per-event cost proxy. Engineering leaders can see actual AI spend per model, how much context-mode saved, and net/ROI.

Highlights

  • Real per-model pricing catalog (63 curated models across Anthropic, OpenAI, Google, and other vendors) behind a small no-regex lookup module. Non-Claude models are now priced from their own rates instead of defaulting to Claude pricing.
  • Structured cost event (model_id plus four token counts and cost_usd), replacing the prior string encoding, so the platform persists typed columns.
  • Per-turn capture across the nine adapters that expose usage: claude-code (session transcript, cursor-gated to avoid double counting), pi, omp, opencode, openclaw, gemini-cli, codex, qwen-code, and kimi. Adapters whose host does not expose usage remain on a clearly labeled estimate.
  • bytes_avoided is now forwarded so the platform can attribute context-saving value.

All changes are additive and backward compatible.

Contributors

This release also includes community contributions — thank you:

v1.0.166

Choose a tag to compare

@mksglu mksglu released this 23 Jun 06:43

context-mode v1.0.166

A Pi-focused reliability and DX release: the in-editor diagnostic that blocked typing on Pi is gone, and the foreground session's tools no longer drop after an idle pause.

Bug fixes

  • Pi: a background diagnostic no longer appears in the editor and blocks typing (#868, reported by @carolitascl, confirmed by @frsswq). context-mode loads in-process under Pi, and its MCP bridge was writing diagnostics to process.stderr — which is Pi's raw-mode TUI terminal. The idle-helper notice ([mcp-bridge] … idle MCP bridge child self-shutdown …) rendered straight into the prompt box, corrupting the input. All Pi-adapter diagnostics now route to pi.logger (Pi's rotating log under ~/.omp/logs/), the documented channel for in-process extensions — never the terminal. Crash diagnostics are still captured (in the log), not swallowed.

  • Pi: the foreground session no longer loses its ctx_* tools after a pause. The idle reaper that bounds abandoned sub-agent helpers was also reaping the active interactive session's helper after three minutes of inactivity, so a human pause dropped the tools (they reconnected on the next call, but the disconnect was wrong). The foreground session's helper now stays alive; only sub-agent / non-interactive helpers are idle-reaped, so abandoned ones still can't accumulate. The foreground helper is still released immediately when Pi itself exits.

  • Clearer idle-helper wording. When a sub-agent helper is released, the log line now reads in human units and states that it reconnects automatically, instead of the previous low-level "self-shutdown after 180000ms" phrasing.

Scope: this class of issue is specific to Pi, the one adapter that runs context-mode in-process and forwarded its helper's stderr to the terminal. The other supported agents run context-mode as a separate MCP subprocess (or via a host logger), so their diagnostics never reach the interactive UI — they were verified unaffected and unchanged.

Contributors

Thanks to @carolitascl for the precise report (the exact line and where it appeared) and to @frsswq for confirming it across platforms.

Install

npx skills add mksglu/context-mode

Existing installs: /context-mode:ctx-upgrade.

Links

v1.0.165

Choose a tag to compare

@mksglu mksglu released this 22 Jun 14:05

context-mode v1.0.165

A reliability follow-up to v1.0.164: two community-reported, platform-specific first-run defects — an orphaned-process CPU spin on Linux and an every-session install failure on Windows.

Bug fixes

  • Linux: orphaned MCP servers no longer busy-spin at ~100% CPU after the client exits (#862, reported by @elhoim). On Linux, start.mjs re-execs itself under Bun to take the crash-safe SQLite path (#564); the node proxy forwards stdin to the Bun child. Its stdin-EOF handler was a no-op and the proxy parked forever, so when the MCP client exited the proxy never closed the child's stdin nor exited — the child's parent stayed alive (defeating its ppid watchdog) and its stdin never reached EOF, leaving an orphaned pair pinned to a CPU core indefinitely. The proxy now propagates client death: it forwards EOF to the child for a graceful self-reap, then escalates SIGTERMSIGKILL so a wedged child can never outlive its client. The Bun re-exec is unchanged.

  • Windows: the boot-time fetch-dependency install no longer fails with EPERM (and no longer flashes a console window) every session (#861, reported by @lravizzoni). The background install of the optional ctx_fetch_and_index dependencies spawned npm with shell: true, which on Windows drops the cwd option — so npm install ran in C:\Windows, hit EPERM creating C:\Windows\node_modules, and flashed a cmd.exe window on every MCP boot. context-mode now invokes npm's CLI through node directly (shell: false, which honors cwd, with the console window suppressed), falling back to the npm shim only where that CLI can't be located. Install failures are now surfaced to stderr instead of being silently swallowed.

Contributors

Thanks to @elhoim and @lravizzoni for precise reports with reproductions — process thread states and npm debug logs respectively — that made both root causes unambiguous, and to @ken-jo for triage on the Windows report.

Install

npx skills add mksglu/context-mode

Existing installs: /context-mode:ctx-upgrade.

Links

v1.0.164

Choose a tag to compare

@mksglu mksglu released this 22 Jun 12:53

context-mode v1.0.164

A focused follow-up to v1.0.163: two community-reported fixes — a security containment for the sandbox file tool and a Pi/omp prompt-injection fix — plus adapter and lifecycle improvements.

Security

  • ctx_execute_file is now confined to the project boundary (#852, reported by @Project579). Previously an absolute or ../-escaping path could read files outside the project root, which a sandboxed host would otherwise block. The tool now refuses out-of-project paths (symlink-canonical escapes included); the opt-in escape hatch reuses the host's existing permissions.allow Read(...) rules rather than a bespoke setting, and the ctx_execute / ctx_execute_file tool titles now state plainly that they execute code.

    This closes the reported file-read vector. The broader hardening of ctx_execute / ctx_batch_execute arbitrary code execution (which still inherits the process filesystem and needs OS-level confinement) is tracked separately in #857.

Bug fixes

  • Casual phrases no longer freeze as a re-injected behavioral directive (#856, reported by @riddlex-beep). On the Pi/omp adapter, a throwaway phrase such as "that's fine for now" could be classified as a standing role and re-injected every turn, producing a do-nothing loop. Three changes resolve it: the role classifier now requires a genuine persona/directive cue (so real personas still persist, casual phrases don't), the Pi adapter no longer replays role events as a per-turn standing directive, and the routing-block framing was softened so the user's most recent message always takes precedence.

  • Idle MCP bridge children are now reaped (#854 by @ken-jo). Stops Pi/omp sessions from accumulating orphaned MCP bridge processes over time.

Adapters

  • Antigravity CLI: one-command plugin install (#853 by @ken-jo). Drops the npm wrapper in favor of a single agy plugin install, with documentation cleanup.

Contributors

Thanks to @ken-jo for the adapter and lifecycle work, and to @Project579 and @riddlex-beep for precise reports with reproductions that made both fixes straightforward.

Install

npx skills add mksglu/context-mode

Existing installs: /context-mode:ctx-upgrade.

Links

v1.0.163

Choose a tag to compare

@mksglu mksglu released this 21 Jun 16:33

context-mode v1.0.163

This release adds support for two new AI coding agents — bringing context-mode to 17 supported platforms — alongside a broad round of cross-platform reliability work, security hardening, and context-efficiency improvements. Roughly 30 merged changes across ~20 resolved issues from 14 community contributors since v1.0.162.

Our thanks to everyone who reported, reviewed, and contributed this cycle. The breadth of fixes below — especially across Windows, the Pi/OpenCode/Codex adapters, and session-resume — came directly from the community surfacing real first-run friction.


Headline: GitHub Copilot CLI and Antigravity CLI support

context-mode now integrates with GitHub Copilot CLI and Antigravity CLI (agy), taking supported platforms from 15 to 17 — each with full hook + MCP wiring verified against the upstream agent's own published contract.

  • GitHub Copilot CLI — detected via COPILOT_HOME/~/.copilot; all six hook events wired (preToolUse, postToolUse, sessionStart, userPromptSubmitted, agentStop, preCompact); MCP via ~/.copilot/mcp-config.json.
  • Antigravity CLI (agy) — detected via ~/.gemini; config + MCP through ~/.gemini/config/; statusline left untouched.

Adapter behavior was validated line-by-line against each agent's published source before merge.


Contributor spotlight: @ken-jo

This cycle was carried in large part by @ken-jo, who landed nine pull requests — the two-adapter headline plus a full round of Codex hardening:

PR Area
#787 GitHub Copilot CLI + Antigravity CLI adapters (15 → 17 platforms)
#834 Hooks respect per-subagent ctx tool availability
#826 Preserve Git Bash path conversion for native git on Windows
#808 String-aware JSONC stripping for OpenCode config
#833 Server exits cleanly on a fatal uncaught-exception storm
#837 Isolate full-suite test environment assumptions
#771 Codex plugin-manager root resolution for doctor/upgrade
#772 Fix mobile overflow on Insights persona cards
#851 Codex hardening: MCP tool annotations, PreToolUse modify/context, sentinel namespacing (#844 #845 #846)

Thank you, @ken-jo.


Bug fixes

Adapters

  • #787 Add GitHub Copilot CLI + Antigravity CLI support (@ken-jo).
  • #822 Pi: stop mutating systemPrompt; inject via context hook to preserve the provider prefix cache (@xuli500177).
  • #813 Pi: lazily bootstrap the MCP bridge for agent turns, fixing CLI subcommand hangs (@Gandem).
  • #778 Pi: detect the package server via PI_CODING_AGENT (@NgoQuocViet2001).
  • #849 OpenCode: write into an existing opencode.jsonc instead of shadowing it with a new opencode.json (verified against OpenCode's config precedence).
  • #808 OpenCode: string-aware JSONC stripping via a shared util (@ken-jo).
  • #815 OpenCode: preserve ZodEffects preprocess and ZodType coerce in zod3-to-v4 conversion (@LeoNardo-LB).
  • #771 Codex: resolve the plugin-manager root for doctor and upgrade (@ken-jo).
  • #851 Codex: add MCP tool annotations so ctx_* tools auto-approve instead of being cancelled, restore PreToolUse modify/context (gated on a runtime Codex-capability check so older builds fail closed), and namespace the MCP-readiness sentinel against cross-PID-namespace deletion — resolving #844, #845, #846 (@ken-jo).

Windows and the execution sandbox

  • #796 Windows shell runtime selection + PowerShell UTF-8 handling (@Niche-alchemy).
  • #839 PowerShell Unicode path handling, including a UTF-8 BOM for reliable script detection (@pradigmaz).
  • #826 Preserve Git Bash path conversion for native git (@ken-jo).
  • #782 Maven (mvn) on Windows: route the bare mvn token to mvn.cmd, bypassing the MinGW shell branch that left the classpath POSIX-formatted.
  • #788 Stop leaking .ctx-mode-* temp directories on Windows (retry cleanup around SQLite WAL/SHM handles) and run non-shell ctx_execute in the project working directory.

Hooks and routing

  • #834 PreToolUse respects per-subagent ctx tool availability, so subagents that cannot reach ctx_* are no longer hard-blocked (@ken-jo).
  • #773 Capture Stop turn-ends as turn_end events (@pg-adm1n).
  • #817 Add an opt-in command-size threshold so small Bash calls skip the routing nudge.

Sessions and search

  • #780 Session resume no longer re-injects prior-leg events as current; earlier-leg context is preserved but clearly partitioned.
  • #840 Data References now reference large captured tool-outputs via ctx_search instead of inlining them, restoring the context-saving guarantee on long sessions.
  • #827 ctx_search returns results again on Windows: project-scope filtering now normalizes path separators on both sides.
  • #769 Flood-guard counter is now per-subagent rather than process-global, so parallel multi-agent workflows no longer starve each other.
  • #797 Statusline resolves the session id from the stdin payload so per-session KPIs render (@0reo).
  • #785 Insight counts git_commit events in commit metrics (@daniel-enqz).

Core, server, and runtime reliability

  • #841 Hooks survive a mise/asdf/nvm Node patch upgrade: a liveness guard re-resolves the runtime when the pinned execPath no longer exists.
  • #833 Server exits on a fatal uncaught-exception storm instead of spinning (@ken-jo).
  • #848 Prevent SIGPIPE from killing a child process on background detach (@gboddaer).
  • #803 Liveness guard for resolveJavascriptRuntime after a Homebrew Node upgrade (@ousamabenyounes).
  • #805 Canonicalize cacheRoot in healCacheMidSession for symlinked ~/.claude (@ousamabenyounes).
  • #789 Enforce MAX_CHUNK_BYTES to prevent FTS5 database bloat (@ousamabenyounes).
  • #765 Pin Claude ctx_execute working directory to the session cwd (@NgoQuocViet2001).
  • #823 Leave a breadcrumb link when sweeping old version directories (@nyxst4ck).

Security

  • #763 Harden shell-command evaluation (subshell/operator-aware deny surface, allow-list piggybacking prevention) and fix test isolation (@pg-adm1n).

Install and upgrade

  • #810 Skip settings.json wiring only for true plugin installs, so a standalone install is still wired and a plugin install is never over-written (@eejd).
  • #768 Version manifests derive from package.json via a single source of truth that fails loud on drift.

Product

  • The ctx_insight analytics experience has moved from a local dashboard to a hosted product.
  • The landing site and shareable banners now reflect all 17 supported adapters.

Contributors

Community contributors this cycle: @ken-jo, @ousamabenyounes, @NgoQuocViet2001, @pg-adm1n, @gboddaer, @pradigmaz, @nyxst4ck, @xuli500177, @LeoNardo-LB, @Gandem, @eejd, @0reo, @Niche-alchemy, @daniel-enqz.

Thank you for making context-mode better for everyone.


Install

npx skills add mksglu/context-mode

Existing installs: /context-mode:ctx-upgrade.

Links


v1.0.162

Choose a tag to compare

@mksglu mksglu released this 02 Jun 17:05

🚀 v1.0.162 — multilingual prompt analytics, accurate cost, 13 new extractors

13 commits · 8 PRD issues · 2 verify-gap fixes · 13 new test files · 80+ tracers since v1.0.161. Cross-repo PRD-driven sprint — wire-format expansion, privacy-first multilingual analytics, and a pricing accuracy catch-up that had been stale since v1.0.103. 💜


✨ Highlights

  • 🌍 §11 multilingual prompt features — Layer 1 expanded from 5 → 10 typed columns plus a new prompt_word_tokens[] Layer 3 array, fully script-agnostic via Unicode property escapes (\p{L}, \p{Script=X}). Latin, Cyrillic, Han, Hangul, Arabic, Hebrew, Thai, Greek, Devanagari, Hiragana, Katakana — one code path, no franc / fasttext / compromise dependency. Bundle unchanged.
  • 💰 Honest cost accountingMODEL_PRICING_USD_PER_MTOK lands with verified 2026-06 Anthropic rates (Opus 4.7/4.8 $5/$25, Sonnet 4.6 $3/$15, Haiku 4.5 $1/$5). extractAgentUsage derives cost_usd from per-model rates × usage block. ctx-stats headline corrected from $1399.73 of Opus 4 tokens to $466.58 of Opus 4.7 tokens — same fixture, accurate rate (Opus 4 → Opus 4.7 was a 3× price cut that never propagated to analytics.ts).
  • 🪝 9 new event types from existing tool callsbash_outcome, file_read_metadata, webfetch_metadata, worktree_exit, agent_usage, session_settings_snapshot, git_commit (discriminated from generic git), plan_enter (slash variant), and enriched plan_exit with plan_bytes/plan_hash. All ride the existing {...ev} envelope per ABI §5.4 — zero platform-side schema migrations.
  • 🩹 commit_message capture finally works — symmetric rollup stamp + per-event gate on type='git_commit'. POSIX argv tokenizer handles -m, -am, --message=, --message ARG, env-prefixed (GIT_AUTHOR=... git commit -m ...), --amend fallback, empty -m "". Closes the ~92% NULL-on-has_commit=1 ingestion drift surfaced by prod D1 telemetry.
  • 🧭 Cross-project attributiongit -C /other/path commit -m "x" from cwd=projectA now attributes to project B's canonical identity. Tilde (~/path) and equals-form (--directory=/path) both parsed correctly across macOS / Linux / Windows.
  • 📐 /plan slash fallback — Claude Code Bug #15660 workaround. The slash command emits plan_enter via UserPromptSubmit; ~60-80% of plan-mode entries that were previously telemetry-invisible (slash + Shift+Tab don't fire PostToolUse) are now captured. Shift+Tab remains upstream-blocked.
  • 🛡️ Zero new runtime dependencies — 13 extractors, 22 multilingual feature paths, and a per-model pricing table added. Bundle stays at 58 KB total across all 5 hook bundles. Algorithmic POSIX argv parsing, FNV-1a hashing, Unicode regex via stdlib only.

🐞 Bug Fixes

Commit message capture (Bug 1 + Bug 2)

  • POSIX argv tokenizer for commit messagesextractGit parses -m, -am, --message=, separate-token --message, env-prefixed invocations, --amend fallback, and empty -m "". Emits type='git_commit' (distinct from generic git) when a message is captured. Symmetric rollup stamp via getSessionRollup so every event in a commit-bearing session carries commit_message, closing the asymmetric-NULL drift seen on platform D1.
  • Cross-project attribution (Bug 8)git -C <dir> scope hint now flows through parseGitInvocation and shadows the in-batch inputProjectDir. Subsequent events in the same Bash call attribute to the scoped directory, not the hook's startup cwd.

Cost derivation (verify-gap Gap #1)

  • cost_usd on agent_usage — derives from tokens × per-MTok rate using the new MODEL_PRICING table. Model resolution: tool_input.modelinput.modelresponse.modeldefault (Sonnet rates). Prefix match for date-suffixed ids (claude-haiku-4-5-20251001claude-haiku-4-5). Zero-token sessions skip cost_usd so dashboards don't render $0.00 for nothing. Unknown model id falls back to default — never null.

Git parsing (verify-gap Gap #2)

  • Tilde expansiongit -C ~/repos/myrepo status now expands to $HOME/repos/myrepo (or USERPROFILE on Windows, with HOMEDRIVE+HOMEPATH fallback). ~user/path (other-user form) intentionally NOT expanded — bridge does not do passwd lookups.
  • --directory=value equals-form — parsed alongside the existing space-form --directory <value>. Tokenizer kept the equals-attached argument as one token; parser now slices on the --directory= prefix.

Prompt analytics (Issue #5 + Issue #8 §11)

  • Multilingual Layer 1 alignment — replaced the F1 §2 5-field stub with §11's 10-field shape: prompt_length, prompt_word_count, prompt_uppercase_ratio, prompt_file_ref_count, prompt_path_ref_count, prompt_script_primary, prompt_script_count, prompt_question_glyph_count (counts ASCII ?, fullwidth , Arabic ؟), prompt_code_block_count, prompt_url_count. The prompt_first_word field from the stub was removed — prompt_word_count covers the same insight script-agnostically.
  • Layer 3 word tokensprompt_word_tokens: string[] carries letter-only words ≥3 chars, lowercased, deduplicated within the prompt. Platform UPSERTs into prompt_word_count(org_id, week, word, count) for emergent vocabulary surfacing at 5%-50% rate thresholds. Aggregated per org+week; no individual prompt token surfaces in any UI.

CI / cross-platform

  • Windows statusline timeout parity — slice-2 multi-adapter test now reuses STATUSLINE_SQLITE_TIMEOUT_MS (300s Windows / 30s elsewhere) instead of a stale hardcoded 60s. CI #401 had observed 186s with retry x2 on windows-latest — flake fixed.
  • 2 stale pricing-test assertionsformat-cost.test.ts ($1399.73 → $466.58 of Opus 4.7 tokens) and format-report-real-bytes.test.ts (regex updated). Both surfaced by the pricing-constant sync.

🎨 Features

  • 9 new event types for prompt analytics, cost accounting, and tool-response metadata — all ride the existing universal envelope ({...ev, platform, ts} per ABI §5.4). Platform Zod schema is forward-compatible; no wire-side migration required.
  • extractAgentUsage — fires on tool_name === "Task" (sub-agent dispatcher). Captures totalTokens, totalDurationMs, tokens_in, tokens_out, cache_create, cache_read, tier, plus derived cost_usd.
  • extractBashOutcome — three real signals from BashOutput: interrupted (bool), returnCodeInterpretation (semantic non-zero hint), stderr length-only (privacy). No exit_code field exists in the SDK; the verify-gap PRD's anti-hallucination block specifically flagged this.
  • extractFileReadMetadata — branches on text vs image variant. Text: numLines/totalLines/startLine. Image: originalSize/dimensions (formatted as WxH).
  • extractWebFetchMetadatacode/bytes/durMs/host. URL host extracted algorithmically (no regex), query string stripped before stamping. No redirect_url field exists; temporal correlation handles redirect-loop detection at the platform.
  • extractWorktree extended for ExitWorktree — emits worktree_exit with discard_changes flag, alongside the existing EnterWorktree handler.
  • extractPlan ExitPlanMode metadataplan_bytes (length) + plan_hash (8-char FNV-1a hex) on the existing plan_exit event. Plan source: tool_input.plan first, fall back to tool_response.plan (SDK actually carries it on the OUTPUT per ExitPlanModeOutput @ sdk-tools.d.ts:2222).
  • extractSessionSettings — emits session_settings_snapshot from SessionStart with mcp_count, mcp_servers (first 8 names), model, permission_mode. Wired into emitSessionStartLifecycle opportunistically — never blocks lifecycle on snapshot failure.
  • extractUserPlan — UserPromptSubmit-driven /plan slash detector. Algorithmic char-code scan (no regex), word-boundary check so /plans does not match, argument truncated at 120 chars.

⚡ Performance

  • Zero bundle bloathooks/session-extract.bundle.mjs is 13,694 bytes, total of all 5 hook bundles is 58 KB. 13 new extractors + multilingual feature engine added with zero new runtime dependencies. esbuild minifies; nothing leaks.
  • §11 multilingual is O(n) per feature on the prompt string — prompt.match(/\p{L}+/gu) and the 11-script loop bound the cost. Spec-mandated p95 ≤ 15 ms on a 10 KB prompt.
  • FNV-1a 32-bit hash for plan_hash — deterministic, stable across platforms, no crypto library required.

📚 Docs / Ops

  • Cross-PRD cross-repo workflow — this release closes 8 issues from 09-oss-handoff-prd.md and 2 gaps from 16-oss-verify-gap-prd.md. The verify-gap PRD is a separate-LLM verification pass on the OSS work — a novel cross-agent OSS workflow.
  • STYLE-ANCHOR-v1.0.152.md added to repo (developer-facing) — documents the v1.0.152 release-notes template so future releases stay community-grade. v1.0.153 through v1.0.161 will be rewritten to this style.
  • Anti-hallucination ground truth — every cited SDK line in the PRDs was re-verified against refs/platforms/claude-code/sdk-tools.d.ts before implementation. The verify-gap PRD specifically flagged stale citations (BashOutput.exit_code does not exist; WebFetchOutput.redirect_url does not exist) — both correctly worked around in the new extractors.

📋 PRD-driven work

This release is the first end-to-end product of the OSS handoff + verify-gap cross-PRD pipeline:

PRD Repo Issues / Gaps closed
09-oss-handoff-prd.md v3 context-mode-platform #1 release, #2 AgentOutput.usage, #3 FileReadOutput, #4 SessionStart ...
Read more

v1.0.161

Choose a tag to compare

@mksglu mksglu released this 01 Jun 11:56

🪟 v1.0.161 — Codex Windows symlink fix + seed-parity Windows hardening

1 community PR · 8 commits since v1.0.160. Codex on Windows users had been hitting a marketplace symlink source failure during plugin install — fixed end-to-end by @NgoQuocViet2001, plus the seed-parity integration suite now passes cleanly on windows-latest. 💜


✨ Highlights

  • 🪟 Codex Windows symlink fix (#748 by @NgoQuocViet2001) — Codex's plugin install path was sourcing the context-mode marketplace via a symlink that Windows file APIs reject on first read. The fix avoids the symlink source on Windows specifically; macOS/Linux paths unchanged. Removes a silent first-install failure for the entire Windows Codex user segment.
  • 🧪 seed-parity tests green on Windowstests/integration/seed-parity-coverage.test.ts and tests/integration/seed-parity-coverage.test.ts now override APPDATA and use the platform-aware config path resolver. CI matrix coverage restored across all 3 OSes.
  • 📋 .agents/plugins/marketplace.json — new layout file landed alongside the existing plugin manifest, keeping context-mode discoverable across both claude-code and openclaw plugin paradigms.
  • 📚 docs/platform-support.md — refresh aligned with the marketplace.json layout.

🐞 Bug Fixes

Codex adapter

  • #748 fix(codex): avoid marketplace symlink source on Windows (@NgoQuocViet2001) — install flow no longer dereferences the marketplace symlink on Windows. macOS/Linux install paths unchanged.

Cross-platform tests

  • test(seed-parity): override APPDATA + use platform-aware config path (×2 commits, 81a8435/254ee9a) — Windows test runner was reading the developer's real APPDATA instead of the fake fixture path. Tests now construct the platform-aware config file via the same resolver the runtime uses.

📚 Docs / Ops

  • docs/platform-support.md refresh — claude-code, openclaw, codex install paths re-documented against the new .agents/plugins/marketplace.json layout.
  • CI: install stats refresh (0cfe3be) — stats.json re-fetched, no functional impact.

🙌 Contributors — one by one

Massive thank you to the contributor who shipped this cycle:

Contributor PRs Highlights
@NgoQuocViet2001 #748 Codex Windows symlink source fix — removes a silent first-install failure on the entire Windows Codex user segment

Plus maintenance/ops by @mksglu.


📦 Install / upgrade

# Fresh install (Claude Code plugin marketplace)
/plugin add https://github.com/mksglu/context-mode

# npm global
npm install -g context-mode@1.0.161

# Existing install — in-place upgrade
context-mode upgrade

Then restart your MCP session (or run /reload-plugins in Claude Code).

🔗 Full changelog

v1.0.160...v1.0.161


🤖 Release notes retroactively rewritten in v1.0.152 style to surface @NgoQuocViet2001's contribution properly.

v1.0.160

Choose a tag to compare

@mksglu mksglu released this 01 Jun 07:51

🚇 v1.0.160 — 4 hook surfaces now flow through the platform bridge

2 commits · 5 hook files updated since v1.0.159. Event types that previously bypassed the platform-bridge wire (post-tool-use, pre-compact, session-start, user-prompt-submit) are now routed through attributeAndInsertEvents, closing a partial-coverage gap for analytics-opt-in users.


✨ Highlights

  • 🚇 Bypassed event types routed through bridge (c084707) — posttooluse.mjs, precompact.mjs, sessionstart.mjs, userpromptsubmit.mjs all now emit through the platform-bridge wire via attributeAndInsertEvents. Previously these surfaces wrote directly to SessionDB and never reached the bridge — analytics-opt-in users saw a partial event subset.
  • 🪝 Lifecycle event coverage restored — all 5 hook event types (PostToolUse, PreCompact, SessionStart, UserPromptSubmit, Stop) now route uniformly. No silent drops, no surface that the bridge can't observe.

🐞 Bug Fixes

Hooks & routing

  • feat(hooks): route bypassed event types through bridge wire (c084707) — 4 hook files were calling SessionDB directly for non-PostToolUse events, bypassing the bridge entirely. The bridge wire is now the single insertion path; SessionDB writes happen as a side-effect of attributeAndInsertEvents.

Files touched (5 hook surfaces)

  • hooks/posttooluse.mjs — bypassed events: rejected, redirect, byte-accounting, tool_latency
  • hooks/precompact.mjs — bypassed events: compaction_summary, snapshot-built
  • hooks/sessionstart.mjs — bypassed events: lifecycle session_start, rule, rule_content
  • hooks/userpromptsubmit.mjs — bypassed events: user prompt extractions
  • hooks/session-loaders.mjsattributeAndInsertEvents now the canonical insert path

🎨 Features

  • Forward-compat for v1.0.162 — this release is the foundation that v1.0.162's 9 new event types (bash_outcome, file_read_metadata, webfetch_metadata, worktree_exit, agent_usage, session_settings_snapshot, git_commit, plan_enter slash, plan_exit metadata) all ride. Without the unified wire-up, the new extractors would have shipped half-observable.

📦 Install / upgrade

# Fresh install (Claude Code plugin marketplace)
/plugin add https://github.com/mksglu/context-mode

# npm global
npm install -g context-mode@1.0.160

# Existing install — in-place upgrade
context-mode upgrade

Then restart your MCP session (or run /reload-plugins in Claude Code).

🔗 Full changelog

v1.0.159...v1.0.160


🤖 Release notes retroactively rewritten in v1.0.152 style — the original body undersold a foundational wire-format unification.