Skip to content
Merged
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versioning: [S

## [Unreleased]

### Added
- **Automatic per-turn recall on Claude Code.** A `UserPromptSubmit` hook runs a
hybrid recall against each substantive prompt and injects the hits as context,
closing the gap where the `recall` tool was almost never invoked. New
`cairn recall-hook` command; configurable via `auto_recall` / `auto_recall_k` /
`auto_recall_scope` (default on). Plugin `0.4.0`.

### Fixed
- **Claude Code plugin (0.3.1): fresh install no longer fails on first run.** The
SessionStart/SessionEnd/PreCompact hooks passed `${user_config.vault_path}` as a command
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,21 @@ codex plugin add agentcairn@agentcairn

On install you pick a vault path (default `~/agentcairn`); it's **auto-created** on the first session — no Obsidian setup required. From then on agentcairn surfaces relevant memory at the start of each session, distills each session into your vault, and gives you `/agentcairn:recall`, `/remember`, `/memory`, `/savings`, and `/ingest`. Nothing to pip-install — the plugin runs the published package via `uvx`.

**Automatic recall (Claude Code).** On every substantive prompt, the plugin runs
a hybrid recall against what you just asked and injects the most relevant
memories as context for that turn — not just the recency digest shown at session
start. Trivially-short prompts (e.g. "yes", "go") are skipped. It is fail-open:
if anything goes wrong it injects nothing and never blocks your prompt.

Configure it in `~/.agentcairn/config.toml` (flat top-level keys; env vars
`CAIRN_AUTO_RECALL`, `CAIRN_AUTO_RECALL_K`, `CAIRN_AUTO_RECALL_SCOPE` override the file):

```toml
auto_recall = true # master on/off (default: true)
auto_recall_k = 3 # memories injected per prompt
auto_recall_scope = "all" # "all" (boost, non-lossy) or "project" (hard filter)
```

> Not on Claude Code or Codex? agentcairn is also a standalone MCP server + CLI for any host — see [Using it directly](#using-it-directly).

## How it works
Expand Down
Loading