Skip to content

[Harness] Change strategy after repeated unproductive results instead of retrying #4089

Description

@senamakel

Summary

When a tool call fails or returns nothing useful, agents tend to retry the same strategy rather than adapting. Repeated failures don't trigger a change of plan (different tool, different arguments, or asking for help).

Simulated example

→ read_file(path="data.json")
← error: file not found
→ read_file(path="data.json")   # same path, same error
← error: file not found
→ read_file(path="data.json")   # never tries list_dir / a different path

Expected behavior

After repeated unproductive results, the agent should change approach — e.g. enumerate before reading, try an alternate tool, or escalate — instead of re-attempting the identical failing action.

Suggested fix / acceptance

  • Feed a structured "no progress since step X" signal back into the loop.
  • Prompt/scaffold guidance: on repeated failure, require a different next action than the last.
  • Cap same-strategy retries before forcing an alternative or handoff.

Surfaced by our internal agent-simulation harness during large-scale, aggressive fuzz testing of agent behaviors. The example above is synthetic and contains no real data.

Metadata

Metadata

Assignees

Labels

agent-reliabilityAgent reliability / behaviorharnessAgent harness / orchestration

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions