Errors and the next step
The nine kinds of RAGRAF refusal — what each one means, why it arose and what to do. A closed list taken from the code, with a command for each kind.
Updated: 2026-11-10
A refusal is part of the contract #
RAGRAF does not answer "empty" instead of "I cannot". Any operation that cannot produce a fact returns a refusal with a kind, a cause and one command. The list of kinds is closed: it is declared in src/ragraf/util.py (REFUSAL_KINDS), and there are exactly 10 kinds in it. You cannot invent a kind of your own — a new kind appears only in the code.
The fields of a refusal:
| Field | What it means |
|---|---|
kind | the refusal kind from the closed list below |
operation | which operation refused |
problem | what is wrong, in one line |
why | why it turned out this way |
action | one command that fixes it |
action_note | a caveat to the command (for example, "the path to the config was not named") |
possible | whether this is fixable at all: false — it is not, and then there is no command |
The nine kinds #
| Kind | What it means | Why | What to do |
|---|---|---|---|
no_index | the corpus has no index | the operation reads the index, and it has not been built yet | ragraf index (or ragraf ensure <directory>) |
stale_index | the index has fallen behind the code | the files changed after the last indexing | ragraf ensure <directory> |
no_documents | the document layer is not built | the index has no document chunks of this revision | ragraf query doc_status — shows what has been parsed |
feature | the capability is declared but its code is not in the build | the build is incomplete: a module was not delivered | ragraf edition — will name what is missing |
edition | the capability is closed by the edition | the licence does not unlock this capability | ragraf edition; if needed, a licence of that tier |
license | the licence is invalid | the signature does not match, the term has expired or the file was not found | ragraf edition — the state and the cause in one line |
degraded | the revision mode does not allow the operation | the code properties (PDG/DDG) are not built, the mode is below full | ragraf index --cpg — rebuild with CPG |
no_data | the corpus has no data for this question | the operation ran, but what was sought is not in the index | this is an answer, not a failure: refine the query or the corpus boundaries |
bad_input | the input is wrong | the operation could not parse an argument | fix the argument; there is no command with the corpus |
Two kinds — feature and no_data — are marked "not fixed by an action with the corpus": the first is cured by a delivery, the second is an honest "not found".
What it looks like #
The command-line tool prints its messages in Russian; the output below is quoted verbatim.
The CLI text mode prints the cause and the command on one line:
index is missing: python tools/ragraf.py -p <config> index. Build the index:
python tools/ragraf.py -p <config> index (or python tools/ragraf.py ensure <project dir>)The machine form (which the agent receives over MCP and with --json) carries the same fields:
{"operation": "symbol",
"kind": "no_index",
"problem": "the corpus has no index",
"why": "the operation reads the index, and it has not been built yet",
"action": "python tools/ragraf.py -p <config> index",
"action_note": "", "possible": true}What a refusal does NOT mean #
- Not "it broke":
no_indexandstale_indexare normal corpus states, not defects. - Not "no rights", unless the kind is
editionorlicense: the distinction between "not
unlocked by the licence" and "not found" is fundamental, and it is always named.
- Not "try again": a repeated call without an action will give the same refusal. No kind
suggests a retry — each one suggests a step.
Refusals that occur before the first call #
| Symptom | Cause | What to do |
|---|---|---|
no project specified: the --project argument is needed | the CLI without a corpus config | ragraf ensure <directory> — it will find or create the corpus |
the directory does not look like a project (not_a_project) | there are no source files that RAGRAF can read | check the directory and the include lists in the config |
| the MCP server does not come up | a wrong interpreter or a missing --project | see Connecting an agent |
Where to look next #
- The full list of operations and their boundaries: Operations reference.
- Freshness and
stale_warningsin practice: Usage. - What an edition unlocks: Capabilities and editions.