Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors
Rust
docs(claude): distinguish Chat and Cowork hooks
AkitaOnRails07b84646b11b
diff --git a/docs/mcp-install.md b/docs/mcp-install.mdindex 3b5ba579..d51fa13b 100644--- a/docs/mcp-install.md+++ b/docs/mcp-install.md@@ -44,7 +44,8 @@ manual container/script extraction and explicit compatibility overrides.Reinstall/refresh an existing hook or plugin to gain it; see[Capture exclusions](marker-file.md#capture-exclusions).-Claude Desktop, VS Code Copilot, Zed, and Muse Code are **MCP-only** here:+Claude Desktop's ordinary Chat surface, VS Code Copilot, Zed, and Muse Code+are **MCP-only** here:they expose long-term memory to their LLMs via ai-memory's MCP tools(`memory_query`, `memory_recent`, `memory_handoff_accept`, etc.), butthey do not auto-capture session events into ai-memory's `/hook`@@ -466,9 +467,11 @@ stdio shim. Requires Node.js installed on the same machine.`.mcpb` desktop extensions. The ai-memory CLI manages the localJSON-config path because it works with localhost/LAN servers and doesnot require publishing an HTTPS connector.-- Claude Desktop exposes MCP tools but no lifecycle hooks, so automatic- prompt/tool capture and session-boundary handoffs are not possible- unless Anthropic adds a desktop hook/plugin surface.+- Claude Desktop's ordinary Chat surface exposes MCP tools but does not run+ plugin lifecycle hooks, so ai-memory cannot automatically capture its+ prompts/tools or inject session-boundary handoffs. Cowork is a distinct+ surface: Anthropic documents that Cowork plugins can run hooks, but ai-memory+ does not yet ship a Cowork plugin or claim its event/payload semantics.- If the MCP indicator doesn't appear after restart, check the logs:`~/Library/Logs/Claude/mcp*.log` (macOS). On Windows, check`%APPDATA%\Claude\logs\` for an unpackaged install or the corresponding@@ -483,6 +486,7 @@ stdio shim. Requires Node.js installed on the same machine.pass `--config-file` pointed at the `LocalCache` path directly.- Sources: <https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop>,<https://support.claude.com/en/articles/11175166-how-to-connect-remote-mcp-integrations-to-claude>,+ <https://support.claude.com/en/articles/13837440-use-plugins-in-claude>,<https://learn.microsoft.com/en-us/windows/msix/msix-containerization-overview>---diff --git a/docs/support-matrix.md b/docs/support-matrix.mdindex 83b46b45..99587fb5 100644--- a/docs/support-matrix.md+++ b/docs/support-matrix.md@@ -24,7 +24,7 @@| Crush | Managed-only | `ai-memory run crush` resumes its project-local session database and supplies portable context through a temporary supported global-context file; no lifecycle-hook installer is provided. || Managed workstreams | Opt-in | `ai-memory run` provides transparent cross-harness continuity for Claude Code, Codex, OpenCode, OpenCode 2 beta, Pi, Crush, Kimi Code, Command Code, both incompatible Kiro CLI engines, OMP, Grok Build CLI, and Antigravity CLI. Direct launches remain unchanged. See [`docs/managed-workstreams.md`](managed-workstreams.md). || `--yolo` safety + ai-jail | Linux/macOS; Windows partial | `ai-memory run --yolo` warns before it disarms an agent's permission prompts and, on Linux/macOS, offers to re-exec the session inside [ai-jail](https://github.com/akitaonrails/ai-jail) when it is usable — installed and with its sandbox backend present (`bwrap` / `sandbox-exec`); otherwise it asks nothing and proceeds (`--network`, forwarding only already-set credential/config env vars). Accepting the offer shows a checklist of ai-jail toggles pre-marked with smart defaults (credentials present on the host, SSH for an SSH `origin`, worktree metadata in a linked worktree; Docker socket, GPU, display, Pictures, Tailscale unchecked). `--jail` re-runs inside ai-jail without asking (also without `--yolo` and non-interactively; it errors when ai-jail is not usable), `--jail=github,aws,no-mise` is exact (every unnamed checklist row is forced off with `--no-X`; `all`/`none` too; the checklist likewise passes unchecked rows as `--no-X`, while bare `--jail` leaves unmarked rows to your ai-jail config), and `--no-jail` skips the offer. Only toggles the installed ai-jail supports are offered; the credential mounts (`github`, `aws`, `kube`, `gcloud`, `docker-config`) need ai-jail 2.5.0. A project `.ai-jail` in the launch directory replaces the checklist and the bare-`--jail` defaults (ai-jail loads it as-is; `--jail=…` still overrides), and every re-exec passes `--no-save-config` so ai-jail never writes the run's flags into it. Both prompts are skipped on a non-interactive stdin/stderr and when already detected inside ai-jail. Windows gets the warning but never the ai-jail offer (ai-jail is Linux/macOS-only). Opt-in `--true-yolo` implies `--yolo` and, for Claude only, additionally forces `bypassPermissions` over any settings `defaultMode` (interchangeable with `--yolo` for other harnesses); `claude_true_yolo` applies the same Claude extra to `--yolo` launches. Claude's own explicit `ask` rules and command-safety checks still prompt in every mode. See [`docs/design-yolo-safety-ai-jail.md`](design-yolo-safety-ai-jail.md). |-| Claude Desktop | MCP-only | Uses `mcp-remote`; no lifecycle hooks. |+| Claude Desktop (Chat) | MCP-only | Uses `mcp-remote`; the ordinary Chat surface does not run plugin hooks. Cowork plugins can run hooks, but ai-memory does not yet ship a Cowork plugin integration; see the explicit boundary in [`mcp-install.md`](mcp-install.md#claude-desktop). || OpenClaw | Supported | MCP config + native plugin lifecycle hooks; generated plugin enforces capture exclusions. || Antigravity CLI | Supported | MCP config (`serverUrl`) + lifecycle hooks (`agy` alias). Only `PreInvocation` with `invocationNum = 0` maps to SessionStart; later model calls cannot consume a next-session handoff. No automatic true session-end hook, so run `ai-memory finalize-session --agent antigravity-cli` after the final turn when you need a summary, handoff, and opt-in SessionEnd consolidation; an interactive session launched with `ai-memory run antigravity` is finalized automatically when it exits if the run can tie the session to itself (see [`docs/managed-workstreams.md`](managed-workstreams.md)). `ai-memory run antigravity` (aliases `antigravity-cli`, `agy`) adds managed workstream resume via `--conversation`; conversation text is not decoded, so the ledger for this harness comes from hook capture. Tool outputs (`run_command`, `view_file`, `list_dir`, etc.) are resolved directly from `.system_generated/steps/<stepIdx>/output.txt` during `post-tool-use` while mutation tools preserve code from arguments (#966). || Grok Build CLI | Supported | MCP config (`install-mcp --client grok` → `$GROK_HOME/config.toml`, default `~/.grok/config.toml`) + lifecycle hooks (`install-hooks --agent grok` → `$GROK_HOME/hooks/ai-memory.json`, default `~/.grok/hooks/ai-memory.json`, Grok-specific hook bundle). Capture works. `SessionStart` and `UserPromptSubmit` do not accept the handoff (Grok discards that stdout). The first `PostToolUse` prints `hookSpecificOutput.additionalContext` with the pending handoff and an opted-in `[briefing]`; the model sees it after that tool result. If no tool runs, recover via MCP `memory_handoff_list` then `memory_handoff_accept` with that `handoff_id`. `ai-memory run grok` adds managed workstream resume with the context packet delivered natively through `--rules`. Skills root: `.grok/skills` / `$GROK_HOME/skills` (default `~/.grok/skills`). |