Commit Graph

939 Commits

Author SHA1 Message Date
Cursor Agent e03a18935e Fix UnboundLocalError for action_name in multi_act exception handler
Move action_name extraction before the try block so it's always
defined when the except block references it. Previously, if
_check_stop_or_pause() raised InterruptedError before action_name
was assigned, the exception handler would fail with:

  UnboundLocalError: cannot access local variable 'action_name'
  where it is not associated with a value

Also reuse the action_data dict for the 'done' action check since
it's now available earlier in the loop.

Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
2026-02-18 01:24:06 +00:00
laithrw e9c7061187 Merge branch 'main' into keep-alive-eventbus-fix 2026-02-17 16:51:54 -05:00
Cursor Agent 270e418cea feat(agent): expose max_clickable_elements_length as Agent parameter
- Add max_clickable_elements_length parameter to Agent.__init__ with default 40000
- Add max_clickable_elements_length to AgentSettings
- Pass parameter through MessageManager to AgentMessagePrompt
- Bump version to 0.11.10a2

Co-authored-by: Magnus Müller <MagMueller@users.noreply.github.com>
2026-02-17 02:07:09 +00:00
Laith Weinberger 3de7f1d9c8 fix keep-alive hang 2026-02-16 19:56:41 -05:00
Saurav Panda ae3b8be538 reverted to original gaurd for multi action failure 2026-02-10 20:56:03 -08:00
Saurav Panda 8263a8d91d change max failure to 5 2026-02-10 19:12:45 -08:00
Saurav Panda 126a420dce fixed cdp error timeout detection in browser closed 2026-02-10 19:04:00 -08:00
Saurav Panda 42cbf9ca15 Changed consecutive failure to 7 2026-02-10 18:31:30 -08:00
Saurav Panda 33831f2b12 increase default consecutive failure to 5 2026-02-10 17:08:35 -08:00
Saurav Panda 07817c2c5b Fixed structured output issue with simple judge 2026-02-09 17:09:35 -08:00
Laith Weinberger e1e170a5fd fix agent not stopping: consecutive_failures counter was resetting on multi-action error steps 2026-02-08 17:25:39 -05:00
laithrw 880b636422 Merge branch 'main' into 3895 2026-02-08 11:15:44 -05:00
Laith Weinberger 9e95241bbb stop agent if browser closed 2026-02-08 11:14:49 -05:00
Saurav Panda 79501fe2cd added message compaction for agent 2026-02-05 12:26:11 -08:00
Saurav Panda 995cb0176b updated default max step to 500 2026-02-05 11:20:47 -08:00
Saurav Panda cec4aea3bc increased threshold for loop detection 2026-02-04 16:34:42 -08:00
Saurav Panda b96b9436fc fixed agent loop detection 2026-02-03 16:00:08 -08:00
Saurav Panda bd4ead5d2e Action Loop detection 2026-02-03 15:19:59 -08:00
Saurav Panda da5b4237ba fixed lint issue 2026-02-02 23:01:52 -08:00
Saurav Panda 0dba38ed95 Merge branch 'main' into align-agent-success-with-judge 2026-02-02 22:16:11 -08:00
Saurav Panda 8565c7d267 updated agent success with simple judge 2026-02-02 22:14:45 -08:00
Saurav Panda 65405d8a79 Merge branch 'main' into align-agent-success-with-judge 2026-02-02 21:50:02 -08:00
Saurav Panda 4d5976c427 Merge branch 'main' into improve-agent-planning 2026-02-02 21:45:06 -08:00
Saurav Panda dae6dc6d0e update agent success with judge verdict 2026-02-02 18:34:11 -08:00
Saurav Panda 023367052c in flash mode disable planning 2026-02-02 18:28:28 -08:00
Saurav Panda 4a522a6f1c dynamic planing exploration 2026-02-02 16:26:50 -08:00
Saurav Panda defe37dd28 Improve multiact for agent 2026-02-02 12:50:03 -08:00
Saurav Panda 5ad365e31b added basic planing to agents 2026-02-02 12:28:29 -08:00
Saurav Panda db832bcb83 added extraction schema 2026-02-01 20:26:50 -08:00
Saurav Panda 9b0d2f685f fixed prompt voilation of under 10 step instruction 2026-01-30 16:57:00 -08:00
Saurav Panda 65c59be263 add step budget awareness to prompt 2026-01-30 11:09:06 -08:00
Magnus Müller 3c927b4f9b Merge branch 'main' into increase-step-timeout-180 2026-01-29 02:06:24 -08:00
Magnus Müller 7d66592a0c Increase default step_timeout from 120s to 180s
Production data analysis (24h) shows:
- 36.5% of consecutive failures are AsyncIO CancelledError in browser state retrieval
- Complex pages can take 30-60s for DOM extraction + 30-60s for LLM call
- 120s was too tight for complex pages with slow network

