Skip to content

Duplicate React key warning from message counter reset on session switch #30

@kynoptic

Description

@kynoptic

Describe the bug
Switching between sessions in the web app triggers React's "Encountered two children with the same key" console warning, which can cause messages to be duplicated or omitted in the chat panel.

Steps to reproduce

  1. Run Agent Flow and connect to two or more active Claude Code sessions
  2. Open the chat panel for one session
  3. Switch to another session
  4. Check the browser console

Expected behavior
No duplicate key warnings. Each conversation message should have a unique ID.

Screenshots
Console warning:

Encountered two children with the same key, `msg-0`. Keys should be unique so that components maintain their identity across updates.
    at AgentChatPanel (components/agent-visualizer/chat-panel.tsx:64:29)

Environment

  • VS Code version: N/A (standalone dev mode)
  • Agent Flow version: 0.6.2
  • Node version: v25.6.1
  • OS: macOS 15.5 (Darwin 25.3.0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions