Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
Merge PR #722: drop Cursor's duplicate event from Claude Code hooks (#721)
AkitaOnRailsdafbcb695ac9
diff --cc CHANGELOG.mdindex dbf4aa68,de63bfab..118d90c8--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -7,37 -7,15 +7,46 @@@ and this project adheres to [Semantic V## [Unreleased]++<<<<<<< HEAD+### Security+- Updated `rustls` 0.23.40 → 0.23.45 for [RUSTSEC-2026-0285](https://rustsec.org/advisories/RUSTSEC-2026-0285),+ in which a TLS 1.3 handshake message that follows a key-changing message in+ the same record can be accepted at the wrong encryption level. `rustls` is a+ direct dependency — it installs the process-wide crypto provider the MCP+ bridge needs for HTTPS — and is also the TLS implementation every outbound+ HTTPS call resolves to through reqwest, so the advisory failed `cargo audit`+ and `cargo deny check` on every open pull request that inherited `main`'s+ lockfile, including ones that change no Rust at all. `Cargo.toml` already+ allows compatible 0.23 patch releases, so this is a lockfile-only change+ needing no manifest or public-surface edit; the same resolution moves+ `rustls-webpki` 0.103.13 → 0.103.15 and nothing else (#731).+### Fixed+- The native `ai-memory hook` session-id state file+ (`<data_dir>/hook-state/<agent>-session-id`), introduced for Devin in #178,+ now also covers ZCode. ZCode's hook payloads do not reliably carry a session+ id, it fires `Stop` at the end of every turn, and it has no `SessionEnd`+ event — without a persisted id, each turn with an id-less payload opened a+ fresh server-side session that nothing ever closed (observed in production:+ 4 sessions with NULL `ended_at` and 398 observations stuck in episodic).+ ZCode events without a native id now share one stable stored id per agent+ session; events carrying a native id are passed through untouched. The stored+ id is cleared by `finalize-session --agent zcode` (which now also removes the+ state file) or overwritten by the next `session-start`; `Stop` never clears+ it. Other agents are unaffected: payloads that carry a session id short-circuit+ the state file exactly as before.+- `memory_feedback`'s `signal` (FeedbackKind) JSON schema now declares a+ top-level `type: "string"`, so strict function-calling gateways (Moonshot/Kimi+ and other schema validators) accept the `tools/list` surface instead of+ rejecting the enum for a missing type (#735, #741).+ - Cursor lifecycle events are no longer stored twice on a host where both+ `install-hooks --agent cursor` and `install-hooks --agent claude-code` are+ applied. Cursor also runs the commands in Claude Code's settings, and since+ 2.1.0 that copy is re-attributed to `cursor` by its `cursor_version`, so it+ landed in the same session as the native event. The `--agent claude-code`+ hook now drops a Cursor-marked payload when `~/.cursor/hooks.json` already+ registers an ai-memory `--agent cursor` hook; without Cursor's own hooks the+ Claude Code path keeps capturing Cursor sessions as before (#721).## [2.2.1] - 2026-09-12