From 3fc5c38df7580f5306ecb6f0ca056619d9724519 Mon Sep 17 00:00:00 2001 From: Matthew Jackson Date: Fri, 6 Mar 2026 11:47:40 -0800 Subject: [PATCH] Add clear status logging for needs_answer and honeypot exits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- job_applier.mjs | 4 +++- lib/apply/easy_apply.mjs | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/job_applier.mjs b/job_applier.mjs index 683991a..c1e78f7 100644 --- a/job_applier.mjs +++ b/job_applier.mjs @@ -239,7 +239,8 @@ async function handleResult(job, result, results, settings, profile, apiKey) { case 'needs_answer': { const questionText = pending_question?.label || pending_question || 'Unknown question'; const questionOptions = pending_question?.options || []; - console.log(` πŸ’¬ Unknown question β€” asking Claude: "${questionText}"${questionOptions.length ? ` (options: ${questionOptions.join(', ')})` : ''}`); + console.log(` πŸ’¬ Paused β€” unknown question: "${questionText}"${questionOptions.length ? ` (options: ${questionOptions.join(', ')})` : ''}`); + console.log(` Generating AI answer and sending to Telegram...`); const aiAnswer = await generateAnswer(questionText, profile, apiKey, { title, company }); @@ -265,6 +266,7 @@ async function handleResult(job, result, results, settings, profile, apiKey) { }); appendLog({ ...job, title, company, status: 'needs_answer', pending_question, ai_suggested_answer: aiAnswer }); results.needs_answer++; + console.log(` ⏸️ Question sent to Telegram. Job will retry after you reply.`); break; } diff --git a/lib/apply/easy_apply.mjs b/lib/apply/easy_apply.mjs index b294a43..9423abb 100644 --- a/lib/apply/easy_apply.mjs +++ b/lib/apply/easy_apply.mjs @@ -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 }; }