Help Center/ CodeArts Agent/ FAQs/ Agent/ What Should I Do If the Service Is Unavailable After Enabling the Local LSP Function?
Updated on 2026-07-29 GMT+08:00

What Should I Do If the Service Is Unavailable After Enabling the Local LSP Function?

Symptom

After the local LSP function is enabled and an LSP-related tool is invoked, the agent displays a message indicating that the LSP service is currently unavailable.

Cause Analysis

The LSP server fails to be downloaded.

Solution

If the log contains failed to install, the LSP server of the corresponding language fails to be downloaded or installed. Perform the following steps to locate and manually rectify the fault:

  1. Go to the log directory %USERPROFILE%/.codeartsdoer/codearts-data/log.
  2. Find the latest log and search for keywords.

    1. Locate the log file.

      In the log directory, find the .log file starting with kernel-codeartsdoer-incognito (usually containing a timestamp or random characters). You are advised to sort the files by modification time and select the latest file.

    2. Open the log file and search for keyword failed to install.
      • If it exists, the corresponding LSP service fails to be downloaded. Go to 3.
      • If it does not exist, you can submit a ticket to get help from Huawei Cloud customer service.

  3. Manually install the LSP service package and specify the startup path.

    1. Obtain and install the LSP package for the corresponding language.

      Download the LSP server package for the programming language you are using (such as Python, Java, or Go) and install it locally.

    2. Configure the codeagent.json file to specify the startup path.
      Table 1 codeagent.json configuration file path

      Tool Name

      Configuration File Path

      CodeArts Agent IDE

      %USERPROFILE%/.codeartsdoer/ai-ide

      Visual Studio Code

      %USERPROFILE%/.codeartsdoer/vscode

      JetBrains series tools (with IntelliJ IDEA as an example)

      %USERPROFILE%/.codeartsdoer/IntelliJIDEA2025.1.3

      In the configuration file, add or modify the lsp field to point to the path of the LSP executable file that you manually installed.

      {
        "$schema": "https://opencode.ai/config.json",
        "lsp": {}
      }

      Change the lsp field in the configuration file to the key corresponding to the LSP server you are using. Currently, CodeArts Agent supports the LSP service for only four languages: Java, TypeScript, Go, and Python. The keys for these languages are as follows: jdtls for Java, typescript for TypeScript, gopls for Go, and pyright for Python.

      The following uses TypeScript as an example:
      {
        "$schema": "https://opencode.ai/config.json",
        "typescript": {
          "command": [
          "Local-download-path/typescript-language-server",
          "--stdio"
          ],
          "extensions": [
          ".ts",
          ".js"
          ]
       }
      }
    3. Save the file, restart the IDE, and execute the previous task again. Check whether the fault is rectified.
      • If the fault is rectified, no further action is required.
      • If the issue persists, submit a service ticket to get help from Huawei Cloud customer service.