Skip to content

Releases

v1.3.2 — two outside-contributor fixes; releases publish to the MCP Registry

Choose a tag to compare

@Wynelson94 Wynelson94 released this 23 Nov 04:22
f873d0d

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 in analyze --all recreated 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)
  • doctor flagged 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, and doctor no longer counts them as drift. (#138, thanks
    @Minecraft269)

Internal

  • Releases now update the official MCP Registry too (#137). A new job in
    publish.yml runs after the PyPI upload, signs in with GitHub OIDC (no
    stored secret), and publishes server.json with a pinned mcp-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 by chromadb) has no 3.15 wheel and has never
    published a source distribution, so pip has nothing to install or build.
    A new weekly py315-watch.yml job 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 than onnxruntime.
  • The test suite no longer leaves background longhand ingest processes
    running (#140). An unmatched project query starts a detached ingest, and
    ten tests reach that path. On a developer's machine each child re-read all
    of ~/.claude/projects into 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.Popen itself or is marked real_spawn, and
    tests/test_spawn_guard.py fails 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 current ruff format; no behavior change.

New Contributors

Full Changelog: v1.3.1...v1.3.2

v1.3.1 — keep a session's last turn when the ingest lock is busy

Choose a tag to compare

@Wynelson94 Wynelson94 released this 04 Nov 23:00
5df8266

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-*.log or logs/session-retry-*.log. A retry that gives
    up leaves a lock-timeout breadcrumb; if one can't be started, the hook
    leaves retry-spawn-failed. doctor counts 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 and reconcile saw nothing to heal. The size is now taken before
    parsing.
  • Background workers could run the wrong Longhand. longhand ingest,
    spawned by recall, ran python -m longhand in the hook's working
    directory (the session's project), and Python imports a longhand/
    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.
  • reconcile counted 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 the reconcile MCP 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)

Choose a tag to compare

@Wynelson94 Wynelson94 released this 30 Oct 16:52
0ac62e0

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 through gh; --create makes it private first),
    measures the archive, prints what would be uploaded, and enables backups
    only after you type yes (plus private when the remote cannot be
    verified). --yes for scripts; without a terminal it refuses.
  • longhand backup exports every changed session as its verbatim
    transcript (one line per distinct stored line, 40 MB parts), with every
    longhand redact pattern 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 word verbatim).
  • longhand backup status, backup auto on|off (the scheduled
    reconcile --fix pushes at most hourly, only when something changed,
    masking always on, failures to logs/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, and config.json
    is restored only when the data dir has none.
  • backup.* keys in config.json (longhand config --set backup.auto=true)
    and a Backup row in longhand 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
    subprocess call 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

Choose a tag to compare

@Wynelson94 Wynelson94 released this 28 Sep 05:07
2407569

Six user-facing bugs, found by checking every claim in the docs against the
code. None changes stored data.

Fixed

  • get_session_timeline with tail returned 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.
  • setup suggested a command that no longer exists. Its closing hint was
    longhand recap --days 7, removed at 1.0. It now suggests longhand status --days 7, the documented successor.
  • setup said it installed the MCP server "for Claude Code".
    longhand mcp install writes 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 one doctor recommends.
  • Recall and a tool description pointed Claude at a retired tool. Recall's
    three narrative footers and get_session_timeline's description said to
    use search_in_context, retired at 1.0. They now name search with
    session_id and context_events.
  • The reconcile tool's schema said fix defaults to true. The handler
    has defaulted to a dry run since 1.0. The schema now agrees, so an agent
    that omits fix knows it gets a report, not a repair.
  • --skip-analysis claimed to populate "SQLite only". Events are always
    stored and embedded; the flag skips the analysis pass (episodes, segments,
    and session/project vectors). The setup and ingest help now says so.

Internal

  • Three new checks guard the text the program shows at runtime, the way the
    README checks guard the docs: every longhand <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

Choose a tag to compare

@Wynelson94 Wynelson94 released this 28 Sep 03:49
5bbf04c

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 (MCP recall,
    longhand recall, the demo), appears in the UserPromptSubmit hook's
    injected context, and is on RecallResult.age_gap_note for programmatic
    callers. Measured before shipping at 792 sessions: 6 of the 8 recall_diff
    queries had shifted since the August baseline, most toward newer sessions;
    the note fires on 3 of the 8.

Fixed

  • longhand doctor reported "the transcript format has drifted" for a Codex
    compacted record.
    Codex writes one when it compacts a thread's context
    window. Its replacement_history re-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, like token_usage_record and
    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.py always 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 instruction on some runners.
    chroma-hnswlib 0.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

Choose a tag to compare

@Wynelson94 Wynelson94 released this 28 Sep 03:49

Three MCP-path fixes. The longhand timeline CLI reads get_events directly
and was never affected by any of them.

Fixed

  • get_session_timeline ignored limit and offset and always returned
    exactly one event.
    The handler used 0 as its "no tail requested"
    sentinel, but read it through _limit(), which floors at 1 — a floor
    added in bad2f17 (2026-06-09) to stop a negative value reaching SQLite as
    the unbounded LIMIT -1. The sentinel clamped to 1, so every call took
    the tail branch, offset/limit were never read, and the response carried
    "tail": 1 for a caller who never asked to tail. Passing tail explicitly
    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 keeps 0 distinct from 1;
    _limit() is unchanged, its floor being correct for every real limit.
  • The shared server's get_session_timeline interleaved subagent threads.
    Subagent (sidechain) transcripts are stored under the parent
    session_id, each restarting its own sequence at 0, so ORDER BY sequence mixed 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 (matching get_events' dedup_suffixes), and returns
    is_sidechain so a reader can tell a subagent row from a parent one.
  • search let a fuzzy project guess override an explicit session_id.
    Auto-scoping checked only project_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 explicit session_id now suppresses auto-scope
    entirely; pass project_id/project_name to combine them deliberately.

v1.2.0 — Codex finalizer: threads index themselves 30 minutes after going quiet

Choose a tag to compare

@Wynelson94 Wynelson94 released this 28 Sep 03:49
884082b

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 --semantic regressed to
    exact-record-only the moment it grew, and nothing ever indexed it again.
    longhand codex-sync runs the finalizer after its exact-record pass
    (--finalize-after SECONDS to tune the bound, --no-finalize to opt out),
    one thread per run so the every-minute poller stays bounded; reconcile --fix clears 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(), a settling bucket and
    min_idle_seconds on scan_codex_sessions() / sync_codex(), and
    codex_unfinalized / codex_settling / codex_finalized on the
    reconcile report 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

Choose a tag to compare

@Wynelson94 Wynelson94 released this 28 Sep 03:49
34e745d

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-sync captures Codex Desktop and Codex CLI threads (the
    rollouts under ~/.codex/sessions) into the same ~/.longhand archive the
    Claude Code hooks write, under the same ingest lock, with codex:-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; --semantic runs the full pipeline so recall
    and semantic search see 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-run lists rollouts without
    opening the archive; --watch polls every 60 seconds.
  • reconcile --fix captures 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 the reconcile MCP
    tool gained codex_* fields.
  • longhand shared-mcp — a four-tool, read-only MCP server
    (list_sessions with source and project filters, 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_mcp runs the same server.
  • Commits made from Codex show up in find_commits and git-log on the
    default capture path — including commands run inside Codex's exec
    scripts, whose cmd: 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.py fails the moment one is undispositioned. Unknown
    shapes are preserved as unknown events with raw JSON intact, and doctor's
    "Transcript format" row names Codex drift by its nested kind
    (event_msg/<kind>).
  • doctor knows 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 --all was 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
    canonical response_item and a UI event_msg mirror — plus token
    accounting and turn bookkeeping. Only the canonical items are stored; the
    mirrors and bookkeeping are skipped (the same rule KNOWN_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-subagents captures them.
  • The mcp dependency 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 one ONNXMiniLM_L6_V2 pinned to the CPU execution
    provider, instead of each collection loading its own default model. The
    CoreML build is the Failed to create MLModel … .mlmodelc ingest failure
    that doctor had been surfacing from hook-errors-*.log.
  • frame-link is dispositioned. Claude Code's new entry for a published
    page — the Artifact URL plus the local .html it came from — is preserved
    as a triaged unknown (recallable, so a promotion candidate beside pr-link)
    instead of tripping the drift row on every doctor run.

v1.0.1 — honest doctor diagnostics

Choose a tag to compare

@Wynelson94 Wynelson94 released this 28 Sep 03:49
828102b

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.
    urllib verifies against OpenSSL's own
    trust store rather than the system keychain, so pypi.org failed with
    CERTIFICATE_VERIFY_FAILED while curl to 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.command on macOS, or pip 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-delta is 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 a tool_call
    event with the real diff, so it joins the skip set rather than becoming
    unknown-event bloat.

v1.0.0 — the promise release

Choose a tag to compare

@Wynelson94 Wynelson94 released this 28 Sep 03:49
a6370f4

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 reconcile MCP tool now defaults to a dry run. Through 0.13 an
    omitted fix meant fix=true and 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, pass fix=true explicitly.
  • 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_project still answer forever with a migration preamble, because
    those names live in users' own CLAUDE.md files 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.py header: 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-only and list_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 run reconcile --fix, but reconcile
    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.0 was 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.

⌂ 换网址