Skip to content

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Rust

Merge main into PR #1141

AkitaOnRailsceef3c037e8d
diff --cc CHANGELOG.md
index 8eda15dc,cb07897e..777c59c3
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -8,13 -8,59 +8,66 @@@ and this project adheres to [Semantic V
## [Unreleased]
### Fixed
+- Hidden expired pages from `page_links` and `related_walk`, the graph
+ neighbour surfaces used by the web link panel and
+ `memory_read_page include_related`. Search, recent, briefing, and
+ `graph_neighbors_for_project` already applied the retrieval TTL
+ (`expires_at` is null or still in the future); these two queries only
+ filtered `is_latest`. An expired neighbour is neither returned nor
+ walked through. Exact-path reads of an expired page are unchanged. (#1141)
+ - Fixed the scheduled auto-improve tests' intermittent empty log captures
+ (the same latent flaw #1116 fixed for the hooks checkpoint test): a shared
+ `warn!` callsite's first-in-process execution on a bare thread caches
+ `Interest::never()`, after which no per-test `set_default` capture ever
+ sees the event under single-process harnesses (libtest, Windows CI). The
+ tick outcome now carries the typed `failure_summaries` and
+ `skipped_proposals` the warnings mirror, and the tests assert those
+ instead of a captured log stream. Logged messages and levels are
+ unchanged. (#1118)
+ - Fixed hook observation bodies being capped *before* the sanitizer ever saw
+ them: excerpt extraction (`tool: …` bodies, user prompts, notifications,
+ post-compaction summaries, extension bodies) applied its 2 KB / 16 KB
+ ceilings at parse time, so a secret straddling the cutoff was cut in half
+ and the surviving prefix, too short to match a pattern, was stored
+ unredacted — the body-side twin of the #980 title-hint leak. The per-event
+ caps (`payload::durable_body_cap`) now run at the ingest funnel, applied to
+ the already-scrubbed text, mirroring `Sanitized::new` and the #1109
+ feedback-reason fix. The stored body shapes and byte limits are unchanged.
+ (#1114)
+ - Fixed the native hook's client-side spool cap truncating oversized
+ lifecycle bodies (user prompts, notifications, post-compaction summaries)
+ before any scrubbing: the capped field is now scrubbed with the built-in
+ sanitizer first and truncated second — the order `assistant_capture` and
+ the #980 / #1109 fixes established — so a straddling secret can no longer
+ reach the spool (and through it the server) as an unredacted fragment.
+ (#1114)
+ - Fixed the managed-workstream ledger capping event content *before* the
+ sanitizer ever saw it: the 64 KiB per-event cap in
+ `hooks::workstream::sanitize_events` truncated first, so a secret
+ straddling the cutoff was cut into a prefix too short to match any
+ pattern and persisted unredacted in the immutable raw segment — the same
+ ordering bug as the #980 title-hint and #1109 feedback-reason leaks. The
+ cap now runs after scrubbing, the server-generated checkpoint and losses
+ boundary events get the same ordering, and the store's `finish_run`
+ scrubs with the caller's sanitizer before its own 16 KiB bound as
+ defense in depth. The stored shapes and byte limits are unchanged.
+ (#1113)
+ - Fixed SessionEnd replacing the session page an agent wrote itself through
+ `memory_write_page` with `session_id`: the rule-based summary overwrote it
+ on every substantive session end, and the opt-in SessionEnd worker's skip
+ never applied, since it read the page after that overwrite and compared an
+ observation count that the agent's own tool call, the Stop and the
+ SessionEnd always advance. A session page carrying `consolidated_by: agent`
+ is now kept by both, and by the PreCompact and PostCompaction checkpoints,
+ which rewrote it the same way. The write no longer stamps
+ `observation_generation`. (#1138)
+ - Fixed `ai-memory run claude` resuming the launch session forever after a
+ `/clear`: Claude Code continues a cleared conversation in a new session,
+ and the workstream now follows it — the newest one after several clears —
+ so the next launch resumes where the work actually went and that
+ transcript, not the abandoned one, is imported. Only a transcript that
+ records the `/clear` command, names this launch's session as its origin,
+ and stays in this checkout (or a directory below it) is followed. (#1135)
- Fixed the hook spool charging a spooled event's retry budget while the
server was unreachable: an endpoint-level delivery failure (connection
refused, timeout, DNS — the existing `Unreachable` classification) no