Repository navigation
v3.12.8
Upgrade notes
- Usage metrics are on by default after
lean-ctx cloud connect. Connect no longer asks; it confirms the metrics only when nobody has decided yet. An off chosen in Settings, by a team policy, by a project setting, or after access ended or was revoked stays off. To switch them off:lean-ctx config set cloud.metrics_upload false, or Settings in the app. What is sent:docs/guides/cloud-engine-metrics.md. - The Intelligence runtime is installed at connect and setup without a question, also without a terminal (
setup --non-interactive,onboard). A failed install is reported and never fails connect or setup;setup runtime deactivatestays off, and update refreshes do not install. - Local LeanCTX Cloud data now belongs to one server and team. It is stamped at connect; connecting this computer to another team or server removes the previous team's local Cloud data and the knowledge pulled from it before anything reads them. Local Cloud data from before 3.12.8 is kept by the connection it was created under; at the next connect to another team it is removed.
lean-ctx cloud disconnectalways removes the knowledge pulled from LeanCTX Cloud, also with--keep-local, and also from folders deleted since. A damaged local knowledge store never locks Cloud out for good: Cloud stays off until it is removed, andlean-ctx cloud disconnectstill cleans every other folder and names the damaged file.
Added
-
Seamit answers in
ctx_search. WhenLEANCTX_SEAMIT_CMDnames the Seamit answer program (an absolute path to an executable file that only you can change, in folders only you or the system can change),ctx_searchshows its answer below the search result, marked as data from Seamit. The program gets the search on stdin, a cleared environment (onlyPATHwith its absolute entries,HOME,USER,LANG,LC_ALL,TMPDIR) and 300 ms; an answer that is late, larger than 2 KB or not aseamit.answer/1answer is left out, and the search result is unchanged. Without the variable nothing runs. On Windows the answer is off for now: no program runs there. If you also use the Seamit hook, runseamit hook print --embedded-in lean-ctxonce after installing this version so the answer is not shown twice; with an older version the hook still needs the search tools. Why an answer was skipped is in the debug log. -
Each computer tells the Cloud whether it shares metrics. When the Cloud supports it, a computer now says on every connect whether metrics sharing is on (
cloud.metrics_upload, off after connecting without sharing). The web can then show "sharing is off" for that computer instead of guessing from missing numbers. A change to the setting is sent within a few seconds while the computer is connected. With an older Cloud nothing changes. -
Rules can be replaced or withdrawn from LeanCTX Code. A rule your team keeps in your Cloud can now be replaced by a new one or withdrawn with a short reason, right from the app.
-
Sending a rule to agents can check that it has not changed. When the app passes the version you saw and someone changed the rule since, you are asked to open it again before sending.
-
Team chat posts and person posts to a vault are now sent from the LeanCTX Code app, which signs them on your device. Posting them from the terminal tells you to use the app instead.
-
Only the LeanCTX Code app can link its chat key when connecting a computer, so no other program can sign team messages for you. A program that points lean-ctx at folders of its own is refused as well.
-
On a computer that is already connected, LeanCTX Code can now pair its chat key without connecting again; the connection and its shared projects stay as they are.
-
lean-ctx cloud connectnow refuses an option it does not know instead of starting a connect. -
A team post that could not reach LeanCTX Cloud can be sent again; one that arrived is not sent twice.
-
How much of this month's usage is used. The app can now show the
share of this month's usage that is used, as a whole percent, when the
service reports it. -
lean-ctx cloud worker status --json. Prints the worker-mode state (not_opted_in,stopped,paused,active), whether it is paused on this computer, and the opt-in as LeanCTX Cloud returned it, including the ids of the vaults whose tasks agents may pick up, so the app limits automatic pickup to them. -
LeanCTX Code pairs its opt-in key with the other app keys (rc4-16).
lean-ctx cloud connect --json --app-keys -now takesoptin_keybeside
chat_keyandtask_key. The key's bind is checked before anything is
sent, travels on the same pairing the person approves in the browser, and
is kept as taken once the Cloud accepts it, so task pickup can be turned on
from LeanCTX Code. A refused, already bound or removed opt-in key keeps its
own reason (optin_key_invalid,optin_key_bound,optin_key_cleared). -
LeanCTX Code can turn task pickup on and off for this computer (rc4-16).
Three app-only Local Service routes (cloud.pickup,cloud.pickup.set,
cloud.pickup.key) report the state and daily budget, stop task pickup, and
turn it on with a request the app signs with its own opt-in key; the engine
checks that signature and forwards it unchanged. A first turn-on proposes
3 tasks and 1M tokens a day with no cost limit, for the person's own vaults;
a stop or a pause by the person is never turned on again.lean-ctx cloud worker on --jsonforwards the same signed request, andcloud worker status --jsonadvertises it withcapabilities.worker_ononce the key is bound. -
lean-ctx cloud unlink: stop sharing a project folder. It removes the folder's link to its vault on this machine and keeps everything stored locally: knowledge, tasks and the files in the folder stay as they are, and the vault in the cloud is not changed. Notes queued for the vault from this folder are dropped, and nothing from the folder is shared again, also not through another checkout of the same repository, until you runlean-ctx cloud linkin it. It works while this machine is disconnected, running it twice changes nothing, and--jsonprints the Local Read kindcloud.unlink(local-read-v1 §20a).
Changed
-
A
ctx_shellcwdorcdapplies to that call only, and relative
ctx_read/ctx_patchpaths always name the project root (#2262). Claude
Code subagents share one MCP connection, so one agent'scwd(an
EnterWorktree worktree, say) used to move where the next agent's shell ran
and what its relative paths named, and a path that worked a moment earlier
came back doubled. Now neither thecwdargument nor acdinside the
command is remembered: a call withoutcwdruns in the session's start
directory, a session without a project root learns it from its start
directory, never from one call'scwd, and a read and an edit of one
relative path reach one file; an edit of a missing path names the file
ctx_readwould read in its place.
Breaking for worktree users: this reverses the #707 preference for the
active worktree and the 3.12.7 entry "ctx_readandctx_patchsay which
base a relative path used": the[lean-ctx: path base moved: …]line and
the doubled-path resolution are gone, because the base no longer moves. A
caller that relied on a remembered directory passescwdon each
ctx_shellcall. In a git worktree, pass absolute paths;ctx_shellnotes
once when acwdlies in another checkout. To make the worktree itself the
project root, start the agent in it or pin it withLEAN_CTX_PROJECT_ROOT. -
macOS Login Items show LeanCTX, not "sandbox-exec" (rc2-2). The daemon,
proxy and auto-update LaunchAgents start the lean-ctx binary directly and
name the LeanCTX app (AssociatedBundleIdentifiers); each process still puts
itself under the deny-~/Documentsseatbelt (#356) at start-up. Existing
plists are rewritten on the next update ordaemon/proxyinstall. -
LEAN_CTX_AGENT_ROLEnames an agent on the bus; it no longer narrows its permissions. A host that wants a narrower permission role for an agent setsLEAN_CTX_ROLE. LeanCTX's own background presence is no longer shown as a team agent or a worker. -
Connect and setup without questions, plain output. No step counter, the computer name as the default label, terminal links where the terminal supports them, and a short closing line when no project is linked.
cloud connect --jsonreports the runtime install as aruntimemember ofconnected. Runtime errors name their cause: expired channel catalog, channel mismatch, package manifest, or platform not available yet.setup runtime installwithout flags installs from the signed channel; usage errors list the valid forms. Uninstall leftovers are printed as plain lines, and the summary no longer claims a full removal when something remains. -
A refusal with code
invalid_fieldnow keeps its code. The engine
reports such a 400 asServer { status: 400, code: "invalid_field" }
instead ofunknown, so itsevent_codeis nowinvalid_fieldon every
route that answers it, not only in pairing. -
lean-ctx-protocolnames the error codeCloudErrorCode::InvalidField
(wireinvalid_field, 400). On the wire this is additive: a code the
engine does not know still decodes asUnknown.CloudErrorCodeis not
#[non_exhaustive], so Rust code that matches it without a wildcard arm
needs one more arm. -
The keys of LeanCTX Code are paired only as announced and signed.
When LeanCTX Code pairs its keys with a computer, lean-ctx now names
those keys when the pairing starts and signs them with the computer's
own key when it finishes. The service accepts only the named and signed
keys, so no other key can be slipped into the pairing. If the service
cannot pair the keys yet, nothing is paired and lean-ctx says so before
you approve anything. If the service refuses the keys, the connect ends
with "Pairing failed, please start connecting again." An enrollment
token no longer pairs the chat key; connect from LeanCTX Code for that.
Fixed
-
lean-ctx doctor --jsonexplains what to do (rc4-220). A finding about
Claude sign-in or bridge versions now carries anadviceobject (id, title,
severity, a one-sentence detail, and named fixes with what each changes and
its commands), so LeanCTX Code shows it instead of raw terminal text; other
entries keep their four fields, and the text output prints the same advice
under the check. The Cursor extension is versioned on its own and is shown,
never reported as out of date. -
Readable task lists on request.
lean-ctx cloud tasks listandshowtake--plainto print task texts without the data markers; without it the texts stay marked as data, so agents never read a task as an instruction.lean-ctx cloud stop --helpnow explains stopping, releasing and checking a team stop on its own page, and the release message no longer claims a two-factor step. -
Your team chat messages are never sent unsigned. The service accepts
a message you write to a team chat only with your signature, which tells
it apart from your agents' messages. LeanCTX now prepares that signature,
but no computer can sign such a message yet. Until it can, the message
stays queued and is not sent. -
Homebrew installs LeanCTX without Command Line Tools. The tap formula
already downloaded the signed release binary, but it had no bottle, so
Homebrew handled it as a source build and stopped on macOS until current
Command Line Tools were installed. Each release now attaches one bottle per
platform, repacked from the verified release archives, and the formula lists
them:brew install lean-ctxpours the prebuilt binary on macOS Monterey and
later (Apple silicon and Intel) and on Linux. Theonnxruntimedependency
still comes from Homebrew's own bottles. -
Task messages in Messages now read as plain sentences such as "Task #3 is open and can be claimed." instead of showing tool commands; agents still get the exact next step.
-
The name typed for a computer on the approval page is now its name
(rc4-1).lean-ctx cloud connectkept the name it sent (the--labelor
the host name) even when the person changed it in the browser. When the Cloud
returns the chosen name on connect, that name is stored and shown everywhere
the computer's name appears (status, team chat, agent presence, worker
names). The name must be 1-64 characters of printable text without spaces at
either end; any other value is ignored and the sent name stays. A Cloud that
does not return it keeps today's behaviour. -
Task tools explain what they need.
ctx_tasksmarkssummaryas required forupdateandsubmitin its tool description, and a missing summary says what to send with an example. A refused piece of evidence quotes it and says in plain words what the reference should be (afactis the id of a fact saved withctx_knowledge, not a sentence; a sentence goes into the summary). A refusedfile_anchorsays why (no such file in the project folder, a path outside it, or a private file) instead of internal reason codes;README.mdat the project root is a valid anchor. -
lean-ctx cloudnow names device counts the way the web does: "hosts registered 2 of 3" and "hosts connected at once 1 of 2", with how to free one when a count is full, andcloud disconnectsays what a revoke frees (the connection at once; on Personal the registration after 7 days unless the slot is recovered). -
Team rules sent to agents now reach every agent in the project, not only
sessions started from the LeanCTX Code app (rc4-69). Each
lean-ctx cloud sync(and the scheduled sync) lists the project's
decisions and keeps exactly those that are active and marked as sent to
agents, with the text that was sent; a rule changed after sending is left
out until it is sent again, and the rules are removed when access to the
project ends. Any MCP agent linked to the project, such as Claude Code in a
terminal, then sees them at the start of its session (up to five, ordered by
id, with the count of the rest) and can recall them with ctx_knowledge. The
text comes from your team: it is marked as a team rule, kept short and
delivered as data, never as system instructions.lean-ctx cloud decisions
now nameslist --jsonin its usage text. -
Agents show only where they work. A machine whose bus follows several vaults showed every one of its workers in each of those vaults; now a worker appears only in the vaults its agents work in, and its changes reach only those.
-
Sharing from the app explains clearly when the Cloud does not offer
browser confirmation yet.lean-ctx cloud connect --share --jsonthen ends
itsshareevent with the reason "This Cloud does not offer the confirmation
in the browser yet. Try again after its next update." instead of a raw field
error. Every other refusal is reported as before. -
Sharing a project whose vault your role may not create says who can.
lean-ctx cloud connectnow says that your role or your team's plan does not allow creating the vault, that a team owner, admin or maintainer can, and thatlean-ctx cloud link <workspace>/<vault>links an existing one, instead of a bare refusal. The team-stop notice says the team's cloud requests, landings and running Code sessions are held until the stop is released. -
A vault's chat reaches this computer with no agent running. The bus relay subscribed only to vaults that had an active local agent in one of their folders, so a person who opened a vault's chat without an agent never received a message there. It now subscribes to every linked vault (at most 64); presence and workers are still announced only for running agents.
-
lean-ctx updatenames a full disk as such, not as a bad signature. When the temp directory was full or over quota, the extra check with an installedcosigncould not write its files and the update reportedcosign release signature verification failed: Disk quota exceeded, which read like a tampered release. The update still refuses to install, but now sayscould not run the cosign release signature check: <error>. Free disk space or set TMPDIR to a directory with room, then retry; a rejection from cosign itself is still reported as a failed signature. -
Governor: native Grep results are shaped (R6). Under the Claude
Code governor,hook rewrite-enforceis security only and never rewrites a
Grep, andhook governneither matched nor handled Grep, so no Grep result
was ever compressed (Seamit bench: 63 Grep calls in one session). Grep now
reacheshook govern, and a largecontentresult comes in ripgrep's
--headinglayout (each path once, then itsN:/N-lines), strictly
lossless. A governor install writes[governor] r6 = "on";
LEAN_CTX_GOVERNOR_R6=shadow|offoverrides it. -
lean-ctx cockpit installno longer aborts the archive download after two minutes (#2270). The archive gets its own 30-minute transfer limit; the manifest and signature keep two minutes. A failed download is reported as such, with a retry hint andlean-ctx cockpit install --from <bundle>as an offline alternative, instead of "not installed". -
Homebrew on macOS pours a bottle instead of building from source. Without a bottle,
brew install lean-ctxtook the build-from-source path and stopped on outdated Command Line Tools before installing the prebuilt binary. Releases now attach deterministic arm64 and x86_64 bottles, verified against the release checksums. -
Only agents in checkouts linked to a LeanCTX Cloud vault are announced and registered. Agents in unlinked checkouts no longer appear in presence, registrations or subscriptions; the local relay report still names them, with the reason that their checkout is not linked to a vault.
-
Release evidence: the pinned digest of the release workflow is refreshed and now checked on every merge request.
-
A task a person proposes in LeanCTX Code now shows as theirs (rc4-67).
The app sent the proposal as an agent's, so the team saw "from an agent".
LeanCTX Code now signs the proposal with its own task key, kept in the
Keychain and set up when you pair this computer, without asking for Touch
ID each time. The project then records the task as proposed by the person
this computer is linked to. Nothing in the request names anyone, agents
keep proposing as agents, and a proposal without that signature is still
recorded as an agent's. A task'screated_byalso saysownwhen the
project tells whether the creator is the person this computer is linked to.
Upgrade
lean-ctx update # recommended (auto-downloads + refreshes shell hooks)
cargo install lean-ctx # or
npm update -g lean-ctx-bin # or
brew upgrade lean-ctxNote: After upgrading via cargo/npm/brew, run
lean-ctx setupto refresh shell aliases.lean-ctx updatedoes this automatically.
Full Changelog: v3.12.7...v3.12.8