﻿# OpenHands stuck detection compares event content rather than event IDs

OpenHands stuck detection compares action, observation and error content while ignoring superficial event identity; fresh timestamps or IDs do not make a repeated failing operation progress.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-openhands-stuck-detector-event-signatures/
Language: en

## Notice repeated work behind fresh events

An agent repeatedly issues the same search and receives the same empty result, while every call gets a new timestamp and event identifier. The [Stuck Detector guide](https://docs.openhands.dev/sdk/guides/agent-stuck-detector) describes comparison of event content rather than object identity. New event IDs alone are not evidence of new information. Inspect the requested operation and returned observation when deciding whether another turn advances the coding task.

## Understand the documented comparison

The detector compares actions through tool name, action content and thought; observations through content and tool name; errors through their messages. It also detects repeated messages and alternating patterns. The guide's use of semantic content should not be expanded into a guarantee that the detector understands every business-level reason for repetition. A legitimately repeated observation can resemble a loop, while superficially changing an unproductive action can avoid a simple repeated signature.

## Separate repetition detection from elapsed time

The feature monitors event patterns after the last user message. That differs from an end-to-end deadline or a timeout on an individual process. A long productive operation can produce few repeated events, while a fast loop can repeat without consuming much wall time. Keep deadline, iteration and stuck-detection controls distinct in the host application. None independently proves the requested artifact is complete when execution stops.

## Resume with a changed explanation of the problem

The [persistence guide](https://docs.openhands.dev/sdk/guides/convo-persistence) retains execution state and stuck-detection settings. Restoring a conversation is not necessarily a clean slate for an unchanged failing approach. The [pause guide](https://docs.openhands.dev/sdk/guides/convo-pause-and-resume) provides a separate manual intervention path. When continuing, supply the missing fact, corrected target or alternative investigation rather than merely asking the agent to repeat the same search more insistently.

## Judge progress through new evidence

For a missing-symbol investigation, progress might mean locating another source tree or discovering that the expected revision is absent. Preserve that observation and adjust the next action accordingly. [Progressive reading](/journal/learn-codex-progressive-reading/) bounds useful exploration; [tool observations](/journal/learn-codex-tool-observation/) distinguish repeated output from a changed fact. Report a stuck stop as an execution outcome with unresolved work, and assess whether the next run introduces a reason to expect a different result.
