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 'upstream/main' into feat/1040-run-copilot

Jean Vetorello3485c49c2dfc
diff --cc CHANGELOG.md
index 611adaf9,a1869c1f..5d5ade83
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -7,28 -7,31 +7,53 @@@ 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)
+
+ ### Fixed
+ - Fixed the hook spool charging a spooled event's retry budget while the
+ server was unreachable: an endpoint-level delivery failure (connection
+ refused, timeout, DNS — the existing `Unreachable` classification) no
+ longer increments `attempts`, so a total outage no longer deletes the
+ oldest events at roughly one per `max_attempts` drain passes while the
+ server is down. Post-connect failures (a server that answers with 5xx or
+ a protocol error) keep the previous charging semantics, and the 10,000
+ file cap and 7-day spool TTL bounds are unchanged. Also corrected the
+ stale `hooks/_lib.sh` comment that claimed the backlog is drained at
+ session boundaries only (a piggyback drain also runs after any
+ successful 2xx POST). (#1121)
+ - Fixed the PowerShell hook bundle silently losing every capture event
+ during a server outage: the `.ps1` path now spools an undeliverable POST
+ (connection failure, timeout, or 5xx) to the same `<data_dir>/hook-spool/`
+ on-disk contract the shell bundle, the native hooks, and
+ `ai-memory hook-drain` share — same `<ms>-<pid>-<seq>.json` entry names,
+ same `SpoolEntry` JSON — and, like `ai_memory_post_hook`, kicks a detached
+ bounded drain (≤64 entries) after the next successful delivery, retires
+ entries on a 2xx or a terminal 4xx, and never spools a routed-repository
+ or externally-owned capture event. The PowerShell POST also mints an
+ idempotency `ingest_key` before its initial attempt and keeps it on the
+ spooled replay, so an ambiguous delivery that committed server-side is
+ discarded on replay instead of double-ingested. (#1122)
+
## [2.6.0] - 2026-10-07
### Added