Debug issues in Copex, especially streaming, content display, and event handling bugs. Use this when investigating bugs, unexpected behavior, or errors.
Instalación
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Debug issues in Copex, especially streaming, content display, and event handling bugs. Use this when investigating bugs, unexpected behavior, or errors.
Debugging Guide for Copex
Common Issues
Stale/Wrong Content Displayed
Symptoms: Response shows previous turn's content, or old message appears instead of new one.
Root Cause: History fallback triggered during streaming mode.
Investigation:
Check if streaming (on_chunk provided)
Verify received_content flag is set when content arrives
Check if history fallback is being used incorrectly
Fix Pattern:
# In client.py - only use history when NOT streamingifnot received_content and on_chunk isNone:
# History fallback OK here
messages = await session.get_messages()
In CLI - prefer streamed content:
final_message = ui.state.message if ui.state.message else response.content
Empty or Missing Content
Symptoms: Response is empty, reasoning missing, or incomplete.