Sessions that remember.
Why: a raw agent session starts from zero — it re-reads the codebase, re-derives conventions, and re-asks questions a previous session already answered. Agentify tracks what every session did (file edits, commands, notes) and gives the next session a digest.
How: automatic once installed. Hooks record activity; each prompt you type is matched against the store and only related context is injected. You occasionally leave notes:
agentify ctx note "payment idempotency key logic lives in src/pay/retry.js — never regenerate per attempt" agentify ctx load # see exactly what the agent sees
What the next session sees (real digest from the demo repo):
## Agentify context (from previous sessions)
### Decisions on record (query with `agentify ctx decisions "<topic>"`)
- [2026-07-07] [decision] chose idempotency keys stored client-side over server-side
dedup because the gateway retries before our server sees the request
### Notes left for this session
- [2026-07-07] payment idempotency key logic lives in src/pay/retry.js — never regenerate per attempt
- [2026-07-07] legacy card vault code is in src/pay/vault-legacy.js, do not touch without
compliance — STALE? references missing path(s): src/pay/vault-legacy.js; verify before trusting
### Commands that failed and were not retried successfully
- [2026-07-07] `npm run migrate` (exit 1) — error: relation "orders" already exists
When to intervene: almost never. agentify ctx pause for scratch work, agentify ctx clear to archive and reset, AGENTIFY_CTX=off for one clean session. Matching is BM25-ranked with light stemming — "payment retries" finds the retry module's notes — and injected items dedupe per session, so a CSS question pulls nothing.
Dead ends stay dead.
Why: agents retry commands that failed sessions ago, verbatim, and burn the same minutes and tokens rediscovering the same wall. Nothing in a raw agent remembers results across sessions.
How: automatic. Bash results are tracked with exit codes; when the agent is about to rerun the exact command that failed in a previous session, a PreToolUse hook injects a warning before it executes (real output):
Agentify: this exact command failed in a previous session (2026-07-07) (exit 1): error: relation "orders" already exists. If the underlying cause was not fixed since, try a different approach instead of retrying it as-is.
When it matters most: expensive commands — migrations, deploys, long suites — where a doomed retry costs real time. One later success clears the failure; warnings dedupe per session and never fire for failures the current session already saw. Manual check: agentify ctx precheck "<command>".
Run the tests the change actually touches.
Why: agents default to the full suite after every change because they can't tell which tests matter. On a multi-minute suite that's the slowest part of the loop.
How: agentify test walks the import graph in the structural index from your changed files to the tests that exercise them. Real run — a repo with two test files where only src/pay/retry.js changed:
$ agentify test Selected tests: 1 file(s) from 1 changed file(s) - test/retry.test.js (imports changed code) Run: - node --test test/retry.test.js $ agentify test --run # executed; test/dash.test.js was never run ℹ pass 1 Selected tests passed.
When to use: the guidance block teaches the agent to run agentify test --since <ref> --run before finishing a change. Selection reasons are explicit (changed / imports changed code / covers a changed file), node --test runners are invoked directly while jest/vitest/mocha get file filters appended, and when no related tests exist it says so and recommends the full suite — silence is never treated as coverage. Requires agentify scan.
A second vendor's eyes, before the push.
Why: the model that wrote the code reviews it with the same blind spots. A different vendor's model catches different things — and pre-push is cheaper than PR review.
How: agentify review --diff <ref> any time, or opt in with hooks.prePush: true + agentify hooks install to run it on every git push. This is Codex's unedited review of a commit that added ts: Date.now() to a retry payload:
$ agentify review --diff HEAD~1
cross-vendor review by codex — diff since HEAD~1
**Findings**
- Medium: src/pay/retry.js now adds `ts: Date.now()` to the retry return value.
This makes retryPayment(2, "k1") non-deterministic and changes the public shape
from { attempt, key } to { attempt, key, ts }. For payment retry/idempotency
code, that is risky: callers that serialize, compare, dedupe, cache, or sign
the retry payload can now see different values for the same attempt/key.
When to enable the hook: repos where a second opinion is worth a few seconds and cents per push. It's advisory — findings print, the push proceeds regardless, and it stays silent when there's nothing to review. It's opt-in (default off) precisely because it costs real time and tokens.
"Why did we choose X" gets an answer, not a debate.
Why: settled trade-offs get relitigated by every new session — and by agents happy to "improve" a choice they know nothing about.
How:
agentify ctx decision "chose idempotency keys stored client-side over server-side dedup because the gateway retries before our server sees the request" $ agentify ctx decisions "why client side idempotency keys" Decisions matching "why client side idempotency keys": - [2026-07-07] chose idempotency keys stored client-side over server-side dedup because the gateway retries before our server sees the request
When to record one: any choice a future session could plausibly reverse without context — library picks, storage formats, API shapes, rejected alternatives. Decisions get their own digest section, are staleness-checked like notes, and with agentify ctx share the committed notes file becomes a lightweight, queryable team ADR log.
Routing you can audit.
Why: model routing (cheap work → cheap models, reviews → the other vendor) only pays off if you can see it working.
How: every agentify delegate run is logged locally with duration, tokens, and cost — the provider's real numbers where its CLI reports them, labeled ~4 chars/token estimates otherwise. Real output after one Haiku research call and one Codex review:
$ agentify stats
Agentify stats — last 30 day(s)
Delegations:
- total: 2 run(s), 50.1k in / 530 out, cost $0.0212 (1/2 reported)
By kind:
- research: 1 run(s), 49.9k in / 301 out, cost $0.0212
- review: 1 run(s), 199 in / 229 out, cost n/a
By model:
- claude/haiku: 1 run(s), 49.9k in / 301 out, cost $0.0212
- codex: 1 run(s), 199 in / 229 out, cost n/a
Note: token counts for 1 run(s) are estimates (~4 chars/token); the provider
CLI reported no usage.
When to look: agentify stats --days 7 in retro; failures and cross-vendor fallbacks are counted per bucket, so a route whose CLI keeps falling back stands out immediately.
Not just Claude Code and Codex — anything MCP.
Why: hooks are Claude Code-specific and AGENTS.md guidance is best-effort. MCP tool-calling is reliable and works in Cursor, Zed, Windsurf, Claude Desktop, Gemini CLI — anywhere.
How: register agentify serve as a stdio MCP server in your client. Real tool list from a live session:
$ claude mcp add agentify -- agentify serve # or your client's equivalent tools: ctx_load, ctx_note, ctx_match, query, risk, test_select, ctx_decisions, ctx_handoff
When to use hooks vs MCP: in Claude Code prefer hooks (automatic tracking, free per-prompt injection); use MCP everywhere else. Both together is fine. The server is part of the CLI — zero extra dependencies, no state between calls, backed by the same store and index.
The rest of the toolbox.
agentify scan builds the SQLite structural index; query search|def|refs|callers|impacts|owner|deps|changed answer structural questions; risk --since <ref> scores blast radius and recommends regression tests.
agentify delegate quick|implement|heavy|review|research "task" shells work to the routed model (Haiku / Sonnet / Opus / Codex by default). Read-only unless --write. agentify models shows the table.
agentify ctx share makes notes.jsonl committable — notes and decisions become team memory. Events, summaries, and handoffs always stay local.
ctx pause|resume|clear for a clean slate, AGENTIFY_CTX=off for one session, context.injection: digest|off in .agentify.yaml to change injection.
agentify workflow install auto-detects GitHub, GitLab, or Azure DevOps and installs the board-to-draft-PR skill bundle.
agentify uninstall removes exactly what install added — the marker-delimited block and Agentify's own hook entries. Your config survives.
Evidence methodology: outputs on this page were produced by running the released CLI against a small payment-service fixture repo (two modules, two test files, a seeded failing migration). The Codex review and Haiku research call are real provider CLI invocations; nothing was hand-written or paraphrased. The full command reference lives in the Markdown usage guide.