MoonshotAI / MoonshotAI/kimi-cli

The undo command lands effectively 4 turns earlier than expected

Open
#1,974 0 comments 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.37

Which open platform/subscription were you using?

/login

Which model were you using?

kimi-for-coding

What platform is your computer?

WSL2 x86_64

What issue are you seeing?

When undo command is used and let's say the turn 12 is chosen, what's happening is that effectively the harness is taking the conversation back to turn 8. This issue might be due to failed requests as well. I gave the example of lag by 4 but at another place it's lag by 3, with it turning to 4 right after a user message which errored (LLM Provider Error) out.

What steps can reproduce the bug?
  1. Have a 10-12 turns conversation
  2. Use undo to go to turn number 9
  3. Conversation actually goes back to turn 5
What is the expected behavior?

undoing to turn 9 should take to turn 9.

Additional information

No response

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 a 10–12-turn conversation by using undo to select turn 9, including a failed request if possible. Start by tracing the CLI's undo handling and turn bookkeeping; done means undoing to turn 9 consistently restores turn 9 rather than an earlier turn.

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
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.