Mohamed Boudra b6f0cc5c9c Fix Codex MCP duplicate user/assistant message emissions
Root cause: user_message was being emitted from TWO places:
1. agent-manager.recordUserMessage() - called by session.ts before stream()
2. codex-mcp-agent.ts stream() method - was emitting its own user_message

Fix: Remove user_message emission from codex-mcp-agent.ts stream() since
the agent-manager already handles this. Added explanatory comment.

Updated test to expect 0 user_messages from provider (agent-manager
handles this through the full stack).

Verified via Playwright E2E: created new Codex agent, sent "test fix",
confirmed only ONE user message appears in UI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 16:16:19 +07:00
2025-12-25 11:31:56 +07:00
Description
Languages
TypeScript 98.1%
JavaScript 1.3%
Shell 0.1%
Swift 0.1%