fix: add logging on executionError validation failure

Log validation errors to help debug schema mismatches with backend.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Richard Yu
2026-01-12 18:40:56 -08:00
parent eada1eca50
commit 400249cb08

View File

@@ -341,7 +341,14 @@ export class TaskItemImpl {
for (const entry of messages) {
if (entry[0] === 'execution_error') {
const parsed = zExecutionErrorWsMessage.safeParse(entry[1])
return parsed.success ? parsed.data : undefined
if (!parsed.success) {
console.warn(
'[TaskItemImpl.executionError] Validation failed:',
parsed.error
)
return undefined
}
return parsed.data
}
}
return undefined