Skip to content
RAGRAF

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:

FieldWhat it means
kindthe refusal kind from the closed list below
operationwhich operation refused
problemwhat is wrong, in one line
whywhy it turned out this way
actionone command that fixes it
action_notea caveat to the command (for example, "the path to the config was not named")
possiblewhether this is fixable at all: false — it is not, and then there is no command

The nine kinds #

KindWhat it meansWhyWhat to do
no_indexthe corpus has no indexthe operation reads the index, and it has not been built yetragraf index (or ragraf ensure <directory>)
stale_indexthe index has fallen behind the codethe files changed after the last indexingragraf ensure <directory>
no_documentsthe document layer is not builtthe index has no document chunks of this revisionragraf query doc_status — shows what has been parsed
featurethe capability is declared but its code is not in the buildthe build is incomplete: a module was not deliveredragraf edition — will name what is missing
editionthe capability is closed by the editionthe licence does not unlock this capabilityragraf edition; if needed, a licence of that tier
licensethe licence is invalidthe signature does not match, the term has expired or the file was not foundragraf edition — the state and the cause in one line
degradedthe revision mode does not allow the operationthe code properties (PDG/DDG) are not built, the mode is below fullragraf index --cpg — rebuild with CPG
no_datathe corpus has no data for this questionthe operation ran, but what was sought is not in the indexthis is an answer, not a failure: refine the query or the corpus boundaries
bad_inputthe input is wrongthe operation could not parse an argumentfix 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:

Text
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:

JSON
{"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_index and stale_index are normal corpus states, not defects.
  • Not "no rights", unless the kind is edition or license: 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 #

SymptomCauseWhat to do
no project specified: the --project argument is neededthe CLI without a corpus configragraf 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 readcheck the directory and the include lists in the config
the MCP server does not come upa wrong interpreter or a missing --projectsee Connecting an agent

Where to look next #