Add clear status logging for needs_answer and honeypot exits
Log lines now explicitly say STOPPING with reason when the modal is dismissed due to unknown questions or honeypots. handleResult logs the full flow: paused → generating AI answer → sent to Telegram → will retry after reply. Prevents claw from misreading as a hang/timeout. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -235,11 +235,13 @@ export async function apply(page, job, formFiller) {
|
||||
if (unknowns.length > 0) console.log(` [step ${step}] unknown fields: ${JSON.stringify(unknowns.map(u => u.label || u))}`);
|
||||
|
||||
if (unknowns[0]?.honeypot) {
|
||||
console.log(` ⏸️ STOPPING — honeypot detected: "${unknowns[0].label}". Dismissing modal.`);
|
||||
await dismissModal(page, MODAL);
|
||||
return { status: 'skipped_honeypot', meta };
|
||||
}
|
||||
|
||||
if (unknowns.length > 0) {
|
||||
console.log(` ⏸️ STOPPING — unknown required field: "${unknowns[0].label || unknowns[0]}". Dismissing modal, will ask via Telegram.`);
|
||||
await dismissModal(page, MODAL);
|
||||
return { status: 'needs_answer', pending_question: unknowns[0], meta };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user