Skip to content

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

Rust

Merge PR #1086: fix(backfill): a non-root key can backfill on a multi-user server

AkitaOnRails02930b3440c3
diff --cc CHANGELOG.md
index d4f762a7,625b3a6b..77eb9a91
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -105,99 -77,6 +105,103 @@@ and this project adheres to [Semantic V
ai-jail's own dry-run preflight, so a backend that exists but fails ai-jail's
trust checks is treated as unavailable instead of producing a broken offer.
(#1024)
+- Fixed `continue`, `resume` and bare `ai-memory run` losing sessions launched
+ under a custom native store, such as a second Claude Code config home set
+ with `CLAUDE_CONFIG_DIR`. Automatic harness selection now scans the store the
+ launch resolves (`--env`, then the process environment) instead of always the
+ default one. The client records the store of every session it links, at
+ launch or when the run finishes, in `client-projects.json`. A later launch
+ that cannot find that session and resolves a different store now stops with
+ an error naming both stores and keeps the workstream link, where it used to
+ start fresh and repoint the workstream. `--fresh` still starts a new session.
+ (#1047)
+- Fixed Claude Code sessions never seeing the "broaden when the current project
+ comes up empty" and "maintained pages are evidence, not authority" rules,
+ because Claude Code truncates MCP server instructions at 2,048 characters.
+ The instructions now open with a self-contained core under that cap, and a
+ regression test keeps it there. (#1035)
+- Fixed the macOS menu-bar app showing only a red status item when the bundled
+ server cannot start (for example a port already in use; #1044 reports OpenCode
+ v2's background service on `127.0.0.1:49374`). The menu extra now surfaces a
+ fatal `stderr.log` line written since the last start, and `docs/macos.md`
+ documents the port collision and how to move one side. (#1044)
+- Fixed hook-spool drains stalling behind an event that has no session id.
+ `/hook/batch` reported such an event (anything but a session start) as a
+ failed item, so the drain retried it up to its attempt budget while every
+ event queued behind it waited. The server now acknowledges and drops it,
+ counted as `dropped_invalid` in the ingest metrics, and keeps processing the
+ rest of the batch. (#1062)
+- Fixed `drop_subagent_captures` discarding entire top-level Claude Code
+ sessions launched with `--agent`. An `agent_type` alone no longer marks a
+ session as a subagent; `agent_id` and Grok's `subagentType` still do, so
+ actual subagent filtering remains enabled. Claude Code reports a Task
+ subagent under its parent's session id, so a subagent's events no longer
+ mark that session as a subagent: the parent's Stop, SessionEnd, summary and
+ handoff are kept. (#1041, #1048)
+- Corrected the `[auto_scope]` default in doc comments (`Config`,
+ `AutoScopeSettings`, the `ActiveProjectMode` module docs, `serve`) and the
+ README docs index: they still named `single` as the default or called
+ `per_actor` opt-in, but the default has been `per_actor` since v1.39. (#1065)
+- Fixed `gemini-3.8-flash` consolidation and lint spending hidden thinking
+ tokens on strict-JSON calls. The Gemini provider now sends
+ `thinkingBudget = 0` to 3.8 Flash as it already did for 2.5 and 3.5 Flash
+ (verified live: 0 thought tokens, about half the latency); 3.8 Flash-Lite
+ keeps the field omitted until verified. (#1077)
+- Fixed the secret scrubber missing Gemini authorization keys. AI Studio has
+ issued `AQ.Ab…` keys instead of `AIza…` since 2026-05-28, so a bare new key
+ reached capture unredacted; it is now redacted as `google_api_key`. (#1077)
+- Fixed the OpenCode provider sending every Go/Zen model through Chat
+ Completions. It now selects the published wire API per supported model:
+ Responses, Anthropic Messages, or OpenAI-compatible Chat Completions.
+ Claude Sonnet 5.5 and the legacy Sonnet 4 ID also use Messages.
+ Its default model is now `mimo-v2.6-flash`, matching the default Go catalogue;
+ Claude models require an explicit Zen base URL. Configured base URLs remain
+ authoritative, with no automatic switching between Go and Zen billing.
+ MiniMax M3/M2.7 and Qwen3.8 Max use Messages on Go and Chat Completions on
+ Zen; Go's Muse Contributor IDs use Responses. Changing the base URL also
+ reselects the transport while preserving configured headers, reasoning,
+ and timeout.
+ (#1080)
+- Fixed `[[_global:path]]` resolving against the source page's workspace
+ instead of the reserved `_global` project in the default workspace. A
+ page outside `default` can now graph-link to standing global pages, and
+ `/web` points at the same home. Sibling `[[project:path]]` and explicit
+ `[[workspace/project:path]]` are unchanged. Legacy rows that stored the
+ project-only form with a NULL workspace resolve when the reserved page
+ is next written. (#1042)
+- Fixed `ai-memory run claude` / `continue` exiting with Claude's "That session
+ is running in the background" error when the linked session is a Claude Code
+ background session that is still running and the launch carries any native
+ flag. The launcher now confirms the session is live in this checkout with
+ `claude agents --json` (only for a transcript recorded in the background) and
+ opens it with `claude attach <id>`; any failure keeps the native resume.
+ Documented the observed attach-hook behavior, early-exit import boundary and
+ fallback validation limits.
+ (#1052)
+- Fixed the provider-health wrapper dropping the caller's operation id: its
+ `complete_with_operation_id` and `complete_structured_raw_with_operation_id`
+ fell to the trait defaults, so every retry of one logical operation got a
+ fresh id and, for OpenCode, a new session header on every call. The wrapper
+ now forwards both. (#1085)
++- `backfill` works with a non-root key on a multi-user server. Its emptiness
++ check used the root-only `/admin/sessions/by-agent` route, so every
++ developer's own key got 403; on a 403 it now asks the grant-checked
++ `GET /api/v1/workspaces/{ws}/projects/{p}/sessions` instead. (#1086)
+
+### Security
+- Fixed GHSA-7qj3-7wqw-m5w6: in multi-user mode a database user without a
+ write grant on the reserved global preferences scope (`default/_global`)
+ could write it, and its pages are unioned into every user's queries,
+ including restricted projects. Writing it now needs root or an explicit
+ `write` grant on `_global`, whichever way the scope is named; creating it
+ grants nothing, reads stay open, and installs without database users are
+ unchanged. Reported by @Josehbr.
+
+### Docs
+- Corrected the Codex support matrix to describe managed-run recovery from a
+ stale shared-daemon run id; `--no-daemon` remains an optional diagnostic and
+ isolation switch. (#987)
+
## [2.5.2] - 2026-10-01
### Added