Repository navigation
Releases
v1.3.2 — two outside-contributor fixes; releases publish to the MCP Registry
Two fixes from outside contributors: an index rebuild keeps Longhand's CPU
embedding model, and doctor stops flagging Claude Code 2.1's new transcript
entries. Releases now also publish to the MCP Registry on their own.
Fixed
- An index rebuild switched to the wrong embedding setup.
reset()and
the episode rebuild inanalyze --allrecreated their Chroma collections
without an embedding function, so for the rest of that process Chroma fell
back to its default one, the provider selection 1.1.0 pinned away from.
Every collection Longhand creates now uses the same CPU-pinned model.
Closes #98. (#113, thanks @mayuriphad) doctorflagged Claude Code 2.1's new transcript entries as format
drift. Five request-telemetry types (api-request,api-request-blob,
api-request-shape,atis-latch,tools-used) repeat what is already
stored, so the parser now skips them. Four others (custom-title,
agent-setting,relocated,cost-state) are kept as triaged unknowns
until they are worth promoting. Rows stored before this release stay in
the database, anddoctorno longer counts them as drift. (#138, thanks
@Minecraft269)
Internal
- Releases now update the official MCP Registry too (#137). A new job in
publish.ymlruns after the PyPI upload, signs in with GitHub OIDC (no
stored secret), and publishesserver.jsonwith a pinnedmcp-publisher
whose Sigstore signature it checks first; a re-run skips a version the
registry already has. Nothing published there automatically before, so the
registry sat at 0.5.5 from April until 1.3.1 was published by hand. - Python 3.15 does not install yet, and the README now says why (#139):
onnxruntime(required bychromadb) has no 3.15 wheel and has never
published a source distribution, so pip has nothing to install or build.
A new weeklypy315-watch.ymljob retries the install and the suite on
3.15 and opens one issue when the install first succeeds. It never gates a
PR. A failed install there is the expected state for now; the job goes red
only if the install fails for a reason other thanonnxruntime. - The test suite no longer leaves background
longhand ingestprocesses
running (#140). An unmatched project query starts a detachedingest, and
ten tests reach that path. On a developer's machine each child re-read all
of~/.claude/projectsinto a temporary store for up to an hour, so every
local run left ten behind and stacked runs could exhaust memory. CI never
showed it, because its runners have no transcripts.tests/conftest.py
now refuses a real detached spawn unless the test patches
subprocess.Popenitself or is markedreal_spawn, and
tests/test_spawn_guard.pyfails if that guard stops working. - README and the repo docs got an accuracy pass against 1.3.1 (#132): backup
behavior, the security surface, and counts. - Two maintenance scripts (
scripts/bump_version.py,scripts/recall_diff.py)
are reformatted for the currentruff format; no behavior change.
New Contributors
- @Minecraft269 made their first contribution in #138
- @mayuriphad made their first contribution in #113
Full Changelog: v1.3.1...v1.3.2
v1.3.1 — keep a session's last turn when the ingest lock is busy
A session could lose its last turn to a busy ingest lock or to a full ingest
of the same transcript, and reconcile could not see the loss.
Fixed
- A turn was lost when its Stop hook found the ingest lock busy. The hook
skipped the turn and left it for the next Stop, which never runs if the
session ends on that turn. SessionEnd deferred the same way. Both hooks now
hand a locked-out ingest to a detached retry (--wait-lock 600), one per
transcript and hook, which reads the transcript to its end as soon as the
lock frees. The hooks still never wait. Each retry logs to
logs/live-retry-*.logorlogs/session-retry-*.log. A retry that gives
up leaves alock-timeoutbreadcrumb; if one can't be started, the hook
leavesretry-spawn-failed.doctorcounts both as healable by
reconcile --fix. - A full ingest logged bytes it never read. It measured the transcript
after embedding and logged that size as ingested, so a turn a live session
wrote during the ingest was claimed unread: the live tail's cursor skipped
it andreconcilesaw nothing to heal. The size is now taken before
parsing. - Background workers could run the wrong Longhand.
longhand ingest,
spawned by recall, ranpython -m longhandin the hook's working
directory (the session's project), and Python imports alonghand/
package from there first: a session inside a Longhand checkout ran that
checkout's code. Background workers, including the new retries, now start
in the data directory. reconcilecounted a transcript as fully indexed once it had a row. A
transcript that grew after its last full ingest stayed invisible to it, so
a lost turn was never healed. It now re-ingests a transcript whose size
differs from its last full ingest once the file has been quiet for 30
minutes (changed), and counts one still being written (settling)
without touching it. A transcript whose last ingest skipped analysis on
purpose keeps that defer. The CLI and thereconcileMCP tool report both
counts.doctor's "Recent ingest (7d)" row had the same blind spot. It now
turns yellow when a quiet transcript has grown since its last full ingest.
v1.3.0 — git-backed backup and restore (longhand backup / restore)
Opt-in backup of the archive to a git remote you own, and restore from it.
Nothing leaves the machine until backup init has shown the consent
screen and you have typed yes.
Added
longhand backup init --remote <url>validates the remote (https, ssh,
scp-like, file, or an absolute path; a leading-or any::transport
helper is refused), refuses a public or organization-internal GitHub
repository (checked throughgh;--createmakes it private first),
measures the archive, prints what would be uploaded, and enables backups
only after you typeyes(plusprivatewhen the remote cannot be
verified).--yesfor scripts; without a terminal it refuses.longhand backupexports every changed session as its verbatim
transcript (one line per distinct stored line, 40 MB parts), with every
longhand redactpattern masked in the copy only, commits in 500 MB
batches and pushes. A session in the repository never shrinks: two
machines' copies are merged as a union.--dry-run,--no-push, and
--no-mask(needs a terminal and the typed wordverbatim).longhand backup status,backup auto on|off(the scheduled
reconcile --fixpushes at most hourly, only when something changed,
masking always on, failures tologs/backup.log),backup disable.longhand restore [--from <url>|<path>] [--skip-analysis]clones the
backup and re-parses every transcript with the current parser into the
store under the ingest lock; sessions already present are skipped by
content hash, one broken session never aborts the rest, andconfig.json
is restored only when the data dir has none.backup.*keys inconfig.json(longhand config --set backup.auto=true)
and aBackuprow inlonghand doctor.- docs/backup.md.
Changed
- README principle 8 ("Local or nothing") now discloses the second, opt-in
exception beside the version check; SECURITY.md lists the third
subprocesscall site (longhand/backup/gitrepo.py, argv-only with
protocol.ext.allow=never) and the new paths under~/.longhand/. - README and the repo docs got an accuracy pass against 1.2.3 (#109); the
runtime-command surface check reads package sources as UTF-8 so it passes
on Windows (#111).
v1.2.3 — six user-facing bugs found by the docs audit
Six user-facing bugs, found by checking every claim in the docs against the
code. None changes stored data.
Fixed
get_session_timelinewithtailreturned the middle of long sessions.
It read the first 5,000 events in ascending order and sliced their end, so
on a longer session "how did it end" came back with events from the middle.
It now reads newest-first under the same cap and returns them in ascending
order. One session in the author's archive has 8,240 events.setupsuggested a command that no longer exists. Its closing hint was
longhand recap --days 7, removed at 1.0. It now suggestslonghand status --days 7, the documented successor.setupsaid it installed the MCP server "for Claude Code".
longhand mcp installwrites Claude Desktop's config only. The step now
says Claude Desktop, and prints the command that registers Longhand with
Claude Code (claude mcp add longhand -s user -- longhand mcp-server), the
same onedoctorrecommends.- Recall and a tool description pointed Claude at a retired tool. Recall's
three narrative footers andget_session_timeline's description said to
usesearch_in_context, retired at 1.0. They now namesearchwith
session_idandcontext_events. - The
reconciletool's schema saidfixdefaults to true. The handler
has defaulted to a dry run since 1.0. The schema now agrees, so an agent
that omitsfixknows it gets a report, not a repair. --skip-analysisclaimed to populate "SQLite only". Events are always
stored and embedded; the flag skips the analysis pass (episodes, segments,
and session/project vectors). Thesetupandingesthelp now says so.
Internal
- Three new checks guard the text the program shows at runtime, the way the
README checks guard the docs: everylonghand <command>it suggests must be
a registered command, and no tool description or recall footer may send
Claude to a retired tool. - The deeper findings from the same audit are filed as #96–#107.
v1.2.2 — recall flags an old best match, Codex compaction no longer reads as drift
Recall now says when its best match is much older than the alternatives, a
Codex record no longer trips the doctor's format-drift warning, and CI stops
crashing on Python 3.13.
Added
- Recall flags an old best match instead of letting it read as current
(#82). Recency is worth at most 0.5 points in episode ranking against 10
per keyword hit, so an old episode can outrank fresh work on the same topic.
Re-weighting would break "what did I do last year", so nothing is reordered.
When a query carries no time phrase and the top episode is at least 30 days
old and at least 30 days older than the newest runner-up, recall says so
before the answer: "The best match is from 6 months ago, but newer related
work exists from 2 months ago. If you meant current work, add a time phrase
like "this week" or "this month"." It leads the narrative (MCPrecall,
longhand recall, the demo), appears in the UserPromptSubmit hook's
injected context, and is onRecallResult.age_gap_notefor programmatic
callers. Measured before shipping at 792 sessions: 6 of the 8recall_diff
queries had shifted since the August baseline, most toward newer sessions;
the note fires on 3 of the 8.
Fixed
longhand doctorreported "the transcript format has drifted" for a Codex
compactedrecord. Codex writes one when it compacts a thread's context
window. Itsreplacement_historyre-lists messages the rollout already
carries (26 of 27 on the live record), plus injected developer context and
an encrypted item. It is now skipped, liketoken_usage_recordand
world_state, and the drift row treats Codex skip types stored before their
skip existed as understood — the rule it already applied to Claude types.scripts/recall_diff.pyalways printed "0 queries changed". It counted
changed queries by re-parsing its own output, whose headers begin with a
newline, so the count matched nothing. It now counts directly and prints
the denominator ("6 of 8").
Internal
- CI's Python 3.13 leg crashed with
Illegal instructionon some runners.
chroma-hnswlib0.7.6 has no cp313/cp314 wheel, so pip builds it with
-march=native, and the pip cache restored that CPU-specific build onto
runners with a different CPU. Builds are now portable
(HNSWLIB_NO_NATIVE=1), and cached hnswlib wheels are evicted before
install. A local install builds hnswlib for the machine it runs on, so
this was a CI problem, not a user-facing one. - The retired fieldnotes notes moved to
docs/fieldnotes-archive/, and the
.fieldnotes/machinery is gone.
v1.2.1 — MCP timeline pagination restored, shared timeline ordered by time, session_id kept from auto-scope
Three MCP-path fixes. The longhand timeline CLI reads get_events directly
and was never affected by any of them.
Fixed
get_session_timelineignoredlimitandoffsetand always returned
exactly one event. The handler used0as its "no tail requested"
sentinel, but read it through_limit(), which floors at1— a floor
added inbad2f17(2026-06-09) to stop a negative value reaching SQLite as
the unboundedLIMIT -1. The sentinel clamped to1, so every call took
the tail branch,offset/limitwere never read, and the response carried
"tail": 1for a caller who never asked to tail. Passingtailexplicitly
always worked, which is why this survived: the existing tests asserted the
shape of the payload but never counted the events in it. Shipped in v1.0
through v1.2. A new_tail()coercion keeps0distinct from1;
_limit()is unchanged, its floor being correct for every real limit.- The shared server's
get_session_timelineinterleaved subagent threads.
Subagent (sidechain) transcripts are stored under the parent
session_id, each restarting its ownsequenceat 0, soORDER BY sequencemixed several independent threads together and read as though
rows from different sessions had leaked into one. It now orders by
timestamp with sequence as the tiebreak, hides the parser's#-suffixed
collision duplicates (matchingget_events'dedup_suffixes), and returns
is_sidechainso a reader can tell a subagent row from a parent one. searchlet a fuzzy project guess override an explicitsession_id.
Auto-scoping checked onlyproject_id/project_name, so a query whose
text resembled some project name layered that project on top of the
session filter and intersected to nothing — returning zero hits with a hint
blaming project scope. An explicitsession_idnow suppresses auto-scope
entirely; passproject_id/project_nameto combine them deliberately.
v1.2.0 — Codex finalizer: threads index themselves 30 minutes after going quiet
Added
- The Codex finalizer. Codex threads now get the full pipeline —
embeddings, episodes, project inference — on their own, 30 minutes after
the rollout goes quiet. It is the Codex twin of Claude Code's SessionEnd
hook: Codex sends no session-end signal, so quiet stands in for it. Until
now an active thread that had been indexed with--semanticregressed to
exact-record-only the moment it grew, and nothing ever indexed it again.
longhand codex-syncruns the finalizer after its exact-record pass
(--finalize-after SECONDSto tune the bound,--no-finalizeto opt out),
one thread per run so the every-minute poller stays bounded;reconcile --fixclears the whole quiet backlog. The embedding model loads only on a
run that has a quiet thread to finalize. A finalized thread that resumes is
captured exact-only again and finalized again once it settles — one
re-embed per resume, never a treadmill. longhand.codex.finalize_codex(), asettlingbucket and
min_idle_secondsonscan_codex_sessions()/sync_codex(), and
codex_unfinalized/codex_settling/codex_finalizedon the
reconcilereport and MCP tool.
Changed
doctor's "Codex sessions archived" row is now "Codex finalizer": green
while archived threads are still being written, yellow only when one has
been quiet past the bound and nothing has finalized it yet.
v1.1.0 — one archive for Claude Code and Codex
Longhand now keeps one archive for Claude Code and Codex. This is the
first release that captures a second client, and it holds that client to the
same rules as the first: exact records, stable IDs, nothing stored twice,
drift never silent.
Added
longhand codex-synccaptures Codex Desktop and Codex CLI threads (the
rollouts under~/.codex/sessions) into the same~/.longhandarchive the
Claude Code hooks write, under the same ingest lock, withcodex:-namespaced
session and tool IDs. Exact-record capture by default — every message,
reasoning summary, tool call, and output, verbatim and searchable, without
loading the embedding model;--semanticruns the full pipeline sorecall
and semanticsearchsee the sessions. Per run it imports up to 50 sessions
of up to 16 MiB and 20,000 events each; larger ones are reported as
deferred, never partially imported.--dry-runlists rollouts without
opening the archive;--watchpolls every 60 seconds.reconcile --fixcaptures Codex too. New or changed rollouts are picked
up alongside the Claude buckets, so an installed reconciler keeps both
clients current with no extra setup. The report and thereconcileMCP
tool gainedcodex_*fields.longhand shared-mcp— a four-tool, read-only MCP server
(list_sessionswithsourceandprojectfilters,search,
get_session_timeline,get_event_text) over the SQLite archive: no
Chroma, no model. Keyword matching, not semantic. It is the server Codex
talks to, and the way Claude searches Codex history by phrase.
python -m longhand.lightweight_mcpruns the same server.- Commits made from Codex show up in
find_commitsandgit-logon the
default capture path — including commands run inside Codex'sexec
scripts, whosecmd:literals are decoded for git and error detection. - A Codex shapes gate.
tests/fixtures/codex_shapes/holds every rollout
record shape seen in the wild (both Codex CLI generations), and
tests/test_codex_shapes.pyfails the moment one is undispositioned. Unknown
shapes are preserved asunknownevents with raw JSON intact, anddoctor's
"Transcript format" row names Codex drift by its nested kind
(event_msg/<kind>). doctorknows about Codex. A "Codex capture" row — only on machines
that have Codex — shows rollouts captured vs. changed since. Archived Codex
sessions are split out of "Sessions needing analysis" with the remedy that
actually works for them:codex-sync --semantic. (analyze --allwas the
old advice; it never embeds events, so it could not have made them
searchable — a Promise 5 defect caught before it shipped.)scripts/com.longhand.codex-sync.plist.template— a macOS LaunchAgent for
60-second capture, for anyone who wants faster than the reconciler.
Changed
- What Codex capture stores. Codex writes every message twice — a
canonicalresponse_itemand a UIevent_msgmirror — plus token
accounting and turn bookkeeping. Only the canonical items are stored; the
mirrors and bookkeeping are skipped (the same ruleKNOWN_SKIP_ENTRY_TYPES
applies to Claude transcripts), and reasoning without a readable summary is
skipped rather than stored as an empty row. On a real corpus this removed
six of every ten rows without losing a searchable character. - Subagent threads are skipped by default. Codex spawns threads for
itself (its "guardian" approval reviewer) that re-quote the parent
conversation, so capturing them returned every search hit twice.
--include-subagentscaptures them. - The
mcpdependency floor is now>=1.2.0, the first release with FastMCP.
Fixed
- Embedding no longer takes the CoreML path on macOS. Every Chroma
collection now shares oneONNXMiniLM_L6_V2pinned to the CPU execution
provider, instead of each collection loading its own default model. The
CoreML build is theFailed to create MLModel … .mlmodelcingest failure
thatdoctorhad been surfacing fromhook-errors-*.log. frame-linkis dispositioned. Claude Code's new entry for a published
page — the Artifact URL plus the local.htmlit came from — is preserved
as a triaged unknown (recallable, so a promotion candidate besidepr-link)
instead of tripping the drift row on everydoctorrun.
v1.0.1 — honest doctor diagnostics
Three doctor rows told you the wrong thing. Found by dogfooding 1.0.0 on a
live corpus within the hour, all the same defect Promise 5 exists to prevent:
a diagnostic recommending a remedy that cannot work for the case it reports.
Fixed
- The update check never worked on a python.org macOS install, and said
"offline?" instead of saying so.urllibverifies against OpenSSL's own
trust store rather than the system keychain, so pypi.org failed with
CERTIFICATE_VERIFY_FAILEDwhilecurlto the same URL succeeded — which
is exactly why it looked like a network problem and sat "unexplained" since
0.13. Longhand now verifies against certifi's CA bundle when it is
importable, so the check works; and when it still fails, the row names the
real class (TLS trust vs unreachable vs bad response) and gives the matching
remedy —Install Certificates.commandon macOS, orpip install -U certifi.
If you never saw an update notice on macOS, this is why. - The transcript-drift row told everyone to
pip install -U longhand,
including people already on the newest release, for whom it is a
guaranteed no-op — an unrecognized entry type is not handled by any
version yet. It now suggests upgrading only when one actually exists, and
otherwise asks you to report the type. Still cache-only; it never touches
the network. file-history-deltais now dispositioned. Claude Code added the type
upstream and the drift canary caught it on a live corpus (276 in 30 days)
the day 1.0.0 shipped — Promise 4 doing its job. It is checkpoint bookkeeping
with no content, and every edit it shadows is already stored as atool_call
event with the real diff, so it joins the skip set rather than becoming
unknown-event bloat.
v1.0.0 — the promise release
The promise release. 1.0 is a commitment, not a version bump: five
compatibility promises, each with a named enforcement artifact in the repo.
The full text is in COMPATIBILITY.md.
This release is deliberately boring. It removes what 0.13 spent a full minor
warning about, writes the promises down, and builds the tests that keep them
honest. It follows a 32-day bake on 0.13.0 — zero patch releases, zero
issues, zero defects surfaced.
Breaking
- Four deprecated CLI aliases removed, each having warned since 0.13.0:
patterns→recall "<topic>",recap→status --days N,
continue→status --session <prefix>,reanalyze→analyze --all. - The
reconcileMCP tool now defaults to a dry run. Through 0.13 an
omittedfixmeantfix=trueand carried an in-payload warning that this
would flip. It has flipped. Dry-run responses include
"hint": "pass fix=true to apply". If you have an agent loop that relied
on the implicit heal, passfix=trueexplicitly. - Six retired MCP tools left the tool listing (19 → 13). They have not
stopped working:search_in_context,get_latest_events,
get_project_timeline,get_session_commits,get_episode, and
match_projectstill answer forever with a migration preamble, because
those names live in users' ownCLAUDE.mdfiles and must never hard-fail.
Added
COMPATIBILITY.md— the five promises, their enforcement artifacts, and an
explicit list of what is not promised.CONTRIBUTING.md, plus a migration authoring policy in the
migrations.pyheader: automatic, one-time, never renumbered; no unbounded
work at store open; nothing destructive without opt-in; every new migration
ships a prior-schema fixture test.- A real 0.11-schema fixture database (
tests/fixtures/db/), generated by
executing the v0.11.2 tag's own code, proving Promise 2: a 0.11 database
opens, migrates, and keeps every row. - A surface-consistency check that derives counts from
pytest --collect-onlyandlist_tools()rather than hardcoding them, so
docs can no longer drift past the code they describe. - Zero own-deprecation warnings is now an enforced gate, not an aspiration.
Fixed
doctor's hook-error remedy was a no-op for most of what it reported.
It told every hook error to runreconcile --fix, butreconcile
enumerates from disk, so a transcript that never landed is invisible to it
forever. Across the 0.13 bake, 21 of 23 real hook errors were exactly that
class. The remedy is now split by class and says plainly when there is
nothing to heal.- README claimed
chromadb<1.0was pinned "on Python 3.14". The pin is
unconditional for every version. - The Stats block reported "1,033 episodes extracted (385 resolved)", which
reads as a 37% resolve rate. The honest figure excludes low-confidence
fixless extractions from the denominator: 423 of 501 (84%).
Platform
Python 3.10–3.14 are all gated in CI. Windows is CI-tested best-effort
(windows-latest × py3.12, non-blocking, green on every run since 0.13.0) —
honest evidence, not a support tier.