fix: log mid-stream errors to transcript, notes on retrieving

This commit is contained in:
cpacker
2025-10-27 18:45:04 -07:00
parent 6969208403
commit 8ff2cc4d22
3 changed files with 29 additions and 0 deletions

View File

@@ -183,6 +183,10 @@ export async function handleHeadlessCommand(argv: string[]) {
}
// Unexpected stop reason
// TODO: For error stop reasons (error, llm_api_error, etc.), fetch step details
// using lastRunId to get full error message from step.errorData
// Example: client.runs.steps.list(lastRunId, { limit: 1, order: "desc" })
// Then display step.errorData.message or full error details instead of generic message
console.error(`Unexpected stop reason: ${stopReason}`);
process.exit(1);
}