Add cookbook: pausing agents for captcha telemetry - #547
Conversation
Shows how to use browser-loop's abort/resume pattern with the captcha_solve_started / captcha_solve_result / captcha_challenge_result telemetry events, so an agent stops acting while Kernel's solver is working and resumes once it reports a terminal outcome.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Buffers a terminal telemetry event that arrives before waitForOutcome is called, clears tracked IDs on timeout so the next captcha still triggers a pause, stops a same-challenge task from overwriting the tracked task_id, and distinguishes a task-level success from a challenge actually clearing.
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
3712d40against the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +252 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after approval:
3712d40only edits the cookbook example — outcome buffering, distinctchallenge_solvedvstask_success, same-episode ID handling, and timeout ID reset. Same files, still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Incremental commit narrows example-code correctness; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
If an episode's outcome buffers before waitForOutcome is called and a new episode starts before the driver gets back to it, the buffer is now cleared so the driver waits on the current episode instead of resuming on the stale one. Also breaks the dense gate-behavior paragraph into bullets for scannability.
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
9df87e2against the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +261 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
9df87e2only edits the cookbook — clears a stale buffered outcome when a new captcha episode opens, and splits the gate-behavior paragraph into bullets. Same files, still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Incremental commit tightens example-code correctness; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
Delivery is unordered, so a captcha_solve_started for an episode can arrive after that episode's own terminal result already buffered. The gate now remembers which task_id/challenge_id a buffered outcome belongs to, so a late duplicate for that same episode is recognized and left alone instead of being mistaken for a new episode (which previously discarded the buffer and re-triggered a spurious pause).
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
d7f6e03against the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +286 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
d7f6e03only edits the cookbook example — keeps the buffered outcome'stask_id/challenge_idso a late duplicatecaptcha_solve_startedis ignored instead of clearing the buffer. Same files, still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Incremental commit tightens example-code correctness; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
Starts on duckduckgo.com, navigates to 2captcha.com's public Cloudflare Turnstile demo, and has the agent summarize the page's explanation of how Turnstile is solved once the challenge clears.
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
0ed73ccagainst the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +290 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
0ed73cconly edits cookbook demo text — switches the example target from the public Google reCAPTCHA v2 demo to duckduckgo.com → 2captcha.com's Cloudflare Turnstile demo, and updates the exampleTASK_PROMPT/ comment to match. Same files, still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
TASK_PROMPT/systemPrompttext lives in user-facing docs, not in model-instruction or production prompt files.- Incremental commit is demo-URL and example-prompt wording only; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
Removes inline references to the Playwright/computer-use fallback cookbook from the body text (kept only in Next Steps), and replaces the concrete duckduckgo/2captcha demo task with a placeholder the reader fills in with their own task.
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
911955eagainst the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +287 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
911955eonly edits cookbook copy — drops inline links to the Playwright/computer-use fallback page from the body (kept in Next Steps) and replaces the concrete duckduckgo/2captcha demoTASK_PROMPTwith a placeholder. Same files, still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
TASK_PROMPT/systemPrompttext lives in user-facing docs, not in model-instruction or production prompt files.- Incremental commit is wording and a placeholder prompt; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
Quick-reference table of the three captcha events and their possible terminal outcomes, right after they're introduced in prose.
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
924f68aagainst the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +293 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
924f68aonly adds a markdown table in the cookbook intro listing the three captcha event types and their outcomes. Same files, still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
TASK_PROMPT/systemPrompttext lives in user-facing docs, not in model-instruction or production prompt files.- Incremental commit is a reference table; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
browser-loop's exact @onkernel/sdk pin is relaxed to a caret range (kernel/browser-loop#94), matching the same removal already done for the Playwright/computer-use fallback cookbook (#548).
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
738ec65against the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +279 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
738ec65only deletes a<Warning>callout about a stale@onkernel/sdkversion-pin /overridesworkaround. Same files, still documentation and nav config. Surface area shrank slightly.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
TASK_PROMPT/systemPrompttext lives in user-facing docs, not in model-instruction or production prompt files.- Incremental commit is copy removal only; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
The previous gate paused on captcha_solve_started, joined challenge results only when a start had carried a challenge_id, and had no fallback when an event never arrived. On a real reCAPTCHA that dropped the challenge-level outcome entirely and re-prompted the agent once per solver task. The gate now pairs tasks on task_id only, records every challenge result and marks whether it can be attributed, bounds every wait, and falls back to a read-only page probe. It holds at the tool_call hook instead of aborting the turn, so an action is stopped before it reaches the page and no re-prompt is needed. Split into four named steps with the complete file in an accordion, and pin pi-agent-core to the version browser-loop depends on -- the previous install line resolved a newer one that the script doesn't compile against.
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
4d7645fagainst the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +522 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
4d7645frewrites the cookbook around captcha correlation rules — task-id joins, bounded waits, a read-only page probe, and atool_callhold instead of abort-and-resume. Same three files; still documentation and nav config. No new paths, CI, or runtime code.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Incremental rewrite enlarges the example but does not expand blast radius beyond this docs site.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
dbdabaaagainst the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +518 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
dbdabaaonly folds a<Note>callout into body prose in the cookbook intro. Same three files; still documentation and nav config. No new paths, CI, or runtime code.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Incremental edit is copy presentation only; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
c694177against the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +518 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
c694177is a merge ofmaininto this branch. The captcha cookbook, nav entry, and cross-link are unchanged vsdbdabaa. Incomingmainedits (info/pricing.mdx,apps/invoke.mdx) are already onmainand are not new surface from this PR. Same three files vsmain; still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Merge from
maindoes not expand this PR's blast radius.Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
rgarcia
left a comment
There was a problem hiding this comment.
reviewed and QA'd the cookbook end to end. the overall structure and telemetry/task distinction are clear, but the copied example has a few correctness and setup issues:
bugs
browsers/telemetry/pausing-for-captcha-solves.mdx:34-41— the exact clean-directory instructions fail beforemain()withERR_PACKAGE_PATH_NOT_EXPORTED:tsxtreats the.tsfile as CommonJS whilepi-agent-coreexposes ESM. addnpm pkg set type=moduleor usecaptcha-gate.mts.browsers/telemetry/pausing-for-captcha-solves.mdx:98-125,272-275— the detached telemetry stream rejects when normal cleanup deletes the browser; QA produced an unhandled410 browser session no longer existsand exit code 1. cancel/close the stream before deletion or catch the expected session-gone error.browsers/telemetry/pausing-for-captcha-solves.mdx:165-170—pending()excludes successful task-only results and unresolved tasks after their deadline. in either case the next action bypassesresolve()and the page probe, breaking the documented Turnstile and missing-result paths. treat every unconsumed task record as pending until reset.browsers/telemetry/pausing-for-captcha-solves.mdx:210-224,260-267—tokenPresentis collected but ignored. solved reCAPTCHA widgets commonly remain visible, so the gate can block an action after a response token exists. use the token in the blocking decision and include[name="h-captcha-response"].
reliability and docs
browsers/telemetry/pausing-for-captcha-solves.mdx:250-267— all telemetry events can be absent, but the generic system prompt supplies no fallback and the page is probed only after telemetry populates the gate. retain the automatic-captcha wait instruction or probe before every relevant action.browsers/telemetry/pausing-for-captcha-solves.mdx:30-35— the command saves"^0.83.0", not an exact pin. use--save-exactif newer versions are known to break these imports.browsers/telemetry/pausing-for-captcha-solves.mdx:210-224,503-508— press-and-hold has challenge telemetry but no page selector. an unresolved challenge is logged and allowed through rather than falling back to a telemetry verdict for the agent. add detection or clarify the limitation.
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
73f8d6eagainst the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +518 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment:
73f8d6eis a merge ofmaininto this branch. The captcha cookbook and Next-steps cross-link are unchanged vsc694177. Incomingmainedits (Cookbooks tab, changelog, analytics pixel, network-access page, vault/payments copy) are already onmainand are not new surface from this PR. Same three files vsmain; still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Merge from
maindoes not expand this PR's blast radius.Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
@earendil-works/pi-agent-core ships ESM only, so tsx resolves the script as CommonJS and fails immediately without "type": "module" in package.json. Reproduced the exact error following the documented setup steps as written, then verified npm pkg set type=module fixes it.
The gate's telemetry loop runs detached and was never explicitly stopped, so it keeps its connection open past the browser's deletion. Reproduced: the documented script hangs indefinitely after finishing its task instead of exiting (confirmed via a live run, deleteByID completes fine but the process never returns). Fixed by saving the stream's AbortController and calling gate.close() in main()'s finally block before deletion; verified the same live run now exits cleanly in ~5s.
pending() only counted a settled task if its status was a non-success terminal value, so a successful task-only result (Turnstile's usual path, per the cookbook's own documented example) or a task whose deadline lapsed with no result at all were neither holding() nor pending() -- resolve() and the page probe never ran for them, and the agent was never told. Replaced the status-based check with the same isOpen() predicate openTasks() already uses, so pending() means "some task settled, one way or another." Verified against a scripted turnstile-success case: it now reproduces the exact message documented in the "What the agent is told" table, which the prior logic could never actually produce.
A solved reCAPTCHA or hCaptcha widget commonly stays rendered on the page, so gating solely on verdict.page.widgets.length blocks the agent indefinitely after the challenge already produced a usable response token. The block decision now also clears when a token is present. Also added hCaptcha's response field name -- the probe was only checking Turnstile's and reCAPTCHA's -- so tokenPresent can actually see an hCaptcha solve.
The gate only interrupts the agent when telemetry gives it something to act on, but every captcha event can be absent. Without a fallback, a captcha telemetry misses entirely leaves the model with no guidance at all. Added the same automatic-solve wait instruction already documented for the no-telemetry case elsewhere, so there's a floor under the gate rather than nothing. Verified the addition doesn't change behavior on a normal, captcha-free run.
The Warning says to pin @earendil-works/pi-agent-core, but "pkg@0.83.0" in a plain npm install still saves a caret range (^0.83.0), which a patch release could still break against. Split it into its own npm install --save-exact call, verified it now writes a literal "0.83.0" with no operator while @onkernel/sdk stays on a flexible range, and confirmed the resulting install still runs the script end to end.
Press-and-hold emits captcha_challenge_result like reCAPTCHA and hCaptcha, but PROBE's selector groups have no entry for it, so widgets always comes back empty for it and the tool-call handler lets the agent proceed even while the challenge is genuinely still open. Documented the gap explicitly rather than leaving it implied by the generic "best-effort" bullet, since it's a real class of false negative, not just an edge case of missed markup.
|
Thanks for the thorough QA — fixed all 7, each as its own commit: Bugs
Reliability/docs
Verified end to end with a live Kernel browser + real agent run after each code fix (typecheck + live run, not just reading it), and once more with all seven combined. |
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
778f23bagainst the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +547 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment (
73f8d6e): Only the cookbook MDX (+43 / -14). Setup now uses--save-exactforpi-agent-coreplustype=module; the example closes the telemetry stream before browser delete, treats every settled task aspending(), usestokenPresentin the block decision (including hCaptcha), adds an examplesystemPromptfallback, and documents that press-and-hold has no probe selector. Same three files vsmain; still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Incremental edits tighten example-code correctness and copy; they do not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
reset() unconditionally cleared every task, so a follow-up solver task that started during resolve()'s challenge-grace wait (only watching for captcha_challenge_result there, not new tasks) got wiped out while still genuinely in flight -- holding() went false right after, letting the agent act while Kernel's solver was still working. Reproduced with a scripted case (a task still open, no covering challenge result, at the moment reset() runs) showing holding() incorrectly flip to false; fixed by only clearing a task once something actually covers it -- its own terminal status, or a challenge result for its episode. Verified the fix against that case and a regression case where a challenge result legitimately does cover a leftover open task (multi-task-same-challenge), which still clears correctly.
reset() cleared every task_id and challenge_id it consumed, so a captcha_solve_started that arrives after its own result -- delivery is unordered, this is explicitly possible -- gets treated as a brand-new task in the now-empty map, and the next tool call holds for a full TASK_SETTLE_MS waiting on a result that was already seen and reported. Added a settled set of IDs reset() has cleared; a late event matching one is dropped instead of reopening it. Reproduced the phantom-reopen with a scripted late-duplicate-start case and verified it's now ignored, plus regression-checked the covered-leftover-task and task-only-success cases.
There was a problem hiding this comment.
Stale comment
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD
e394a41against the previously approved commit8e9d21efrom the file diffs only (not the PR description).Current scope (3 files, +579 / -1 vs
main):
File Change browsers/telemetry/pausing-for-captcha-solves.mdxNew Mintlify cookbook (example TypeScript + setup notes) docs.jsonAdds that page under the existing Telemetry nav group browsers/playwright-computer-use-fallback.mdxOne Next-steps cross-link What changed after the last assessment (
778f23b): Only the cookbook MDX (+43 / -11). Examplereset()now keeps an uncovered in-flight task, and asettledset drops late events for IDs already reported. Same three files vsmain; still documentation and nav config.Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files.- Incremental edits tighten example-code correctness; they do not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e394a41. Configure here.
reset() permanently blacklisted every reported task_id and challenge_id, but Kernel can reuse a challenge_id when an episode continues across a page reload -- a genuinely new outcome for one would be silently dropped forever, and a new task under it would still cost a full CHALLENGE_GRACE_MS wait for a result that could never be recorded. Replaced the permanent set with a map of when each ID was settled; a duplicate is only dropped within TASK_SETTLE_MS of that, then treated as fresh again. Verified the original short-window duplicate is still blocked, a reload's new outcome past the window is no longer dropped, and reran the existing regression scenarios (task-only success, follow-up task survives, covered leftover task). Documented the resulting edge case (a reload within TASK_SETTLE_MS of the prior verdict can still be missed) in Limits.
There was a problem hiding this comment.
Risk assessment: Very Low
Verdict: Risk did not increase. Prior approval stands (not re-approving).
Re-evaluated HEAD 6283404 against the previously approved commit 8e9d21e from the file diffs only (not the PR description).
Current scope (3 files, +596 / -1 vs main):
| File | Change |
|---|---|
browsers/telemetry/pausing-for-captcha-solves.mdx |
New Mintlify cookbook (example TypeScript + setup notes) |
docs.json |
Adds that page under the existing Telemetry nav group |
browsers/playwright-computer-use-fallback.mdx |
One Next-steps cross-link |
What changed after the last assessment (e394a41): Only the cookbook MDX (+36 / -19). Example settled Set is now a settledAt Map with a TASK_SETTLE_MS TTL, plus a Limits note that a reload inside that window can still drop a reused challenge_id. Same three files vs main; still documentation and nav config.
Why still Very Low
- Documentation and Mintlify nav only. No application, API, auth, billing, or infrastructure code.
- No CODEOWNERS file in this repo, so no required owner review.
- Example
systemPrompt/ cookbook text lives in user-facing docs, not in model-instruction or production prompt files. - Incremental edit tightens example-code correctness; it does not expand blast radius.
Approval from the prior Very Low assessment remains in effect.
Sent by Cursor Automation: Assign PR reviewers



