MoonshotAI / MoonshotAI/kimi-code

Skill descriptions are truncated mid-sentence in the system prompt

Open Beginner friendly
#3,627 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

What version of Kimi Code is running?

Observed in source at main branch (latest commit at time of report).

Which open platform/subscription were you using?

N/A — issue identified through source-code inspection.

Which model were you using?

N/A.

What platform is your computer?

N/A.

What issue are you seeing?

Built-in skill descriptions are hard-truncated at 250 characters in the model-facing skill listing (${skills} in the system prompt). For example, check-kimi-code-docs renders as:

- check-kimi-code-docs: Answer questions about the Kimi Code product using the official documentation — CLI usage, configuration, slash commands, features, membership and quota, API onboarding, third-party tool setup, and error codes. Use when the user asks how Kimi Code...

The description is cut off mid-sentence, leaving the model without the full usage guidance the skill author intended.

What steps can reproduce the bug?
  1. Start a session with a default profile.
  2. Inspect the rendered system prompt (e.g. via kimi vis or ~/.kimi-code/sessions/<id>/agents/main/wire.jsonl).
  3. Look at the # Skills / ## Available skills section.
  4. Note that long descriptions end with ... at exactly 250 characters.
What is the expected behavior?

Skill descriptions should be shown in full, or at least truncated at a higher limit so that built-in skills are not sliced mid-sentence.

Additional information

The truncation happens in packages/agent-core-v2/src/features/skill/catalog/registry.ts:

const LISTING_DESC_MAX = 250;
...
const lines = [`- ${skill.name}: ${truncate(skill.description, LISTING_DESC_MAX)}`];

The test file packages/agent-core-v2/test/features/skill/catalog/registry.test.ts currently encodes the 250-character behavior.

I have a branch ready that raises the limit to 512 and updates the tests.

Contribution
  • I am willing to submit a PR for this bug fix myself (please wait for maintainer approval in this issue first)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/agent-core-v2/src/features/skill/catalog/registry.ts, where LISTING_DESC_MAX is used to truncate skill descriptions. Review the related expectations in packages/agent-core-v2/test/features/skill/catalog/registry.test.ts and update them for the intended higher limit. Done means long built-in skill descriptions no longer end mid-sentence and the catalog tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.