Problem
New Heypiggy profiles require manual Google OAuth login. CAPTCHAs during login need human solve. Bot either crashes or loops forever when hitting these walls.
Browser-use has a formal HITL pattern: pause agent → human interacts in live browser → agent continues.
Plan
→ plans/40-human-in-the-loop.md
Key Changes
- HITL pause points —
login_required, captcha_blocked, account_setup, 2fa_required
- Pause for human — Print message + wait for Enter (with configurable timeout, default 300s)
- Login status detection — Heypiggy-specific check for avatar/user-menu/logged-in indicator
- Screenshot on pause — Save screenshot so human can see what's happening
- Auto-continue detection — Poll for login completion instead of only waiting for Enter
- CLI flag —
--hitl (enable) / --no-hitl (disable, current default)
Validation
- New profile → bot pauses for login → human logs in → bot continues
- CAPTCHA appears → HITL pause → human solves → bot continues
- Auto-detect login after human action within 10s
Files
survey-cli/survey/skills/hitl.py — NEW
survey-cli/survey/skills/deterministic_solver.py
survey-cli/survey_cli_entry.py
Source
browser-use "Human in the Loop" (pause agent, human acts, agent continues)
Problem
New Heypiggy profiles require manual Google OAuth login. CAPTCHAs during login need human solve. Bot either crashes or loops forever when hitting these walls.
Browser-use has a formal HITL pattern: pause agent → human interacts in live browser → agent continues.
Plan
→ plans/40-human-in-the-loop.md
Key Changes
login_required,captcha_blocked,account_setup,2fa_required--hitl(enable) /--no-hitl(disable, current default)Validation
Files
survey-cli/survey/skills/hitl.py— NEWsurvey-cli/survey/skills/deterministic_solver.pysurvey-cli/survey_cli_entry.pySource
browser-use "Human in the Loop" (pause agent, human acts, agent continues)