Bug: Include the invalid path when workspace additional-directory validation fails
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli
Research direction
Start by finding where the error string workspace.additional_dir must exist and be a directory is raised, since it is shared by project-local config loading and ACP session/new handling for additionalDirectories. Check that both paths pass the offending value into that check. Done when the message includes the resolved path, an empty entry reports that it is empty, and both entry points are covered by tests. The issue says the maintainer should approve before a PR is opened.
Written by the indexing model from the issue text.
Description
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
-
Start Kimi in ACP mode:
kimi acp -
Send
initialize. Kimi advertises support for additional directories. -
Send
session/newwith a validcwdand 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" ] } } -
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)
- Dominant language
- TypeScript
- Stars
- 7.8k
- Forks
- 1.3k
- Avg merge
- 17h 23m
- Merged PRs (30d)
- 157
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MoonshotAI/kimi-code
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
MoonshotAI/kimi-code#4170 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MoonshotAI/kimi-code#4146 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MoonshotAI/kimi-code#4141 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
MoonshotAI/kimi-code#4140 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
MoonshotAI/kimi-code#4131 ·
Maintainers usually reply within 1 day
All issues in MoonshotAI/kimi-code
Similar issues
-
nextjs-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
cloudflare/vinext#3887 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
apache/rocketmq-dashboard#6331 ·
Maintainers usually reply within 5 days
-
bug cache clinical-safety P1-critical
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
juspay/blend-design-system#1788 ·
Maintainers usually reply within 1 day
-
[Analytics] Add Focus Time-Block Efficiency Ratio Calculator in src/lib/focus/efficiency-ratio.tsOpenanalytics beginner friendly community contributions-welcome enhancement good first issue hacktoberfest help wanted up-for-grabs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day