Skip to content

Research agent intermittently hangs mid-run #4269

Description

@Al629176

Summary

The research agent occasionally hangs mid-execution — tool calls complete successfully but the agent stalls and does not continue or produce a final response.

Problem

What happened: During a deep research task (turn 5/50 observed), the agent completed multiple Web Fetch and Web Search tool calls successfully, then entered a RESPONSE state but stopped progressing — the cursor blinks but no output is produced and the run does not advance.

What was expected: The agent should continue through its turn budget, produce a response, and either complete or proceed to the next turn.

Steps to reproduce:

  1. Start a deep research task (e.g. "read and analyse this arxiv paper and think about how it integrates with OpenHuman").
  2. Let the agent run — it fetches multiple URLs in parallel.
  3. Observe intermittently: after completing tool calls, the agent enters RESPONSE state and hangs indefinitely without producing output.

Platform: macOS desktop · Beta build v0.58.0.

Note: Appears intermittent — not every research run reproduces this.

Solution (optional)

Investigate whether the hang occurs at the LLM response streaming layer (token stall, incomplete stream close) or in the agent loop (turn transition logic). Add a timeout/watchdog on the RESPONSE phase that cancels and retries or surfaces an error if no tokens are produced within a threshold.

Acceptance criteria

  • Repro gone — Research agent does not hang in RESPONSE state; either completes or surfaces a recoverable error.
  • Regression safety — Normal research runs unaffected; timeout/watchdog does not prematurely cancel valid long responses.
  • Diff coverage ≥ 80% — Fix PR meets the changed-lines coverage gate.

Related

Links to issues, PRs, logs, or prior discussion.

Metadata

Metadata

Assignees

Labels

agentBuilt-in agents, prompts, orchestration, and agent runtime in src/openhuman/agent/.bugos:macosAffects macOSpriority: highBreaks a specific feature

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions