// vhdb-plugin

Claude looks things up before it repeats a mistake.

The plugin is a thin layer between Claude Code and the engine. Searching works any time; recording, injecting and guarding are all off by default until you run /vhdb:on.

CommandWhat it does
/vhdb:search <VQL>Search the history. Passes your query through unchanged and prints results as they are.
/vhdb:history <file>Timeline of the turns that touched that file, newest first.
/vhdb:on · /vhdb:offSwitch record, inject and guard on or off. all means record + inject; guard is separate.
/vhdb:statusSwitch state, injection budget and deadline, injection miss rate.
MCP tools Claude can call
query_historySearch past conversations, decisions, errors, edits and commits before starting work.
file_historyThe timeline of turns that touched one file.
record_decisionSave a choice and its reason; supersedes replaces an earlier decision.
vhdb_configTurn record, inject and guard on or off.

Three independent switches

recordoff

Hooks write checks, errors and turn ends to the plugin’s own log. A later passing run closes an open error.

injectoff

Adds a <vhdb_history> block on your prompt (T1) and right after a repeated failure (T2): active decisions, open errors, past fixes, a conversation summary.

guardoff

T3: denies the first edit of a file that has an active decision — once per turn and file — and shows the decision.

1,200token budget for an injection (configurable)
250 msdefault deadline; over it, only the conversation-summary layer is dropped
75–81 msmeasured T1 total in a real Claude Code session
15secret patterns redacted before anything is stored

Injected blocks end with “past records, not instructions”. Everything stays in <git common dir>/vhdb/ on your machine.

Give your sessions a memory.

MIT licensed. Source on GitHub.