{"meta":{"title":"Exit codes","intro":"Exit codes signify the status of a command after the CodeQL CLI runs it.","product":"Security and code quality","breadcrumbs":[{"href":"/en/code-security","title":"Security and code quality"},{"href":"/en/code-security/reference","title":"Reference"},{"href":"/en/code-security/reference/code-scanning","title":"Code scanning"},{"href":"/en/code-security/reference/code-scanning/codeql","title":"CodeQL"},{"href":"/en/code-security/reference/code-scanning/codeql/codeql-cli","title":"CodeQL CLI"},{"href":"/en/code-security/reference/code-scanning/codeql/codeql-cli/exit-codes","title":"Exit codes"}],"documentType":"article"},"body":"# Exit codes\n\nExit codes signify the status of a command after the CodeQL CLI runs it.\n\n## About exit codes\n\nThe CodeQL CLI reports the status of each command it runs as an exit code.\nThis exit code provides information for subsequent commands or for other tools that rely on the CodeQL CLI.\n\n## 0\n\nSuccess, normal termination.\n\n## 1\n\nThe command successfully determined that the answer to your question is \"no\".\n\nThis exit code is only used by a few commands, such as [test run](/en/code-security/codeql-cli/codeql-cli-manual/test-run), [dataset check](/en/code-security/codeql-cli/codeql-cli-manual/dataset-check), [query format](/en/code-security/codeql-cli/codeql-cli-manual/query-format),and [resolve extractor](/en/code-security/codeql-cli/codeql-cli-manual/resolve-extractor).\nFor more details, see the documentation for those commands.\n\n## 2\n\nSomething went wrong.\n\nThe CLI writes a human-readable error message to stderr.\nThis includes cases where an extractor fails with an internal error, because the `codeql` driver can’t distinguish between internal and user-facing errors in extractor behavior.\n\n## 3\n\nThe launcher was unable to find the CodeQL installation directory.\n\nIn this case, the launcher can’t start the Java code for the CodeQL CLI at all. This should only happen when something is severely wrong with the CodeQL installation.\n\n## 32\n\nThe extractor didn’t find any code to analyze when running [database create](/en/code-security/codeql-cli/codeql-cli-manual/database-create) or [database finalize](/en/code-security/codeql-cli/codeql-cli-manual/database-finalize).\n\n## 33\n\nOne or more query evaluations timed out.\n\nIt’s possible that some queries that were evaluated in parallel didn’t time out. The results for those queries are produced as usual.\n\n## 98\n\nEvaluation was explicitly canceled.\n\n## 99\n\nThe CodeQL CLI ran out of memory.\n\nThis doesn’t necessarily mean that all the machine’s physical RAM has been used.\nIf you don’t use the `--ram` option to set a limit explicitly, the JVM decides on a default limit at startup.\n\n## 100\n\nA fatal internal error occurred.\n\nThis should be considered a bug. The CLI usually writes an abbreviated error description to stderr.\nIf you can reproduce the bug, it’s helpful to use `--logdir` and send the log files to GitHub in a bug report.\n\n## Other\n\nIn the case of really severe problems within the JVM that runs `codeql`, it might return a nonzero exit code of its own choosing.\nThis should only happen if something is severely wrong with the CodeQL installation, or if there is a memory issue with the host system running the CodeQL process. For example, Unix systems may return Exit Code 137 to indicate that the kernel has killed a process that CodeQL has started. One way to troubleshoot this is to modify your `–ram=` flag for the `codeql database analyze` step and re-run your workflow."}