diff --git a/packages/workers/src/roles/ExecutorRole.ts b/packages/workers/src/roles/ExecutorRole.ts index 900113b..931ebea 100755 --- a/packages/workers/src/roles/ExecutorRole.ts +++ b/packages/workers/src/roles/ExecutorRole.ts @@ -87,13 +87,18 @@ After all required files are written and required verification has passed, write // Parse structured actions from native tool_calls first, then strict JSON/code-block fallback const actions = this.parse_actions(text, llm_response.tool_calls || []) - // Debug + // Debug: show actual LLM output + const textPreview = text.replace(/\n/g, '\\n').slice(0, 200) const actionSummary = actions.map(a => { - if (a.type === 'code_block') return `📄 ${(a as any).filename} (${(a as any).content.length}B)` + if (a.type === 'code_block') return `📄 ${(a as any).filename}` if (a.type === 'tool_call') return `🔧 ${(a as any).name}` - return `💬 text` - }).join(', ') + return `💬 ${textPreview}` + }).join(' | ') process.stderr.write(`[EXEC T${turn}] ${actionSummary}\n`) + // Also write full text to log for inspection + if (actions.length === 1 && actions[0].type === 'text') { + this.runtime.checkpoint('executor_text_response', { turn, text: text.slice(0, 1000) }) + } // Execute all actions const hadActions = actions.some(a => a.type !== 'text')