Skip to content

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

Rust

Merge branch 'main' into release/2.5

AkitaOnRailse84ddcff9811
diff --cc CHANGELOG.md
index f6c4dd80,00f83a7e..c1eea475
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -7,55 -7,24 +7,72 @@@ and this project adheres to [Semantic V
## [Unreleased]
+### Added
+- `auto_improve.patchable_page_prefixes` makes the folders whose page bodies the
+ reviewer reads configurable, defaulting to the historical `_rules/` and
+ `procedures/`. Only those two folders' contents were ever sent; every other
+ page reached the model as a single title line, so a project keeping its
+ durable knowledge in `decisions/` or `gotchas/` — with no `_rules/` pages at
+ all — sent no page bodies, and the reviewer re-proposed invariants that were
+ already written down, at high confidence, indefinitely. Existing configs are
+ unchanged. (#834)
+- `ai-memory finalize-session --reopen --session-id <uuid>` re-finalizes a
+ session that already ended, for agents without a true session-end event
+ (Antigravity CLI, Kiro, ZCode, Pool) whose conversation continued after a
+ first manual finalize: the discovery step now accepts `include_ended=true`
+ on `GET /admin/open-sessions` for an exact session id (rejected without
+ one, so reopening stays exact-id-only and never a bulk operation), and the
+ server's normal session-end path re-runs over the new observations
+ (updated summary page via supersession, new handoff, opt-in
+ consolidation). Re-running with nothing new since the first end remains a
+ harmless no-op. The default finalize behavior is unchanged: ended sessions
+ stay invisible unless `--reopen` is passed. (#836)
+- Added per-execution `AI_MEMORY_CAPTURE_OWNER` context for external lifecycle
+ producers. Updated native hooks, script bundles and generated integrations
+ suppress capture while preserving supported handoff delivery and MCP recall.
+ Documented producer provenance and stable retries through the existing hook
+ ingestion API, without changing its schema or standalone defaults. (#821)
+- Builtin `/web` login and change-password pages for human password sessions:
+ unauthenticated browser GETs to the wiki redirect to `{web_slug}/login`
+ (not bare JSON 401), forms call existing `POST /auth/login` /
+ `/auth/password` / `/auth/logout`, and `--web-ui-dir` custom SPAs stay
+ unchanged. (#811)
+
+### Changed
+- Grok Build CLI shows a pending handoff, and an opted-in `[briefing]`, as
+ `PostToolUse` `additionalContext` on the first tool of a session.
+ `SessionStart` and `UserPromptSubmit` still do not accept the handoff (Grok
+ discards that stdout); a session that never calls a tool leaves the handoff
+ open for `memory_handoff_accept`. The note is clipped to 10,000 characters
+ (Grok's own cap). Because Grok reuses one session id across a
+ SessionEnd→restart, `memory_handoff_accept` now reopens an already-ended
+ receiver session (clears `ended_at`) instead of rejecting it — but only for
+ agents that reuse their session id across a restart (Grok); for every other
+ agent an ended session stays final, so a lifecycle-only receiver still cannot
+ reclaim after it released and ended. The reopen also only happens after the
+ exactly-once claim guard, so a session that already took a baton still cannot
+ take another (the multi-session claim-once invariant is preserved).
+ Delivery of this PostToolUse handoff is exempt from `AI_MEMORY_CAPTURE_OWNER`
+ capture suppression, like the other context-delivery events. (#840)
+
### Fixed
+ - Auto-improve review no longer stages a proposal whose LLM-produced page
+ path contains a Windows-illegal character (e.g. a `:` copied from a
+ conventional-commit subject). That path passed the deliberately tolerant
+ `PagePath::new` and only failed later at `ensure_portable` when the
+ proposal was approved, so the learning loop queued work that could not
+ be applied. Paths are now sanitized the same way bootstrap (#847) and
+ per-session consolidation (#848) already sanitize theirs, before
+ validation; a path that is still unportable after sanitizing is rejected
+ instead of staged. (#850)
+ - Omitted `temperature` for `gpt-6-*` models in the `codex`,
+ `openai-oauth`, `copilot` and `openai` providers. Codex answered GPT-6
+ requests that carried `temperature` with `400 Unsupported parameter:
+ temperature`, which broke consolidation, lint and bootstrap on a
+ provider or fallback configured with `gpt-6-luna`, `gpt-6-sol` or
+ `gpt-6-astra`. The `openai` provider now also sends
+ `max_completion_tokens` for GPT-6 and no longer applies its local
+ 16,384-token cap to it, matching `gpt-5*`. (#851)
- `memory_message_pop` and `memory_message_list` no longer return a silent
empty result when the inbox scope was *inferred* rather than named. A caller
with no explicit `workspace`/`project` and no forwarded hook-session id