MoonshotAI / MoonshotAI/kimi-cli

Markdown list items in TUI drop characters and split words when wrapped

Open
#2,379 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

What version of Kimi Code CLI is running?

1.45.0

Which open platform/subscription were you using?

Kimi Code / Allegretto

Which model were you using?

Kimi-k2.6 (Kimi Code)

What platform is your computer?

Linux 6.8.0-117-generic x86_64 x86_64

What issue are you seeing?

In the shell TUI, wrapped markdown list items render incorrectly.

Observed behavior:

  • some characters at the right edge of a wrapped list line disappear
  • words can be wrapped in the middle instead of at word boundaries
  • this affects markdown bullet lists and numbered lists
  • it is more noticeable when markdown is rendered inside another outer bullet/container in the conversation UI

This appears to be a rendering issue in markdown list layout, not a model output issue.

Example:
Image

Notice: thro(ug)h, Pro(to)col, compac(ti)on

What steps can reproduce the bug?
  1. Start kimi-cli in the interactive TUI.
  2. Ask it to print a markdown list with long items, for example:
- **What it does:** Acts as an autonomous agent that can write code, run shell commands, edit files, browse the web, and manage multi-step tasks through an interactive chat interface
- **Architecture:** Built around a core agent loop (KimiSoul) that orchestrates LLM calls, tool execution, context management, and conversation compaction

1. **Startup** - When you run `kimi --cwd .`, Kimi CLI launches the agent and begins rendering the conversation in the terminal.
2. **Session flow** - You type a prompt in the TUI and the response is rendered as markdown content inside the assistant message bubble.
  1. Use a narrow terminal width so the list items wrap.
  2. Observe the rendered output.
What is the expected behavior?
  • wrapped list items should preserve all characters
  • words should wrap only at valid word boundaries
  • numbered and bulleted lists should align correctly after wrapping
  • rendering should remain correct even when the markdown block is nested inside the assistant message layout
Additional information

From local investigation, the issue is specific to markdown list-item rendering in the TUI. The failure mode is:

  • list item content is wrapped as if it had the full available width
  • the bullet/number prefix is then added afterward
  • the prefix consumes columns that were not accounted for during wrapping

That leads to:

  • clipped characters at the right edge
  • awkward mid-word wrapping in list items

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

Reproduce the issue in the kimi-cli interactive TUI using the provided long Markdown lists and a narrow terminal width. Trace the markdown list-item rendering and wrapping path, checking how the bullet or number prefix affects available width. Done means preserving all characters, wrapping at word boundaries, and aligning nested and top-level numbered and bulleted lists correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.