# Changelog All notable changes to lean-ctx are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/). Current positioning: [LeanCTX Engine — Context Gateway for AI Systems](docs/POSITIONING_CANONICAL.md). ## [Unreleased] ## [3.12.4] — 2026-11-12 ### Added - **Policy enforcement acknowledged to Hive (D4).** The bus hello now names the features `policy_advanced` and `policy_applied`, so Hive delivers its `policy.advanced` nudge (it sends that nudge only to Instances that name the feature). Once per version and digest of a verified policy that is in force and that Hive acknowledged, the Instance sends one `policy.applied` frame: `version`, `digest`, `key_id`, `applied_at` and `sessions` (the live app sessions enforcing it). It sends the frame only when Hive's `hello.ack.features` names `policy_applied`. An expired, outdated or unverified policy is never reported. Local Read `policy.sessions` adds `installed.enforcement` (`applied_version`, `acknowledged_at`, `sessions`, `reported_at`), additively. - **ECCP L/I/G change classifier (task 156).** `scripts/change-class ` prints `L` (no public Rust item changed), `I` (public items only added) or `G` (public item changed or removed, Cargo features or dependency tables, `Cargo.lock`, `build.rs`, Cargo config, toolchain pin, CI configuration or a generated registry) from the git objects alone, without a build or network, and serves as `$ECCP_CLASSIFIER` for `scripts/eccp-envelope`. - **ECCP change envelope in git notes (task 157).** `scripts/eccp-envelope` writes, shows and verifies a `leanctx.change-envelope/v1` JSON note under `refs/notes/eccp` on a merge request head: intent, base, class, read set, derivations and check evidence (`docs/contracts/change-envelope-v1.md`). - **Audit entries v2 bind each tool call to its session (ent3-1).** Every new audit-trail entry carries `v: 2` and a chained `v2_hash` over its timestamp and, for a call of an MCP session, the `session_id`, a per-session `seq`, the decision and an output digest, so an edited timestamp, seq or fact fails `verify_chain` and `verify_chain_full` at that entry. Input and output digests are HMAC-SHA256 under the engine-local key (`hive/receipts.hmac-key`, never uploaded). The v1 `entry_hash` is unchanged: older engines and `leanctx-verify` still verify a mixed trail, and an entry of a newer version counts as forward-compatible, not as tampering. - **Managed configuration for MDM-provisioned machines (task 169).** An organisation can preconfigure an Instance through a macOS configuration profile, the Windows policy key `HKLM\SOFTWARE\Policies\LeanCTX\Managed` or `/etc/lean-ctx/managed.toml` (`leanctx.managed-config/v1`, `docs/contracts/managed-config-v1.md`). Managed `hive.url` and `hive.root_key` win over `[hive]` and `config set` on them is refused; `hive.org` refuses an enrollment for another org; `hive.require` makes tools refuse until the machine is signed in and has a policy floor. A carrier that is malformed, a symlink, or not root-owned (it or its directory) fails closed; it is checked and read through one open handle. `hive status` and the cockpit `hive status --json` (`managed`, since 1.7) show the carrier and each member. - **Unit claims warn before two agents edit the same code.** A `ctx_patch` or `ctx_edit` write claims the functions, types and Markdown sections it touches for the editing agent (10-minute lease, renewed on each edit). When another agent holds a claim on a touched unit, the write goes ahead and the result names the holder (`LEAN_CTX_CLAIM_MODE=warn`, the default). `strict` refuses the write before anything is written, and `off` turns the check off. `ctx_agent action=claims` lists the live claims. `action=plan_claims` plans a task against them, through an optional local planner (`LEAN_CTX_CLAIM_PLANNER`) or a built-in fallback without network, and claims the free units. Claims are released when the agent reports `status=finished` and when the server shuts down. ### Security The first five fixes below were reported by @dkiaulakis. - **A redirection written another way cannot write past the gate (GHSA-4gm5-2mgw-9r9r).** A redirection with a file-descriptor prefix, an `&>`/`>|`/`<>` operator, a quoted or escaped target, or no space before its target was missed, so an agent shell could write lean-ctx's own state or an unlisted file. The gate now reads every redirection in its canonical form before any other check. - **A command inside `( … )` or `{ …; }` is checked like any other (GHSA-9jrf-q94p-frhr).** A subshell or group was one segment to the gate, whose first word (`(eval`, `(rm`) matched no rule, and a redirection after the group was dropped. Every group is now opened into its commands for the checks, and a redirection after it is checked too; a command in a `case` arm or after `then`, `do`, `else` or `coproc` is judged as its own command. The line that runs is unchanged. - **The state guard follows the working directory and the values a line builds (GHSA-cfmv-qg29-3rvp).** Repeated or conditional `cd ..`, a `cd` in a loop, function or trap, `CDPATH`/`HOME`/`OLDPWD` assignments, variables assigned or read at run time (also `${d:=…}` and `set --` arguments, also inside a longer word), the shell's own `$PWD`/`$OLDPWD`/`$_` and `~+`/`~-`/`~N`, brace and parameter expansions, function arguments, `alias` bodies, `GIT_DIR`-style variables, versioned interpreter names (`python3.12`, `node@20`), `deno eval`/`bun -e`, awk `system()`/pipes/output redirection (also in `-e`/`--source` programs; a program read from stdin with `-f -` or `-f /dev/stdin` is refused) and in-place writers (`sed`, `perl -i`, `sort -o`, `gzip`, `patch`, `split`, `tar`/`unzip` extraction) could reach lean-ctx's own state unseen. A write whose target cannot be placed is now refused (fail closed); read-only commands are unchanged. - **A read-only git subcommand cannot write lean-ctx's state or run a program (GHSA-fv44-pm58-9c8p).** When git runs at or above lean-ctx's state, `log`/`diff`/`show`/`grep` and the other read subcommands were allowed whatever their options, so `--output=…`, `--ext-diff` with `-c diff.external=…`, a `-c`/`--config-env` pager, fsmonitor or alias, `--paginate`, `--textconv` or `grep -O` could write a file or run a program. Those options are now refused there; plain reads such as `log --oneline` and `diff --stat` still pass. - **Context admission never delivers a value the secret detector flagged (GHSA-xmx8-69qv-7f86).** The detector and the redactor read different spans of one comparison or key/value expression: the operand with or without the rest of its operator (`==`, `:=`), with or without a trailing `)` or `:`. The redactor could judge a flagged value benign and leave it unchanged, and admission then delivered it as `AllowRedacted`, because it only re-checked text it had rewritten. Both layers now judge the same operand, so a comparison operand is masked exactly when its `key=` form is. Unchanged text is re-checked after a reported value too and is withheld (`redaction.incomplete`) when the value is still there. A benign comparison such as `if (token==unit_reference):` is no longer withheld. - **Memory compaction, context bundles and rule exports do not write through a symlink (GHSA-mq5c-rjv9-2fc3).** Reported by @kasparovabi. `ctx_compress_memory` wrote its backup (`.original.md`) and the compacted file, and `ctx_pack` / `lean-ctx pack` wrote the bundle file, with a plain write after the path jail check. The jail leaves a dangling link unresolved, so a symlink a cloned repository shipped could redirect the write to a file outside the project. These writes now go through the confined write, which refuses a symlinked component below the project root, and a memory file that is itself a symlink is refused before it is read. The compacted file and its backup keep the original's permissions. The same applies to `lean-ctx export-rules` (`AGENTS.md`, `CLAUDE.md`, `CODEBUDDY.md`, `.cursor/rules/…`) and to the artifact registry that `ctx_artifacts action=remove` rewrites. A rule file that links to another file, such as `CLAUDE.md` → `AGENTS.md`, is now refused with an error instead of written through, and a new bundle file is readable only by its owner (0600). ### Changed - **Library crates carry new versions.** `lean-ctx-protocol` 0.7.0 adds the Hive model catalog, three routing members of the security policy and the `models.subscription` right, which changes its public types; `lean-ctx-ocla` 7.0.0, `lean-ctx-workgraph` 0.3.0 and `lean-ctx-tasks` 0.2.0 expose those types and move with it. ### Fixed - **A PowerShell-shaped command with a non-ASCII character no longer panics the shell gate.** The verb-prefix check sliced the command name at a byte that could fall inside a multi-byte character (`A-bᲳ`); it now compares bytes, so such a name is no match. - **The cockpit's proof no longer pins a core per session on a large audit trail (#2240).** `lean-ctx value --session` read the whole segmented trail into memory and the savings ledger twice; it now streams both once, skips segments sealed before the session began and lines that cannot name the session. The cockpit proves only in a session whose sidebar was drawn (background spare sessions never draw one), backs off up to an hour after a failed or timed-out proof, and `/cockpit` still proves at once. Thanks @jenseinar for the report. ## [3.12.3] — 2026-11-10 ### Added - **Process v1 G6 and checker ≠ author on Hive tasks.** Submitting a task that carries `process` now runs the G6 gate in the Instance: the locked tests must be unchanged against `spec_commit` and must actually run and pass in a clean rerun, else the submit is refused with the rule and the paths, and nothing is sent. A verify is refused for the session that claimed or submitted the result. Tasks without `process` keep today's path, and no Hive serves process tasks yet. Known gap: code under test runs as the agent's Unix user and could forge a passing report; details and the planned fix are in the module documentation of `rust/crates/lean-ctx-hive/src/tasks/process.rs`. G6 also asks the compiler which locked tests exist at `spec_commit` (one extra build in a private copy; no test of `spec_commit` runs), so a locked test the parser cannot name (macro-generated, `#[cfg_attr(test, test)]`) must still pass in the judged run. This can roughly double a G6 run's time. G6 runs on Linux, macOS and Windows. On macOS a kqueue watch notices a renamed or removed ancestor of the run tree (as inotify does on Linux). On Windows the run uses Git for Windows' `sh`, an environment built from the known folders and a job object; there the tree's ancestors have no rename protection and locked files are pinned by content, attributes and write time (details in `tasks/gate_run.rs`). - **P4 tripwires: new crate `lean-ctx-tripwires`.** A pure, deterministic diff analyzer that flags the documented reward-hacking tricks (touched tests or graders, removed or weakened asserts, new skips, a falling test count, fixture constants, branches on test inputs, time/hash/assert overrides, swallowed errors, mock-only tests, edit cycles, plus `unparsable`) and returns a `leanctx.process.tripwires/v1` report; a hit routes to a person, never to automatic acceptance. Not wired into the gate yet. - **Each app session is its own Hive worker (E48).** An agent registered with `LEAN_CTX_SESSION_ID` set gets the role `-s`, where the tag is 8 base32 characters of a blake3 hash of the session id. It is stable across MCP restarts, so every Hive Desktop session appears on Hive and in the roster as its own worker (`coder-s…`). A reviewer session on the same Instance can now pass Hive's `self_verify`, while a subagent of the same session is still the same worker and is refused. Without a session id the shared `(host, role)` worker is kept as before. One key (`attach::agent_worker_key`) now drives task links, attach, roster, friction and worker accounting. The session id comes from the environment, so this separates sessions as hygiene, not as a trust boundary: the boundary stays the Instance. Upgrade note: a claim taken before the upgrade by the shared worker belongs to a different `wkr_`, so let it expire or release it and claim again. - **Meta Muse Code agent target (#2198).** `lean-ctx init --agent muse` and `setup` register the lean-ctx MCP server in `$XDG_CONFIG_HOME/muse/settings.json` (default `~/.config/muse/settings.json`). The writer adds the mandatory `"schema_version": 1` when it is missing, keeps every other key and server, and merges into the root the file already uses — canonical `mcpServers` or legacy `mcp_servers` — because Muse disables MCP when both appear; a file that already mixes them is left untouched with an error. Re-runs are no-ops, `uninstall` removes only the `lean-ctx` entry, and `doctor` checks the entry. Muse Code is MCP-only: its PreToolUse output schema is closed and an `allow` never skips approval, so shell rewrites would add prompts. Guidance reaches it through the project `AGENTS.md` it auto-loads. - **Task priority: the boards carry the order of work.** A task's priority (`high` | `normal`) and labels (up to 16 of `[a-z0-9-]{1,32}`) are set with `lean-ctx hive tasks priority high|normal` / `labels a,b|--clear` (C0 2.2 E47 `PATCH` at the task's `fields_version`, read again and resent once on `stale_base`), from Hive Desktop over `/v1/local/hive/tasks/{n}/priority|labels` (`tasks.ack`), and by a Queen session with `ctx_tasks action=prioritize`. Local tasks take the same verbs (`lean-ctx tasks priority|labels`, `/v1/local/tasks/{n}/priority|labels`, event `fields`). Lists show high first, then by number, an older high task included (the high tasks are fetched beside Hive's newest-100 page); a list a full Hive answer may have cut is marked `partial` (JSON `partial: true`, a `(partial: …)` line in text). JSON rows carry `priority`, `labels` and `fields_version`. A wrong value is refused before any request. Only a person (the app, the person's own CLI) and Queen sessions the app registered over the local socket (`/v1/local/queens`, socket only) set them; workers read them. A self-declared bus role is never enough. - **The bus refuses approvals in a person's name (process v1 §7).** `ctx_agent post` and `send` refuse an agent's message, with a named rule and nothing rewritten, when it speaks for a person (`on_behalf_of`, `400 invalid_field`: the `on_behalf_of` field or "on behalf of …" / "in the name of …" in its text), states or hands off a person's decision (`approval_on_behalf`, `403 forbidden_right`: decision fields with a person as decider, a handoff of an Inbox item, consent, G2/G9/G10 approval, release, deploy, secret or rights decision, or a sentence such as "the owner approved …"; questions, negations and "waiting for" never match), or passes on what was refused for the sender (`denied_forwarded`, `403 forbidden_right`: a place Hive denied, a publish Hive refused, a vetoed lock or handoff). These three are always enforced. The checks cover questions, answers, offers and handoffs; `status`, `progress` and `finding` posts are not checked. The relay applies the same rules to older queued posts and keeps a post that breaks them local (counted as `withheld`). Publishes the Hive refuses are remembered per sender in the new `bus/refused.json` (7 days, at most 1000), so no agent passes them on. Only a registered Queen session appears as the Queen: under the new `[hive] queen_identity` (`warn` | `enforce`, env `LEAN_CTX_HIVE_QUEEN_IDENTITY`, which wins) the default `warn` passes a sender presenting as the Queen (role `queen`, the name "Queen", a "From the Queen:" label) that is no registered Queen session, puts `[unverified Queen sender: , agent , role ]` in front of its text and logs it in the new `bus/queen-warnings.json`; `enforce` refuses it, and any other value counts as `enforce`. Switch to `enforce` only once `queen-sessions.json` lists every Queen session: Queens on another machine are not registered with the host yet. Not covered yet: app session messages (`hive_message_session`, an app tool, not the bus). - **Rights per session (process v1 §9).** The launcher (Hive Desktop) writes one rights file per session (`leanctx.session-rights/v1`) and starts the session with the new `LEAN_CTX_RIGHTS_FILE=`. It narrows what that session may write, below the Instance's own path jail: writes only inside the role's write scopes, such as its own worktree (`write_scope`); after G2 no role, the Spec Writer included, writes a locked path (the feature list, a locked test, a directory or hard link holding one; `feature_list_locked`); a `deny_write` class refuses (`deny_write:`); the rights file itself is never written (`rights_file`); `denied_tools` refuses a tool, aliases included (`denied_tools`). It applies to `ctx_shell`/`shell` (a command whose writes cannot be judged is refused: `unanalysable`), `ctx_execute`, LeanCTX's own writes, the new `lean-ctx hook rights` for native `Edit`/`Write`/`MultiEdit`/`NotebookEdit`/`Bash`/ `apply_patch` (an unknown native tool is refused: `unknown_tool`), and calls forwarded to the daemon, which carry the file as the new `/v1/tools/call` field `rightsFile` (local socket only, else `400 rights_file_refused`; a profiled session may not use the daemon socket itself: `daemon_socket`). Every refusal names its rule. Reads are not narrowed. A rights file that is set but missing, unreadable, insecure or invalid refuses every tool call and every write; it never falls back to the Instance's rules. **No rights file set means no change:** the Instance's rules apply as before. This is a best-effort first line; the guarantee is the G6 locked-path check, and the known limits are listed in the module doc (`rust/src/core/session_rights.rs`). - **Local Read / Local Service contract for LeanCTX | Hive Desktop.** Every Local Read kind is a versioned JSON document on the CLI and a `/v1/local` route of the daemon socket, released with one receipt for the bytes sent, and listed in one `capabilities` document with every verb and the transports that answer it (`docs/contracts/local-read-v1.md`, `local-service-v1.md`): session stats and cost per `LEAN_CTX_SESSION_ID`, gain/spend rollups (daily and per project), the agent bus (`bus list|read|post|leases|claim|release`), `presence list`, knowledge writes, evidence verification and export, providers, effective policies with the organization policy's signature state, `agents`, and the new `lean-ctx daemon status --json` (`running`, `pid`, `socket`, `autostart`, `service_name`). - **Sync and policy evidence on the local service.** `hive.sync`, `policy.sessions` and `policy.session`, CLI-only before, are served on the daemon socket at `/v1/local/hive/sync`, `/v1/local/hive/policy/sessions` and `/v1/local/hive/policy/sessions/{id}`, released through the same release point (one receipt) and listed in capabilities. `policy.sessions` `installed` adds `vaults`: one row per vault the installed policy reaches on this machine (`vault_id`, `ns`, `name`, linked `roots`) and which policy applies (`vault`, `default`, or `unverified` when the installed policy files are damaged or too old — fails closed). Read only, from local files; nothing contacts Hive (`docs/contracts/local-read-v1.md` §23). - **Presence with names.** `LEAN_CTX_SESSION_NAME` names an agent session; `presence list` rows carry the session name, agent host, Instance (machine) and project with its vault; `hive presence` rows carry the names a Hive relays with a presence. - **A person's bus post can leave the machine.** `bus post` answers `cloud` (`queued`, `local_only`, `withheld` or `held`, with the reason); a post to a vault bus is published as the person once the Hive accepts a person's publish (`hello.ack` feature `person_publish`). - **`tasks amend`: correct a submitted result, record a done task's merge.** A submit ends the claim, so a new head or a merge commit could not be recorded afterwards ("this machine holds no claim"). `lean-ctx tasks amend` / `hive tasks amend`, `ctx_tasks action=amend` and `POST /v1/local/tasks/{n}/amend` (listed in capabilities) let the agent that submitted a result replace its evidence and summary while it is submitted; once it is done, the submitter, a person or a registered Queen session records the merge commit once (`--merge `, `result.merge`); never the reviewer (`not_merger`). Every amendment passes the release first (a withheld one writes nothing) and lands in the task history as old → new (update `kind: amendment`, `amended_from`, `amended_to`). On a vault it needs the Hive route `POST /v1/vaults/{id}/tasks/{n}/amend`, which no Hive serves yet: it fails closed with "not supported by Hive yet" and sends nothing. - **Hive background sync: a connected Instance keeps its shared vaults in sync by itself.** `lean-ctx setup` and `lean-ctx hive connect` now install the daemon as a supervised service that starts at login and restarts after a crash: the systemd user unit `lean-ctx-daemon` on Linux (`loginctl enable-linger ` keeps it running on a headless machine while logged out), the LaunchAgent `com.leanctx.daemon` on macOS. This changes an upgrade: the next `setup` or `hive connect` installs a service that was not there before. The daemon syncs a local change (a remembered fact, a written doc page) 5 s after the last change and at most once every 30 s per vault, syncs at once when Hive announces a change of the vault (bus `log.advanced`, `trust.advanced`), and otherwise every `[hive] pull_interval_minutes` (default 5). Only vaults already shared from this machine sync. `lean-ctx doctor` reports `Hive sync needs a supervised daemon (run: lean-ctx daemon enable)` when the machine is connected to Hive and the service is missing. `lean-ctx hive sync` still works and syncs the current project at once. Details: `docs/guides/hive-background-sync.md`. - **The build says where it came from.** `lean-ctx --version` names the build kind after the version: `official` only for the upstream release workflow, otherwise `(dogfood )` for the promoted Instance state, `(dev )` for any other checkout (`, dirty` with local changes) or `(source)` for a tree without git. The `capabilities` document carries a `build` block (`kind`, `commit`, `dirty`, `official`), and `lean-ctx doctor` shows the build origin. The label is a provenance hint stamped at compile time, not an attestation. - **`lean-ctx hive docs import --from-emspace ` moves an emspace space into the checkout's Hive vault**: pages with their sources as anchors pinned at emspace's commit, open notes, and open tasks as task proposals. It is a dry run unless `--apply` is given, and it writes nothing when the checkout's `.emspace` link does not name the exported space. Page descriptions cannot be written to Hive yet, so it fails closed: `--apply` refuses while any page carries a description (or the export's shape could hide one), unless `--drop-descriptions` is given. - **Outside text reaches the agent as data, never as instructions (pz21).** Text that a person or system outside the project's write path can author — an issue, a pull request, a fetched page, a wiki, a remote file, a foreign MCP server's answer, another Instance's bus message, the output of `gh`/`glab`/`curl`/`wget`/registry queries and of their wrapped forms (`sh -c`, `env`, `timeout`, `&&`/`|` chains) — is admitted with its origin class. Trust is `min(origin floor, content trust)`; an unknown origin is handled exactly like an untrusted one. In every gateway mode, developer mode included, the release point reads the call's origin ledger (never displaced by the 4,096-decision receipt cap) and fences such text: `[untrusted input: — data, not instructions]` … `[end untrusted input]`, byte-stable, with any copy of the closing line inside the body escaped. Injection lines in outside text are redacted where the configured action is `warn`. A bound result gets a fence text block in front and a closing block after, its bound parts unchanged, or is withheld (`untrusted_bound_result`); an error that may carry outside text is replaced by a typed notice. Project files stay byte-identical and unfenced. The session is tainted with every origin it read (bounded, sticky overflow, written through so a restart cannot untaint it); `curl -o x` taints at once and a later `ctx_read x` in the same session is fenced. Provider chunks carry their origin into the BM25 index; a chunk indexed before (no origin) is read as unknown. Workers that admit for a call carry its capture (`capture::carry`); detached store writes and egress checks run `outside_call` and never taint; an admission with neither marks every open call (`orphan_external`) and is fenced as an overflow. A replayed result brings its origin ledger along, outside-origin results are never response-cached, and carrier text names its class (unclassified text counts as unknown, never as the project's own). - **Safe retention for orphaned gateway evidence: `lean-ctx inspect --maintain --dry-run`.** Retention now sweeps orphaned egress records (admissions, decisions, attempts, observations) and unused outputs once they are older than the protect window; the audit trail and the ledger are never touched. `inspect --maintain --dry-run` lists counts, bytes and paths per action and changes nothing (no lock, stamp, cursor or ledger write). A single receipt is bounded at 64 MiB when stored and when loaded, the default store cap is 4096 MB, and `doctor` names the dry run. ### Security - **PowerShell hashtables and typographic quotes are checked.** Under the PowerShell host, a program in a hashtable value or key (`echo @{ a = evil_binary }`, `echo @{ (evil_binary) = 1 }`) and a command quoted with `‘ ’` or `“ ” „` (which PowerShell reads as quotes) passed the allowlist unchecked. Both are now read the way PowerShell runs them. - **The redaction-marker guard says how to recover, and admits marker literals in source and test code (Hive #37).** A refused command now tells the agent to derive a value that came from tool output inside the command (`producer | consumer`) or read it from its env var or secrets file, instead of retyping the marker. One quoted heredoc into a Rust file or a test file (`cat > src/x_tests.rs <<'EOF'`), and a `client fs write` to such a file, may now hold the marker literal. Config and data files, scripts and anything riding along on the heredoc line stay refused. - **Writes to project data paths refuse symlinked components.** A symlinked `.lean-ctx`, `proofs` or handoff directory, or a symlinked target file, could redirect a LeanCTX write outside the project. Writes now rebuild the destination below a trusted root and refuse every symlinked component; on Unix they walk directory handles (`O_NOFOLLOW`), so a link swapped in after the check cannot redirect them. - **A Codex approval nobody gave no longer runs an unlisted program.** Under Codex's `approval_policy = "never"` with full disk access, and with its automatic reviewer, Codex accepted the `ctx_shell` / `ctx_execute` approval prompt itself, and the gate ran the command as approved: with `shell_security = "enforce"` and only `winapp ui list-windows *` listed, `winapp ui status` ran. Codex now gets the same approval form with a choice as every client, and a person answers it with a choice. A decline under its `never` policy and an accept from its automatic reviewer both refuse the command and name `lean-ctx allow`; an accept without a choice runs nothing. - **Look-alikes of the Queen are read as written.** The Hive bus Queen rule (`queen_identity`) and the receiver's mark (`[unverified Queen sender: …]`) now match on a folded text: NFKC, every `Default_Ignorable_Code_Point` removed (zero-width characters, the combining grapheme joiner, variation selectors), visible blanks such as the Hangul fillers read both as a space and as nothing, and every character that looks like printable ASCII reads as that ASCII by its UTS #39 skeleton — the whole Unicode 18.0 `confusables.txt`, not a hand-picked list, so a small capital `ᴜ`, an Armenian `գ` or a Coptic `Ⲛ` is caught like a Cyrillic `е`. So `From the Que\u{34F}en:`, a role `Qu\u{FE0F}een` or `Qᴜeen`, or a forged `[unverif\u{34F}ied Queen sender: …]` or `[unᴠerified Queen sender: …]`, or one with an ASCII `l`, `1` or `|` for an `I` (`[UNVERlFIED QUEEN SENDER: …]`) no longer pass unmarked; ordinary Cyrillic, Greek or Armenian text is not affected. The sender's name, agent id and role in the mark are escaped (no bracket or line break) and cut to 80 characters, so they can no longer end the mark early. New dependencies: `unicode-general-category`, `unicode-security` (with `unicode-script`). - **A bus text over its limit is refused before it is sent (`text_too_long`).** A question, answer, offer or handoff whose text — trimmed, with the receiver's mark in front when it gets one — is over its type's limit is refused with how many characters the mark takes and how many to cut. A question the relay must still send over the limit is delivered cut, with a visible `[cut on sending: N more characters did not fit]` note, never withheld. - **Dependencies with published advisories are updated.** The bundled SQLite moves to the release `rusqlite` 0.41 ships, fixing RUSTSEC-2026-0459. The vendored MCP SDK `rmcp` moves from 2.0 to 3.9, which bounds HTTP response bodies an MCP server sends to `lean-ctx` (RUSTSEC-2026-0462) and stops OAuth discovery for HTTP MCP servers from following metadata URLs to private or loopback addresses (RUSTSEC-2026-0457). The lean-ctx patches on top of `rmcp` shrink to two, since 3.9 contains the other fixes; one keeps the #1454 answer, so a client that probes with `server/discover` before `initialize` (MCP Go SDK, Antigravity) still gets -32601 and falls back to `initialize`. `lean-ctx-embed` now declares the Rust 1.89 its dependencies need. - **PowerShell here-strings and backtick escapes cannot hide a command (GHSA-8549-rc5m-4qwh).** Under the PowerShell host, a here-string (`@'` … `'@`, `@"` … `"@`) was read as ordinary quotes, and a backtick before a quote or `#` as a substitution, so a `;` and an unlisted program after the construct stood inside what the gate took for one argument and ran unchecked. A here-string, and a backtick escape before a quote, `#`, `;`, `|` or `&`, are now refused as unvalidatable under the PowerShell host; POSIX hosts are unchanged. Reported and fixed by Robin Norberg (@RobinNorberg). - **The PowerShell stop-parsing token `--%` cannot hide a command.** After `--%` PowerShell passes the rest of the line to a native program verbatim up to a `|` or line break, so quotes no longer pair and a pipe into an unlisted program could stand inside what the gate read as one quoted argument; an argument whose value is exactly `--%` (`"--%"`) also makes PowerShell re-split the following arguments at spaces. Under the PowerShell host every `--%`, quoted or not, is now refused as unvalidatable unless it is glued into a plain word of letters, digits, `_`, `-` and `=` (`--format=--%`, `a--%`). The forms written with typographic dashes are refused conservatively as well (pwsh 7.4.6 does not stop parsing at them; Windows PowerShell 5.1 is untested). POSIX hosts are unchanged. - **A PowerShell braced variable `${…}` cannot hide a command.** PowerShell ends `${…}` at the first `}`, with quotes inside it belonging to the variable name, while the gate read it the shell way and paired those quotes first: `echo ${x'}; evil_binary #'}` was one argument to the gate and ran `evil_binary` under PowerShell. Under the PowerShell host a `${…}` that holds a quote, `$`, a backtick, `(`, `)`, `{`, a line break or a non-ASCII character before its first `}` (or has no `}`) is now refused as unvalidatable; plain names such as `${x}` and `${env:PATH}` pass. POSIX hosts are unchanged. - **PowerShell `<<` and an attached `#` cannot hide a command.** PowerShell has no here-documents, so `echo a<