Skip to content

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

Rust

Merge remote-tracking branch 'refs/remotes/audit-open/1549'

AkitaOnRailsf9a6ccd66413
diff --cc CHANGELOG.md
index 02b165c5,8e6540eb..6f527bf0
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -285,118 -223,15 +285,127 @@@ version in [`docs/changelog/`](docs/cha
relay and wiki sync companions take the same `rustls-webpki` bump.
### Fixed
+- An empty structured answer from a Responses-API model is now reported as
+ empty content rather than a JSON parse error. The `opencode`, `openai-oauth`
+ and `codex` paths defaulted a missing `output_text` to an empty string and
+ handed it to the parser, so the operator saw `serde: EOF while parsing a
+ value at line 1 column 0`, naming neither the model nor the cause.
+ ([#1529](https://github.com/akitaonrails/ai-memory/pull/1529))
+- Detected `core.hooksPath` when a git config set it on the same physical
+ line as the `[core]` section header, so `ai-memory-wikisync install-hook`
+ no longer writes a `.git/hooks/post-merge` that git would never run.
+ ([#1530](https://github.com/akitaonrails/ai-memory/pull/1530))
+- Counted a file's final line in `ai-memory-wikisync` diff summaries when it
+ does not end in a newline, so the `bytes/lines` figures no longer contradict
+ the `first difference at line N` printed beside them.
+ ([#1531](https://github.com/akitaonrails/ai-memory/pull/1531))
+- `ai-memory run` now refuses an `--env`/`--env-file` entry whose key carries
+ whitespace. `--env-file` lines are trimmed as a whole, not per half, so the
+ common dotenv spelling `KEY = value` produced a key with a trailing space —
+ an entry no shell or harness can read, so the override silently did nothing.
+ ([#1532](https://github.com/akitaonrails/ai-memory/pull/1532))
+- Discovered a repository page whose `--include` family names a bare top-level
+ page (`README.md`), which `ai-memory-wikisync sync` previously left out of the
+ repository side entirely, so a newly created one was never imported.
+ ([#1533](https://github.com/akitaonrails/ai-memory/pull/1533))
+- A Copilot `/responses` answer stopped by `max_output_tokens` is now reported
+ as a truncated response naming the model and its output-token count, instead
+ of an unexpected response shape reading "no error detail" — `error` is null
+ on an incomplete answer, so nothing explained the stop and the class implied
+ an unparseable reply rather than a `max_tokens` to raise.
+ ([#1534](https://github.com/akitaonrails/ai-memory/pull/1534))
+- Omitted TTL-expired pages from the page count in `memory_briefing` and
+ `memory_explore`. Every page list in a briefing already hid them, and the
+ project cards have since 3.1.x, so a project with an expired page reported
+ more latest pages than any list in the same response could show. The
+ all-versions total is unchanged, as is `ai-memory status`.
+ ([#1535](https://github.com/akitaonrails/ai-memory/pull/1535))
+
+
+- `memory_read_page` now reads a blank `path` or `query` as omitted, as its
+ sibling arguments already do. An empty or whitespace-only `query` searched
+ for an empty FTS expression and reported the inevitable miss as an internal
+ error (-32603), which a looping client reads as "retry"; an empty `path`
+ failed as "invalid path: empty path" and never tried the `query` passed
+ beside it. Both now reach the instructive "exactly one of `path` or `query`"
+ refusal, and a blank `path` beside a real `query` runs the search.
+ ([#1536](https://github.com/akitaonrails/ai-memory/pull/1536))
+- Reported a wiki page renamed away with an external tool, which arrives as a
+ rename event rather than a removal, so the next auto-commit drops it from the
+ tree instead of leaving a checkpoint naming a page that no longer exists.
+ ([#1537](https://github.com/akitaonrails/ai-memory/pull/1537))
+- Omitted TTL-expired pages from the 7- and 30-day activity counters in
+ `memory_briefing`. A page written with a short TTL made a project look
+ active while the brief's own recent-page list was empty, which is the
+ signal an agent uses to decide how much context to pull. Session and
+ observation counters have no TTL and are unchanged.
+ ([#1539](https://github.com/akitaonrails/ai-memory/pull/1539))
+
+- Kept a literal `<mark>` tag from a page's own text out of a search snippet's
+ markup, so it no longer renders as an unbalanced opening tag that highlights
+ the rest of the excerpt as if it were a query match.
+ ([#1540](https://github.com/akitaonrails/ai-memory/pull/1540))
+- `install.ps1` now refuses a plain-http GitHub release base. The scheme check
+ sat inside a condition whose arms already implied https, so it could never
+ fire, and an `http://github.com/...` base matched neither arm and skipped it
+ entirely — while the archive and its checksum are fetched from that same
+ origin, so the checksum proved nothing against an on-path rewrite.
+ ([#1541](https://github.com/akitaonrails/ai-memory/pull/1541))
+- An unspaced-CJK search carrying `AND`, `NOT` or `NEAR` no longer returns the
+ pages the operator excluded. The auxiliary CJK stream discarded every boolean
+ operator and `OR`-joined the CJK runs it found, and because that stream is
+ unioned into the primary one, `東京 NOT 大阪` fused the 大阪-only pages back in
+ and ranked them as if they had been asked for. The stream now declines such a
+ query, so unspaced-CJK recall narrows to the pre-feature answer for it instead
+ of inverting; `OR` queries are unaffected.
+ ([#1542](https://github.com/akitaonrails/ai-memory/pull/1542))
+- An `openai-oauth` answer the Codex backend stopped at its output-token
+ budget is now a terminal truncation instead of a retryable `502`. The
+ streaming parser read `response.incomplete` as a provider fault, so the
+ fallback chain advanced to the next candidate and opened a circuit, and the
+ SessionEnd consolidation job kept re-sending the same prompt on its backoff
+ schedule, each attempt truncating again at the same budget.
+ ([#1543](https://github.com/akitaonrails/ai-memory/pull/1543))
+
+- `memory_read_page` now answers a missing read target with `invalid params`
+ (-32602) instead of an internal error (-32603). A page absent under the
+ resolved scope, and a query that matched nothing, are caller-fixable: the
+ store answered, there is simply nothing there, and a client reads -32603 as
+ "retry". `memory_status` and `memory_read_session_observations` already
+ answer -32602 for an unknown project or session. The messages and the
+ auto-resolved-scope hint are unchanged, and a genuine disk or store failure
+ on the same path still answers -32603.
+ ([#1544](https://github.com/akitaonrails/ai-memory/pull/1544))
+- An OpenCode subagent session's end no longer hands the next session a
+ sub-task baton. The generated plugin forwarded the session's `parentID` as
+ the `agent_id` subagent marker on `session.created` but not on
+ `session.deleted`, so the `session-end` request carried no marker, the
+ router did not recognize a child session, and it published a summary page
+ and an open handoff that the next root session in that checkout consumed.
+ ([#1546](https://github.com/akitaonrails/ai-memory/pull/1546))
+- `install-mcp --client opencode --flavor <dialect>` now writes the flavored
+ URL into the OpenCode entry. Both OpenCode entry builders read the server
+ URL directly instead of the flavored one, so the flag was silently dropped
+ for a client its own documentation names: a Vertex-routed install got a bare
+ URL and 400'd every `tools/list`. OpenCode installs that do not pass
+ `--flavor` are unchanged.
+ ([#1547](https://github.com/akitaonrails/ai-memory/pull/1547))
+
+- A `title:` or `body:` filter on an unspaced-CJK search now narrows the
+ auxiliary CJK stream too. The stream read `:` as a plain run separator and
+ dropped the qualifier, so its MATCH searched every indexed column including
+ the path, and because that stream is unioned into the primary one,
+ `title:支付服务` returned pages holding the term only in their body or path.
+ ([#1548](https://github.com/akitaonrails/ai-memory/pull/1548))
+ - An Anthropic structured answer the model stopped at `max_tokens` is now a
+ terminal truncation instead of a successful result. The provider did not read
+ `stop_reason`, so a `tool_use` block holding only the JSON produced before the
+ budget ran out was returned as a complete answer: a consolidation or bootstrap
+ chunk could write a fraction of its pages and report success. On models that
+ reject a forced `tool_choice` the same stop reported "no tool_use block"
+ instead. Non-structured completions are unchanged — prose cut at the budget is
+ still returned.
+ ([#1549](https://github.com/akitaonrails/ai-memory/pull/1549))
- Memory health no longer counts a link from a superseded or TTL-expired page
version as a reference. A page whose only inbound link was removed by a later
edit was reported as linked, because the old version's `links` row survives