AgentFixboard

Run that hits max steps returns an empty history with no error

When the agent runs out of steps it logs 'Failed to complete task in maximum steps', but the returned history list has no error entry.

From GitHub

browser-use/browser-use

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
0.1.45
Last checked

Verified fix: PR #834 merged on . Fixed in 0.1.45 (first release published after the merge). Last checked .

Symptom

When the agent runs out of steps it logs 'Failed to complete task in maximum steps', but the returned history list has no error entry.

Evidence what you'll see

  • Console shows the max-steps failure message
  • AgentHistoryList has no record of the failure
  • Callers checking history can't tell the run failed

Cause

When the step loop finished without the task being done, the agent only logged the failure and never added it to the history.

Fix steps

0 of 2 done

Your check marks stay in this browser only.

Verify the fix worked

  • Run a task with a very small max_steps and confirm the returned history contains the 'Failed to complete task in maximum steps' error.

Sources and credit

Summarized in our own words from these public reports. Credit goes to their authors.

Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change

Hit an error we don't cover? Submit it