Releases: mksglu/context-mode
Release list
v1.0.169
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) forctx_search/ctx_fetch_and_indexis 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
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 statspreviously 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) alongsidebytes_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
usageis 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 taggedusage_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
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_idplus four token counts andcost_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_avoidedis 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:
- @ken-jo — Zed MCP configuration shape correction (#870)
- @ousamabenyounes — omp adapter MCP self-registration on plugin load (#872)
- @NgoQuocViet2001 — Zed configuration documentation sync (#875)
v1.0.166
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 topi.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
- Full changelog: v1.0.165...v1.0.166
- License: Elastic License 2.0 (ELv2)
v1.0.165
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.mjsre-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 escalatesSIGTERM→SIGKILLso 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_indexdependencies spawned npm withshell: true, which on Windows drops thecwdoption — sonpm installran inC:\Windows, hitEPERMcreatingC:\Windows\node_modules, and flashed acmd.exewindow on every MCP boot. context-mode now invokes npm's CLI through node directly (shell: false, which honorscwd, 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
- Full changelog: v1.0.164...v1.0.165
- License: Elastic License 2.0 (ELv2)
v1.0.164
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_fileis 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 existingpermissions.allowRead(...)rules rather than a bespoke setting, and thectx_execute/ctx_execute_filetool titles now state plainly that they execute code.This closes the reported file-read vector. The broader hardening of
ctx_execute/ctx_batch_executearbitrary 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
roleand 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 replaysroleevents 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
agyplugin 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
- Full changelog: v1.0.163...v1.0.164
- License: Elastic License 2.0 (ELv2)
v1.0.163
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.jsoncinstead of shadowing it with a newopencode.json(verified against OpenCode's config precedence). - #808 OpenCode: string-aware JSONC stripping via a shared util (@ken-jo).
- #815 OpenCode: preserve
ZodEffectspreprocess andZodTypecoerce in zod3-to-v4 conversion (@LeoNardo-LB). - #771 Codex: resolve the plugin-manager root for
doctorandupgrade(@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 baremvntoken tomvn.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-shellctx_executein 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_endevents (@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 Referencesnow reference large captured tool-outputs viactx_searchinstead of inlining them, restoring the context-saving guarantee on long sessions. - #827
ctx_searchreturns 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_commitevents in commit metrics (@daniel-enqz).
Core, server, and runtime reliability
- #841 Hooks survive a
mise/asdf/nvmNode patch upgrade: a liveness guard re-resolves the runtime when the pinnedexecPathno 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
resolveJavascriptRuntimeafter a Homebrew Node upgrade (@ousamabenyounes). - #805 Canonicalize
cacheRootinhealCacheMidSessionfor symlinked~/.claude(@ousamabenyounes). - #789 Enforce
MAX_CHUNK_BYTESto prevent FTS5 database bloat (@ousamabenyounes). - #765 Pin Claude
ctx_executeworking 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.jsonwiring 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.jsonvia a single source of truth that fails loud on drift.
Product
- The
ctx_insightanalytics 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
- Full changelog: v1.0.162...v1.0.163
- License: Elastic License 2.0 (ELv2)
v1.0.162
🚀 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, nofranc/fasttext/compromisedependency. Bundle unchanged. - 💰 Honest cost accounting —
MODEL_PRICING_USD_PER_MTOKlands with verified 2026-06 Anthropic rates (Opus 4.7/4.8 $5/$25, Sonnet 4.6 $3/$15, Haiku 4.5 $1/$5).extractAgentUsagederivescost_usdfrom per-model rates × usage block.ctx-statsheadline corrected from$1399.73 of Opus 4 tokensto$466.58 of Opus 4.7 tokens— same fixture, accurate rate (Opus 4 → Opus 4.7 was a 3× price cut that never propagated toanalytics.ts). - 🪝 9 new event types from existing tool calls —
bash_outcome,file_read_metadata,webfetch_metadata,worktree_exit,agent_usage,session_settings_snapshot,git_commit(discriminated from genericgit),plan_enter(slash variant), and enrichedplan_exitwithplan_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 ...),--amendfallback, empty-m "". Closes the ~92% NULL-on-has_commit=1ingestion drift surfaced by prod D1 telemetry. - 🧭 Cross-project attribution —
git -C /other/path commit -m "x"fromcwd=projectAnow attributes to project B's canonical identity. Tilde (~/path) and equals-form (--directory=/path) both parsed correctly across macOS / Linux / Windows. - 📐
/planslash fallback — Claude Code Bug #15660 workaround. The slash command emitsplan_entervia 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 totalacross 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 messages —
extractGitparses-m,-am,--message=, separate-token--message, env-prefixed invocations,--amendfallback, and empty-m "". Emitstype='git_commit'(distinct from genericgit) when a message is captured. Symmetric rollup stamp viagetSessionRollupso every event in a commit-bearing session carriescommit_message, closing the asymmetric-NULL drift seen on platform D1. - Cross-project attribution (Bug 8) —
git -C <dir>scope hint now flows throughparseGitInvocationand shadows the in-batchinputProjectDir. Subsequent events in the same Bash call attribute to the scoped directory, not the hook's startupcwd.
Cost derivation (verify-gap Gap #1)
cost_usdonagent_usage— derives fromtokens × per-MTok rateusing the newMODEL_PRICINGtable. Model resolution:tool_input.model→input.model→response.model→default(Sonnet rates). Prefix match for date-suffixed ids (claude-haiku-4-5-20251001→claude-haiku-4-5). Zero-token sessions skipcost_usdso dashboards don't render$0.00 for nothing. Unknown model id falls back to default — never null.
Git parsing (verify-gap Gap #2)
- Tilde expansion —
git -C ~/repos/myrepo statusnow expands to$HOME/repos/myrepo(orUSERPROFILEon Windows, withHOMEDRIVE+HOMEPATHfallback).~user/path(other-user form) intentionally NOT expanded — bridge does not do passwd lookups. --directory=valueequals-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. Theprompt_first_wordfield from the stub was removed —prompt_word_countcovers the same insight script-agnostically. - Layer 3 word tokens —
prompt_word_tokens: string[]carries letter-only words ≥3 chars, lowercased, deduplicated within the prompt. Platform UPSERTs intoprompt_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 onwindows-latest— flake fixed. - 2 stale pricing-test assertions —
format-cost.test.ts($1399.73 → $466.58 of Opus 4.7 tokens) andformat-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 ontool_name === "Task"(sub-agent dispatcher). CapturestotalTokens,totalDurationMs,tokens_in,tokens_out,cache_create,cache_read,tier, plus derivedcost_usd.extractBashOutcome— three real signals fromBashOutput:interrupted(bool),returnCodeInterpretation(semantic non-zero hint),stderrlength-only (privacy). Noexit_codefield 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 asWxH).extractWebFetchMetadata—code/bytes/durMs/host. URL host extracted algorithmically (no regex), query string stripped before stamping. Noredirect_urlfield exists; temporal correlation handles redirect-loop detection at the platform.extractWorktreeextended forExitWorktree— emitsworktree_exitwithdiscard_changesflag, alongside the existingEnterWorktreehandler.extractPlanExitPlanMode metadata —plan_bytes(length) +plan_hash(8-char FNV-1a hex) on the existingplan_exitevent. Plan source:tool_input.planfirst, fall back totool_response.plan(SDK actually carries it on the OUTPUT per ExitPlanModeOutput @ sdk-tools.d.ts:2222).extractSessionSettings— emitssession_settings_snapshotfrom SessionStart withmcp_count,mcp_servers(first 8 names),model,permission_mode. Wired intoemitSessionStartLifecycleopportunistically — never blocks lifecycle on snapshot failure.extractUserPlan— UserPromptSubmit-driven/planslash detector. Algorithmic char-code scan (no regex), word-boundary check so/plansdoes not match, argument truncated at 120 chars.
⚡ Performance
- Zero bundle bloat —
hooks/session-extract.bundle.mjsis13,694 bytes, total of all 5 hook bundles is58 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.mdadded 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.tsbefore implementation. The verify-gap PRD specifically flagged stale citations (BashOutput.exit_codedoes not exist;WebFetchOutput.redirect_urldoes 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 ... |
v1.0.161
🪟 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 Windows —
tests/integration/seed-parity-coverage.test.tsandtests/integration/seed-parity-coverage.test.tsnow overrideAPPDATAand 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 bothclaude-codeandopenclawplugin 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 realAPPDATAinstead 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.mdrefresh — claude-code, openclaw, codex install paths re-documented against the new.agents/plugins/marketplace.jsonlayout.- CI: install stats refresh (
0cfe3be) —stats.jsonre-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 upgradeThen restart your MCP session (or run /reload-plugins in Claude Code).
🔗 Full changelog
🤖 Release notes retroactively rewritten in v1.0.152 style to surface @NgoQuocViet2001's contribution properly.
v1.0.160
🚇 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.mjsall now emit through the platform-bridge wire viaattributeAndInsertEvents. 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 ofattributeAndInsertEvents.
Files touched (5 hook surfaces)
hooks/posttooluse.mjs— bypassed events:rejected,redirect,byte-accounting,tool_latencyhooks/precompact.mjs— bypassed events:compaction_summary,snapshot-builthooks/sessionstart.mjs— bypassed events: lifecyclesession_start,rule,rule_contenthooks/userpromptsubmit.mjs— bypassed events: user prompt extractionshooks/session-loaders.mjs—attributeAndInsertEventsnow 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_enterslash,plan_exitmetadata) 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 upgradeThen restart your MCP session (or run /reload-plugins in Claude Code).
🔗 Full changelog
🤖 Release notes retroactively rewritten in v1.0.152 style — the original body undersold a foundational wire-format unification.