180s (3 min) gives ~50% more buffer while still catching stuck steps.
This is the per-step timeout, not the total task timeout.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:07:08 -08:00
Magnus Müller 40336731d5 Remove specific timeout for 'browser-use' model 2026-01-29 00:39:05 -08:00
Magnus Müller 3b2b213dd3 Increase LLM timeout to 75s for gemini and browser-use models
Based on production data analysis showing:
- gemini-3-pro-preview has 48% timeout rate with median 23s/step
- browser-use-2.0 timeout tasks have 74% slower time per step (10.7s vs 6.0s)
- Most timeouts occur on steps 11-20 where tasks are making progress

The 45s default was too aggressive. 75s provides ~3x the median step time
as buffer while still catching genuinely stuck tasks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:35:56 -08:00
Laith Weinberger be6873636e clear agent eventbus, not just browser session's 2026-01-28 20:28:14 -05:00
laithrw 5a3f8b4d54 Merge branch 'main' into fix/respect-use-vision-in-judge-fix 2026-01-27 18:22:06 -05:00
Laith Weinberger f85bbb49c8 pass model_name to SystemPrompt 2026-01-23 16:33:28 -05:00
Saurav Panda 147db04c1c Merge branch 'main' into add-ax-name-fallback-rerun 2026-01-15 11:03:27 -08:00
Saurav Panda 9339935c1f added check for history item state 2026-01-15 10:50:07 -08:00
Saurav Panda 9c042d7d98 make event bus timeout configurable using env 2026-01-15 10:44:44 -08:00
Saurav Panda 97d71b84fa added a fix for multi menu dropdown 2026-01-15 10:17:59 -08:00
Mr-Neutr0n d73bca47e8 fix: respect use_vision=False in judge to prevent screenshot leakage (#3726)
When use_vision is set to False, screenshots should not be sent to the
judge LLM. This is a privacy concern as websites may contain sensitive
data that users explicitly do not want shared with LLMs.

Changes:
- Add use_vision parameter to construct_judge_messages()
- Only encode and include screenshots when use_vision is not False
- Pass self.settings.use_vision from _judge_trace() to construct_judge_messages()
- Add comprehensive tests for all use_vision modes

Fixes #3726
2026-01-08 00:44:36 +05:30
Saurav Panda 2c06eabf5f Added ax-name fallback for history rerun. 2026-01-06 12:07:10 -08:00
Saurav Panda 319d0acd45 fixed the edge case for handling max index 2025-12-23 19:29:43 -08:00
Saurav Panda 2aa23f01dc fixed backend_node_id based element counting. 2025-12-23 17:25:38 -08:00
Saurav Panda 0da9457f6b feat: added exp backoff retry and minimum element load 2025-12-23 17:02:28 -08:00
Saurav Panda bb13679f85 feat: remove redundant retry step from history 2025-12-23 16:25:52 -08:00
Saurav Panda 07b7a6d8c0 fix: include shadow DOM form elements in selector_map even without snapshot data 2025-12-19 18:32:40 -08:00
Saurav Panda cf0894ff8d add support for external skillservice 2025-12-18 19:10:47 -08:00