Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
Merge remote-tracking branch 'origin/main' into int27
AkitaOnRailsf796f183a105
diff --cc CHANGELOG.mdindex 7942303b,d9b44a63..4b7f7d21--- a/CHANGELOG.md+++ b/CHANGELOG.md@@@ -7,55 -7,35 +7,83 @@@ and this project adheres to [Semantic V## [Unreleased]+### Added+- `ai-memory run` accepts `copilot` (alias `copilot-cli`) and manages GitHub+ Copilot CLI as a workstream harness: a fresh session gets a generated+ `--session-id`, a returning one is resumed with `--resume=<id>`, user+ selectors (`--resume`, `--continue`, `--session-id`, `--connect`) win,+ utility subcommands pass through, and `--yolo` maps to Copilot's native+ `--yolo`. Visible messages, tool calls and results, and compaction summaries+ are imported read-only from `$COPILOT_HOME/session-state/<uuid>/events.jsonl`+ (system prompts, hidden reasoning, hook output, and telemetry are excluded),+ and the existing SessionStart hook delivers the workstream context. The+ first managed launch auto-wires Copilot's hooks and MCP, and `doctor` now+ counts its local sessions. Verified against Copilot CLI 1.0.92. (#1040)+- GitHub Copilot CLI is now a first-class routing target:+ `install-skills --agent copilot-cli` (and `install-instructions+ --skills-agent copilot-cli`) writes the managed Agent Skills to the+ repository's `.github/skills` or, globally, to `$COPILOT_HOME/skills`+ (default `~/.copilot/skills`); `memory_install_self_routing` returns+ `copilot_cli` filename and skill-root hints; the routing snippet, the+ routing-install skill, and the MCP instructions name Copilot CLI with+ `AGENTS.md`; and `uninstall` sweeps both Copilot roots, removing only+ marker-bearing ai-memory skills. (#1040)+- Added `ai-memory recover` and a bounded local recovery journal for server+ outages. Offline managed launches now record only uniquely correlated native+ session locators; recovery quarantines overlapping spool entries before exact+ `/hook/batch` transcript replay, journals harnesses without transcript export+ as spool-only without calling their exporter, retains bounded recovery dedup+ keys with their sessions,+ fails closed on terminal drops, and lets only the original owner finish an+ expired unsuperseded managed run through exact idempotent replay. Backfill+ and recovery replay now use reserved `recovery_*` idempotency keys, so+ re-running `backfill --force` over sessions imported by ai-memory ≤2.6.0 (or+ plain-backfilling a recovery-replayed session) can duplicate those older+ observations. (#1125)+- Added `AI_MEMORY_LLM_COMPAT_DISABLE_THINKING` for the `openai-compat`+ provider (opt-in, off by default, ignored by every other provider): when+ set, every chat request carries+ `chat_template_kwargs: {"enable_thinking": false}`, so thinking-capable+ local engines (vLLM / SGLang serving Qwen3-class models) spend the output+ budget on the structured payload instead of a reasoning pass. (#1130)+- Added the `cursor` LLM provider. Consolidation calls the logged-in Cursor+ Agent CLI (`agent --print --mode ask`) so a Cursor subscription can drive+ summaries without an API key. The default model is `cursor-grok-4.6-high`+ ("Grok 4.6"). `AI_MEMORY_CURSOR_AGENT` overrides the binary. The provider never passes+ `--yolo` or `--force`, because the prompt is captured session text. (#1127)+### Fixed+- Fixed structured LLM responses stopped at the output budget+ (`finish_reason = "length"`) or returned without usable content: they now+ fail with redacted terminal errors, without copying the response. (#1130)+ - Fixed automatic handoffs carrying harness scaffolding as the user's+ request: a user turn that opens with a markup block whose opening tag has+ no attributes (for example the `<task-notification>` block Claude Code+ delivers when a background task, agent or workflow completes) no longer+ becomes the handoff's `Started:` / `Last:` summary, its `Continue from:`+ line, or its `Unresolved question:` line. The handoff now uses the last+ prompt the user actually wrote, and falls back to the no-prompt summary+ when every prompt in the session is such a block. Prompts that only+ contain markup later in the text, pastes with attributes such as+ `<pasted_content id="…">`, and stored observations are unchanged. (#1158)+ - Corrected the `profile rebuild` guidance in `docs/cross-project-profile.md`+ and the command's help: it never removes an entry, and a candidate recorded+ by an earlier version keeps the classification it was recorded with, so+ entries 2.6.0 admitted under the looser rules survive the upgrade and a+ rebuild. The doc now gives the upgrade path, `profile review` then+ `profile forget` on each entry to drop. (#1155)+ - Fixed a `workspace/project` label passed as the project failing to resolve+ (for example `workspace: "default", project: "myorg/myproject"`): when no+ project has that exact name, the label's own workspace and project are used,+ under the same access checks as passing them separately. A write never+ creates a project whose name contains `/` any more; it is refused with the+ hint instead. (#1152, #1154)+ - Fixed every Pi turn failing with a 400 on Moonshot/Kimi models: the+ generated Pi extension registered the MCP tools with schemas containing+ `$ref`, which Moonshot rejects. Its bridge now requests the `?flavor=moonshot`+ schemas, with every reference inlined, which any provider accepts. Re-run+ `ai-memory install-hooks --agent pi --apply` to regenerate the extension.+ (#1157)## [2.6.1] - 2026-10-08