Summary
browsers/telemetry/pausing-for-captcha-solves.mdx— pauses abrowser-loopagent whencaptcha_solve_startedfires and resumes oncecaptcha_solve_result/captcha_challenge_resultreports a terminal outcome, reusing the abort-and-resume pattern from the existing Playwright/computer-use fallback cookbook.docs.jsonunder Telemetry, and cross-linked from the fallback cookbook's Next Steps.@onkernel/sdkversion conflict betweenbrowser-loop's pinned dependency (predates the telemetry API) and the SDK version the script needs, with a verifiedoverridesfix.Test plan
docs.jsonand the doc's JSON snippet parse as valid JSON@onkernel/browser-loop,@onkernel/sdk, and@earendil-works/pi-agent-corepackages (installed at the exact versionsbrowser-loopdepends on, with theoverridesfix applied) — caught and fixed a real API mismatch (InMemorySessionRepo/AgentHarnessEventfrom a newerpi-agent-corethanbrowser-looppins) and a missing-telemetry-on-old-SDK issue before they shippedNote
Low Risk
Documentation and nav/cross-links only; no runtime or API code changes in the repo.
Overview
Adds a Telemetry cookbook that shows how to pause a
@onkernel/browser-loopagent while Kernel’s stealth captcha solver runs, using captcha telemetry plus a live DOM probe instead of screenshot-only prompt instructions.The doc walks through a full
captcha-gate.tsexample: streamcaptcha_*events with bounded waits andtask_id/challenge_idcorrelation, resolve outcomes separately for solver tasks vs visible challenges, and hookAgentHarnesstool_callto hold or block actions with explicit verdict messages. It also covers setup (pinnedpi-agent-core, ESM), example agent messaging, and known limits (press-and-hold probe gap, unordered events).Navigation: registers the page in
docs.jsonunder Telemetry and links it from the Playwright computer-use fallback cookbook’s Next steps as an alternative mid-run hold pattern.Reviewed by Cursor Bugbot for commit 6283404. Bugbot is set up for automated code reviews on this repo. Configure here.