Skip to content

[web] Latest queued message duplicated in multi-client web session #3876

Description

@alex-ca1123

Environment

  • Kimi Code CLI 2.0.0 (native single-file install; manually upgraded from 0.41.0 earlier the same day)
  • macOS 26.6.2
  • kimi web served locally; accessed over LAN with two browser pages attached to the same session
  • Session: 08ae755d-53a1-467a-b61b-db244c967b5c

Summary

In the web UI, when a message is queued with Ctrl+S ("insert into queue") while the agent is busy ("请求中…"), the newest queued message is rendered twice:

  1. once as the normal transcript bubble with the correct send time, and
  2. once more as a trailing "phantom" bubble pinned to the bottom of the transcript.

The phantom always tracks the latest queued message: when a newer message is queued, the older phantom disappears and the phantom moves to the new one. The phantom's timestamp is refreshed on each re-render, so it drifts later than the real bubble (observed: real 12:14 → phantom 12:16; real 12:16 → phantom 12:17 local time).

Session storage is not duplicated — this is a client-side rendering bug only (see Evidence).

Steps to reproduce

  1. Start a session and open the web UI in two browser pages on the same session (LAN setup).
  2. Make the agent busy with a long-running turn.
  3. Type a message and press Ctrl+S to queue it.
  4. Observe: the message appears twice in the transcript.
  5. Queue another message: the previous phantom disappears; the new latest message now shows its own phantom.

Reproduced 3/3 in this session (all while the agent was busy, two pages attached).

Expected

Each queued message renders exactly once. Any queue-tail indicator should be visually distinct and deduplicated against the transcript bubble by message id.

Actual

The newest queued message renders twice; the phantom keeps updating its timestamp on re-render, apparently on cross-client sync events.

Evidence (server-side storage is clean)

From ~/.kimi-code/sessions/<wd>/session_08ae755d-…/agents/main/wire.jsonl, each affected message appears in exactly one lifecycle chain:

  • prompt.steered ×1 → turn.steer ×1 → context.append_message ×1 → agent.message.appended ×1

No duplicate user messages exist in storage, and the model consumed each message exactly once. Example message id: msg_01M2R22GRJKT60BJXPTD5KPY54.

Attachments

Notes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions