Debug issues in Copex, especially streaming, content display, and event handling bugs. Use this when investigating bugs, unexpected behavior, or errors.
Instalação
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
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.