KORTHEXDocumentation

Docs / CONFIGURATION

CONFIGURATION

Error Codes & Troubleshooting

Written and maintained by Hendrik Schneider · Last reviewed · How we check this

A consolidated reference for the error codes the CLI and engine surface, plus the most common causes and the fix path for each. When in doubt: set global.logLevel to DEBUG in the config file and re-run; the log will reference the same codes and point to the failing component.

CLI Exit Codes

Every Korthex CLI command returns a stable exit code so that scripts and CI gates can react reliably. The numbers are banded, and the bands are the part worth branching on when a specific code is not: 0-9 core outcomes, 10-19 quality gates, 20-29 baseline and contract, 30-39 policy, 40-49 configuration, 50-59 integrity, 60-69 infrastructure. Bands are sparse on purpose so a new class never reuses an old number.

Exit codeMeaningWhen you see it
0CleanCompleted, and no threshold in play was crossed.
1Findings presentThe run produced findings. Expected, not an error. Note that this number is deliberately avoided by korthex check, because it already carries more than one meaning.
2Generic failureThe catch-all for a failure with no more specific class.
3License requiredThe operation needs a tier the active license does not grant.
4Usage errorUnknown flag, missing required option, invalid value.
5CancelledUser-initiated cancel, or the native timeout/cancel class.
10Quality gate failedA gate fired on a measured value: accuracy below its threshold, coverage below target. The measurement itself succeeded.
20Baseline mismatchA baseline or contract comparison did not match.
30Policy violationA rule the operator wrote said no.
31Policy input unreadableThe policy engine could not read the report it was asked to judge. Distinct from 30 on purpose: "I never looked at your report" is not "I looked and found violations".
32Policy not loadedEvaluate or enforce was reached with no policy loaded at all.
33Check threshold exceededAt least one finding at or above the --fail-on severity. Distinct from 30: 30 is a written rule, 33 is the ceiling passed on the command line.
34CI token rejectedThe backend definitively refused KORTHEX_CI_TOKEN . A backend that could not be reached is not this code: that outcome is disclosed and the run continues on its local verdict.
35Check scan timeoutThe scan exceeded the policy-declared wall clock. Distinct from 5, which a user-initiated abort also produces.
40Configuration invalidThe scan or CI configuration was missing, malformed or rejected.
41Policy source invalidA policy file was found but is not a usable policy: empty, unparsable, not a JSON object, or oversized. It never governed anything, and it never falls through to the next tier.
50Decryption failedThe report could not be decrypted or failed its integrity check.
60Infrastructure errorAn outage on the service side.
61Backend unavailableThe backend could not be reached.

Common Issues

SymptomLikely causeResolution
"License missing" on first runActivation step not completed.Run korthex license activate KX-XXXX-XXXX-XXXX-XXXX or set KORTHEX_LICENSE.
"License server unreachable"Offline machine without offline-activation token.Use the challenge/redeem flow under License Management → Offline Activation.
Scan finishes with 0 findings on a real codebasePath matched .korthexignore or .gitignore aggressively; or all detection toggles off.korthex config show; check the ignore rules and detection.* toggles.
Scan is unexpectedly slow on a repo that was fast yesterdayThe cache was invalidated, so the run fell back to a full analysis. A Korthex upgrade does this by design: the engine binary is part of the cache fingerprint, so the first scan after an update is cold.Expected once per upgrade - the next scan is incremental again. To confirm the reason rather than guess it, read delta_scan_fallback in the report: it names why the snapshot was not used.
High false-positive countContext Engine disabled, or test fixtures not excluded.Re-enable context (default); add test/ paths to .korthexignore.
"Cannot parse .kxr"Wrong tool version reading a newer report.Update Korthex on the reading side. .kxr forward-compatibility is best-effort but not guaranteed across major versions.
"Schema mismatch"Input file from a newer Korthex than the current binary.Update Korthex, or re-emit the file from a version-compatible source. There is no exit code reserved for this class; it surfaces as a generic failure.
IDE plugin shows no findingsCLI path misconfigured or CLI not on PATH.Settings → Tools → Korthex → set the CLI Path explicitly; restart IDE.
Korthex Remote: "License mismatch"Phone paired with a desktop on a different license seat.Revoke from desktop; re-pair with the correct desktop. Mobile auto-routes back to login.
Mesh-Relay: "SPKI pin file not found" (fail-closed)Pin file missing or path misconfigured in relay_config.json.Either provide the pin file or remove Mesh-Relay configuration entirely.
Exploit Engine: "GATED"Feature gate is closed (default state).Open the gate via the Dashboard toggle or the host SDK; acknowledge ToS.
Build: "out of memory" on large monorepoToo many analyzers holding memory at once.Lower global.maxThreads in the config file. Neither parallelism nor engine selection has a command-line switch; to run the light engines first, turn the heavy ones off under engines.subEngines and re-run with them back on.

Logs & Diagnostics

Log Levels The level is a configuration key, global.logLevel , read from the file you pass to --config . There is no --log-level switch. The value is matched case-insensitively and the default is INFO . { "scanPaths": ["."], "global": { "logLevel": "DEBUG" } } No environment variable sets the log level. KORTHEX_LOG_LEVEL and per-engine variants of it do not exist anywhere in the product, and neither does a --log-file switch. What is true is the fact those invented variables were reaching for: every engine carries its own logger instance, so a level set for one does not propagate to the others. Today only the scanner reads global.logLevel and applies it to its own logger. Log Locations Every component writes under one per-user root, and each engine gets its own subdirectory below it with a session-stamped file name: <root>/logs/engines/<EngineName>/ . Crash Reports On a crash, Korthex emits a minidump ( .dmp ) plus a JSON sidecar to the configured crash directory (default: alongside the log directory under crashes/ ). The minidump excludes source-code memory pages via the built-in redactor; the JSON sidecar contains environment metadata only. When opening a support ticket, attach: the crash sidecar JSON, the last log file from the same session, and the command line that triggered the issue. Do not attach minidumps over public channels - they may contain residual heap data; ship them through the support portal upload only.

ValueWhat it does
OFFSuppresses every log call.
ERRORFailures only. The quietest useful setting for CI.
WARNAdds recoverable engine-internal notices.
INFOThe default. Adds phase transitions and the durations that the Context passes and the enrichment phase report.
DEBUGVerbose diagnostic detail. This is the level to attach to a bug report.
TRACEAccepted, but it is an alias: the logger maps it onto DEBUG and there is no finer level behind it.
PlatformRoot
Windows%APPDATA%/Korthex/
macOS~/Library/Application Support/Korthex/
Linux$XDG_CONFIG_HOME/Korthex/
Linux, no XDG_CONFIG_HOME~/.config/Korthex/

Where to Get Help

ChannelBest forResponse time
Documentation search (this site)Quick reference, syntax, formats.Instant
Community Discord / SlackUsage questions, sanity checks, recipes.Hours (community-driven)
Email support (Community+)Account-specific issues, bug reports.Business day
Chat support (Business+)Faster triage, demo questions.Same business day
Dedicated CSM (Enterprise)Roadmap input, escalations, deployment review.SLA-bound