Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Bug: Include the invalid path when workspace additional-directory validation fails

オープン 初心者向け
#4,147 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

まず、エラー文字列 workspace.additional_dir must exist and be a directory が発生している箇所を探してください。この文字列は、プロジェクトローカルの設定読み込みと、additionalDirectories に対する ACP の session/new の処理の両方で共有されています。両方の経路が問題の値をこのチェックに渡しているか確認してください。完了条件は、メッセージに解決済みのパスが含まれること、空のエントリが空であると報告されること、そして両方のエントリポイントがテストでカバーされていることです。Issue では、PR を開く前にメンテナーの承認が必要とされています。

索引モデルが issue の本文から書いたものです。

説明

bug
What version of Kimi Code is running?

2.1.1

Which open platform/subscription were you using?

N/A. This occurs during local workspace configuration or ACP session setup, before any provider request.

Which model were you using?

N/A. The error occurs before a model request.

What platform is your computer?

Linux 7.2.9-200.nobara.fc44.x86_64 x86_64 unknown

What issue are you seeing?

Kimi reports this error when an additional workspace directory is unavailable:

workspace.additional_dir must exist and be a directory

The message does not include the invalid path.

This affects both project-local configuration and ACP:

  • A project can contain one or more invalid entries in .kimi-code/local.toml.
  • An ACP client can send session/new.params.additionalDirectories. Kimi advertises support for this capability, but an IDE does not necessarily show users which paths it sent. Diagnosing a missing path currently requires capturing ACP traffic.

In either case, users cannot identify the offending directory from the Kimi error.

What steps can reproduce the bug?
Project-local configuration

From a Git repository, create .kimi-code/local.toml:

[workspace]
additional_dir = ["/tmp/kimi-directory-that-does-not-exist"]

Start Kimi from that repository.

ACP session setup
  1. Start Kimi in ACP mode:

    kimi acp
    
  2. Send initialize. Kimi advertises support for additional directories.

  3. Send session/new with a valid cwd and an unavailable additional directory:

    {
      "jsonrpc": "2.0",
      "id": 2,
      "method": "session/new",
      "params": {
        "cwd": "/path/to/project",
        "mcpServers": [],
        "additionalDirectories": [
          "/path/that-is-not-available-to-kimi"
        ]
      }
    }
    
  4. Kimi returns the generic error without identifying the path.

What is the expected behavior?

The error should include the resolved invalid path, for example:

workspace.additional_dir must exist and be a directory: /path/that-is-not-available-to-kimi

An empty additional-directory value should report that the value is empty.

Additional information

I encountered this through JetBrains AI Assistant using Kimi via aicage, which runs the agent in a container.

JetBrains sent an additional directory that was valid on the host but unavailable inside the container.
The same missing-path diagnostic also affects non-containerized project-local configuration.

Contribution
  • I am willing to submit a PR for this bug fix myself (please wait for maintainer approval in this issue first)
主要言語
TypeScript
スター
7.8k
フォーク
1.3k
平均マージ
18時間 15分
マージ済み PR(30日)
160

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

MoonshotAI/kimi-code のほかの issue

MoonshotAI/kimi-code の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。