MoonshotAI / MoonshotAI/kimi-code

Feature: batch/merge queued messages into single API request (like Claude Code)

Open
#2,588 1 comment 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

Problem

When using Kimi Code TUI with a slow or thinking-intensive model, users often queue multiple messages while the agent is processing. Currently, each queued message is sent as a separate API request once the current turn completes.

This differs from Claude Code behavior, where queued messages are merged into a single request when the agent becomes available. The current behavior causes:

  • Loss of conversational context between queued messages
  • Multiple API round-trips instead of one
  • Fragmented reasoning when user intended to provide multi-part input

Current Behavior

  1. User sends message A (agent starts processing)
  2. User queues messages B, C, D while agent is busy
  3. Agent finishes A → sends B as separate request → finishes B → sends C as separate request → etc.

Expected Behavior (Claude Code style)

  1. User sends message A (agent starts processing)
  2. User queues messages B, C, D while agent is busy
  3. Agent finishes A → merges B+C+D into single request → processes combined input

Use Case

This is especially important for:

  • Complex multi-step instructions that user types incrementally
  • Corrections/additions to previous queued message
  • Users on high-latency connections who want to minimize round-trips

Proposed Solution

Add a config option (e.g., in or ) that:

  1. Accumulates all pending queued messages when current turn completes
  2. Concatenates them with appropriate separators (e.g., double newline)
  3. Sends as single user message to the API

Alternative: make this the default behavior with opt-out, since it matches Claude Code UX that many users expect.

Environment

  • Kimi Code version: 0.31.1
  • Platform: macOS (but affects all)
  • Provider: any (tested with OpenCode proxy → Kimi K3)

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

The issue names no files, tests, or entry points. Start by locating the TUI's queued-message handling and the configuration path for request behavior. Done means pending messages are combined into one API request after the current turn, with the chosen default or opt-out behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.