Kirsch documentation · v0.1.5
kirsch doctor checks
What each line of the kirsch doctor report means, and what to do about it.
kirsch doctor checks what Kirsch depends on and prints a line for each result. It sends no prompt to a model and makes no network calls, so you can run it at any time. This page explains each line it can print, and what to do about it. The failures people meet most often are on Troubleshooting.
Placeholders in angle brackets, such as <path>, stand for values that depend on your machine. Each one is explained where it first appears in its section.
Reading the report
Run doctor inside your project folder, or pass --workspace <path> to check another folder:
cd /path/to/your/project
kirsch doctor
The report has this shape:
kirsch <version>
<status> <check>: <detail>
doctor: <ok> ok, <warn> warn, <fail> fail
kirsch <version>is the opening line. The version is the release version, or0.1.0-devin a build that carries no release version. See Install for how a build gets its version.<status>isok,warn, orfail. Spaces follow it, as in the examples below.<check>is the name of the check, in lower case.<detail>is the message. Each one is quoted below.- The last line counts the statuses.
The checks print in the order of the headings below. A warn line that begins skipped: means the check did not run, because an earlier check left it nothing to read. A config that did not load skips every check that reads it, and a run with no workspace skips the checks that need a folder.
Exit status. Doctor exits 0 when no check fails, and 1 when at least one check fails. A warning never causes a failure. Fix the fail lines first.
Example output from a repository with no key variables set. Your lines and paths will differ:
kirsch 0.1.0-dev
ok git: found at /usr/bin/git
ok rg: found at /usr/local/bin/rg
ok repository: /home/you/project
ok config: settings valid
warn key: endpoint opencode: no key found (set KIRSCH_OPENCODE_API_KEY or OPENCODE_API_KEY); kirsch starts but cannot send a prompt
ok backend: search_code uses ripgrep
ok model: endpoint opencode, model minimax-m3: context window 128000 tokens
ok context: AGENTS.md, 6854 bytes
ok state: /home/you/.local/share/kirsch/sessions/3f9a1c07b2d4 exists and is writable
ok lock: free
doctor: 9 ok, 1 warn, 0 fail
git
ok git: found at <path>
<path> is the full path of the git program found on your PATH. Nothing to do.
fail git: not found on PATH; kirsch needs git to find the repository
This appears when git is not on your PATH and you did not pass --workspace. Kirsch will not start. Install Git, then open a new terminal so the PATH change applies.
warn git: not found on PATH; kirsch starts with --workspace but the Git features are off, such as /diff, git_status, git_diff, the branch display and the dirty count
This appears when git is not on your PATH and you did pass --workspace. Kirsch starts with its Git features off. Install Git to turn them on.
rg
ok rg: found at <path>
<path> is the full path of rg, which is ripgrep. Nothing to do.
warn rg: not found on PATH; search_code uses the pure-Go fallback
Kirsch's code search works without ripgrep. It uses its own built-in search instead. This is a warning, not a failure. To use ripgrep, install it with your system's package manager. See Install. The search_code part of the message is explained under Missing ripgrep below.
repository
ok repository: <root>
<root> is the folder Kirsch treats as the project root. That is the enclosing Git repository, or the folder you named with --workspace.
fail repository: not in a Git repository
This appears when you run doctor outside a Git repository and did not pass --workspace. Kirsch will not start. See Not in a repository below.
fail repository: --workspace <path>: <error>
This appears when the folder named with --workspace cannot be used. The detail is the error from the operating system, with the path shown in front of it. For example, for a folder that does not exist:
fail repository: --workspace /nonexistent-kirsch-path: stat /nonexistent-kirsch-path: no such file or directory
If the path is a file and not a folder, the detail is --workspace <path> is not a directory. Give Kirsch the path of a folder that exists.
A rarer detail, resolve workspace root <root>: <error>, can also appear.
warn repository: <root> is not a Git repository; kirsch starts, but the Git features are off, such as /diff, git_status, git_diff, the branch display and the dirty count
This appears when --workspace names an existing folder that is not a Git repository. Kirsch starts with its Git features off. <root> is that folder.
When git is missing, doctor leaves out the repository line, because the git line already reports the cause.
config
Kirsch reads a global settings file and a project settings file. The global file is $XDG_CONFIG_HOME/kirsch/config.toml, or ~/.config/kirsch/config.toml when XDG_CONFIG_HOME is not set. The project file is .kirsch/config.toml in the workspace. Each is described in Configuration.
The config check prints a warn line for each warning the loader raises. It then prints either a fail line or an ok line.
warn config: <file>: unknown key "<key>" (ignored)
<file> is the config file the key is in. <key> is a setting Kirsch does not know. It may be a typo, or a setting that a newer Kirsch understands. Kirsch ignores it. Correct the spelling if the setting was meant to take effect.
warn config: <file>: key "<key>" ignored (a project config may set only [context].project_files)
This appears when the project file sets a key other than context.project_files. Kirsch ignores the key. A project file may set only that setting. To change any other setting, put it in your global file. The same text appears when the project file holds a table Kirsch does not recognise. In that case <key> is the table's name.
warn config: <file>: context.project_files must be a list of strings; ignored
This appears when context.project_files in the project file is not a list of strings. Kirsch ignores the setting. Write it as a list, for example project_files = ["AGENTS.md"].
fail config: read <path>: <error>
fail config: parse <path>: <error>
read appears when a settings file exists but cannot be read, usually because of its permissions. parse appears when a file is not valid TOML. <path> is the settings file's path. <error> is the operating system's message for read, and the parser's message for parse. A type error also reaches you through this line. For example, a provider.default that is not a string is reported as parse <path>: provider.default must be a string. Fix the named file.
fail config: <file>: key "<key>" looks like a credential; Kirsch never reads secrets from config files, because config files get committed and shared. Set the value in an environment variable and name that variable with `api_key_env` instead.
This appears when a settings file holds a key whose name looks like a credential, such as api_key or token. Kirsch refuses to start. Remove the key from the file. Put the value in an environment variable, and name that variable with api_key_env. The details are in Secrets.
The message is longer than one line. Doctor joins its parts onto one line.
fail config: invalid settings (<consulted>): <error>
This appears when the settings parse, but the combined result is not valid. <consulted> names the files that were checked: global <path> for the global file, and project <path> for the project file when there is a workspace. It reads no config files when no path is set. <error> is a message from the list below.
provider.default = "<name>"; endpoint does not exist. Setprovider.defaultto the name of an endpoint defined under[provider].provider.<name>.base_url is required, and the same form for each other required field. Only an endpoint you define needs these, because the built-in endpoints supply them.provider.<name>.auth = "<value>"; want x-api-key or bearer.provider.<name>.thinking = "<value>"; want one of off, low, medium, high.provider.<name>.base_url: <reason>. The reason says which rule the address breaks, for examplebase_url scheme must be https or http, got "ftp"orhttp is allowed only on localhost or loopback addresses. The rules are in the Valid values column ofprovider.<name>.base_urlin Configuration.policy.default_command_timeout_seconds = <n>; want a positive number.context.max_project_context_bytes = <n>; want zero or more.
<name> in these messages is the endpoint's name, such as opencode. <value> and <n> are the setting's value as you wrote it.
ok config: settings valid
ok config: settings valid; project file not read (no workspace)
settings valid means the files parsed and the combined settings pass the checks. Doctor cannot tell whether a given file was found, so the line does not say. The project file not read form appears when no workspace was found, so the project file was never read.
Config warnings appear in doctor's report. They do not appear in the program unless you turn on the debug log. See Debug log.
key
The key check reads the variable named by api_key_env for the default endpoint. It prints the variable's name, and never the key itself.
ok key: endpoint <endpoint>: key found in <variable>
<endpoint> is the endpoint, opencode by default. <variable> is the variable that supplied the key. It is KIRSCH_<NAME> when that variable is set, and <NAME> otherwise. <NAME> is the endpoint's api_key_env value, which is OPENCODE_API_KEY for the default endpoint.
warn key: endpoint <endpoint>: no key found (set KIRSCH_<NAME> or <NAME>); kirsch starts but cannot send a prompt
This is the line from the example report above, with <endpoint> as opencode and <NAME> as OPENCODE_API_KEY. Kirsch starts, but it cannot send a prompt. The error you see when you send one is described under No API key. Set the variable as described there.
warn key: endpoint <endpoint>: api_key_env does not look like an environment variable name (value withheld); fix the setting
This appears when api_key_env holds something that is not a variable name. A common cause is a key pasted into the setting by mistake. Doctor withholds the value, so the line does not show it. Set api_key_env to a variable name such as OPENCODE_API_KEY. If the value you pasted was a real key, treat that key as exposed, and replace it at the provider. A settings file may have been committed or shared.
warn key: skipped: config did not load
The config did not load, so there is no endpoint to check. Fix the config line first.
backend
ok backend: search_code uses ripgrep
Kirsch's search_code tool, which the model uses to search your code, is using ripgrep. Nothing to do.
warn backend: search_code uses pure-go (rg is not on PATH)
search_code is using Kirsch's built-in search, because ripgrep is not on your PATH. Search works. See Missing ripgrep.
This line is never skipped. It does not read the config.
model
ok model: endpoint <endpoint>, model <id>: context window <tokens> tokens
<endpoint> is the endpoint's name. <id> is the model's name as Kirsch's model table records it. That can differ from the name in your config. <tokens> is the context window Kirsch assumes for the model. Nothing to do.
warn model: endpoint <endpoint>, model <model>: not in the table; conservative fallback, context window <tokens> tokens
<model> is the model name from your config. Kirsch does not know this model, so it uses a conservative context window. The program shows the same situation as Unknown model: cost display unavailable; conservative budget in use. The warning does not stop Kirsch. Check the model name in your config for a typo. If the name is correct, the warning remains.
warn model: skipped: config did not load
The config did not load, so there is no model to check. Fix the config line first.
context
The context check looks for the project files Kirsch reads into the model's instructions. The default list is AGENTS.md and CLAUDE.md. See Configuration.
ok context: <file>, <size> bytes
<file> is the first entry in context.project_files that is an ordinary file in the workspace. <size> is its size on disk in bytes.
ok context: none; looked for <files>
None of the listed files is present. <files> is the list from context.project_files, separated by commas. Kirsch runs without project context. This is not a warning.
ok context: none; no project files configured
context.project_files is an empty list, so there is nothing to look for.
warn context: <file>, <size> bytes; <warning>
A file was chosen, but a candidate in the list was skipped. <warning> is one from the list below. More than one can appear. Kirsch reads the chosen file.
project context candidate "<name>" refused: <reason>. Kirsch refuses a name that matches a secrets pattern such as.env,*.pemor*.key, a path inside.gitor.kirsch, a path that leads outside the workspace, an absolute path, and an empty path.<reason>says which.project context candidate "<name>" is not a regular file. The candidate is a folder or another special item.
warn context: a candidate could not be read: <error>
Kirsch could not read a candidate, so it chose none. <error> is one of the forms below, and any warnings from above follow it: stat project context candidate "<name>": <error> or read project context candidate "<name>": <error>.
Fix a context problem by correcting the name in context.project_files, then checking that the file exists, is an ordinary file, and sits inside the workspace. A path in context.project_files must be relative to the workspace root.
warn context: skipped: config did not load
warn context: skipped: no workspace
The skipped: config did not load form means the config did not load. The skipped: no workspace form means no workspace was found, so there is no folder to look in. Fix the config or repository line first.
state
The state check looks at the folder where Kirsch saves sessions. That folder is session.storage_dir in your config, and the default is ~/.local/share/kirsch/sessions. Kirsch keeps one folder for each project inside the sessions folder, and keeps index.json in the folder above it. The check looks at the project's folder, then at the folder above sessions and its index.json file. See Configuration.
The ok lines say the folder is usable:
ok state: <dir> exists and is writable
ok state: <dir> does not exist yet; kirsch will create it (<ancestor> is writable)
<dir> is the project's session folder. <ancestor> is the nearest folder above it that already exists. A first run usually prints this form, because Kirsch has not created the folder for that project. That is normal.
The warn lines say the check could not be made on this system, or that the folder has not been made. Kirsch starts.
warn state: <dir> exists; writability not checked on this platform
warn state: <dir> does not exist yet; writability of <ancestor> not checked on this platform
warn state: <folder> exists; writability not checked on this platform
warn state: <index> exists; readability not checked on this platform
<folder> is the folder above sessions. <index> is index.json inside it.
The state check can also print these lines, when an earlier check left it nothing to read:
warn state: skipped: config did not load
warn state: skipped: no workspace
Fix the config line, or the repository line, first.
The fail lines are the ones to fix. Each one ends with a reason Kirsch cannot start, or cannot create a new session:
fail state: cannot work out the state folder: home directory unknown; kirsch cannot start until this is fixed
Kirsch cannot find your home folder, and the session folder is under it. Check that the HOME variable is set in the shell you start Kirsch from. The lock line repeats the first part of the message, as a warning.
fail state: <dir> is not a folder; kirsch cannot start until this is fixed
Something that is not a folder sits where the session folder should be. Rename that file, so Kirsch can make the folder.
fail state: <dir> is not writable; kirsch cannot create a new session, so any start that needs one fails until this is fixed
You do not have write access to the session folder. Give yourself write access to it, or change session.storage_dir to a folder you can write to.
fail state: cannot read <dir>: <error>; kirsch cannot start until this is fixed
Kirsch cannot read the session folder. <error> is the operating system's message, with the path left out. Check the folder's permissions.
fail state: <dir> does not exist and <ancestor> is not a folder; kirsch cannot start until this is fixed
fail state: <dir> does not exist and <ancestor> is not writable; kirsch cannot start until this is fixed
fail state: <dir> does not exist and <ancestor> cannot be read: <error>; kirsch cannot start until this is fixed
The session folder does not exist, and Kirsch cannot create it, because the nearest folder above it cannot take a new folder. Fix that folder, or change session.storage_dir.
fail state: cannot read <folder>: <error>; kirsch cannot start until this is fixed
fail state: <folder> is not a folder; kirsch cannot start until this is fixed
fail state: <folder> is not writable, so index.json cannot be updated; kirsch cannot create a new session, so any start that needs one fails until this is fixed
fail state: cannot read <index>: <error>; kirsch cannot start until this is fixed
fail state: <index> is a folder, not a file; kirsch cannot start until this is fixed
fail state: <index> is not readable; kirsch cannot start until this is fixed
These cover the storage root and its index.json file, which Kirsch reads and writes when it starts a session. Fix the named folder or file: give it the permissions it needs, or move the item that is in its way. Rename rather than delete a file you are unsure of.
lock
The lock check asks whether another Kirsch is running in the same project. Kirsch guards each project with a lock, so a second copy starts with fewer features. See Lock held below.
ok lock: free
ok lock: free (no lock file yet)
No other Kirsch holds the lock for this project. The (no lock file yet) form appears before the lock file has been created. Each is normal.
warn lock: held by another kirsch in this workspace; a new start would skip resume and session grants
Another Kirsch is running in this project. A new start would skip resume and session grants. Doctor does not disturb the other copy. See Lock held.
warn lock: free, but <lockPath> is not writable; the single-instance guard will be off
<lockPath> is the .lock file in the project's session folder. Kirsch can take the lock only if it can write to that file. Otherwise it runs without the single-instance guard. Give yourself write access to the file.
warn lock: could not check the lock: <error>
warn lock: not checked on this platform
warn lock: skipped: config did not load
warn lock: skipped: no workspace
These mean the lock could not be checked, so the state is unknown. The could not check form gives the operating system's message. The skipped forms have the same meaning as on the other checks above.
These pages describe Kirsch v0.1.5. Source: the doc folder for v0.1.5 on GitHub · releases.