Skip to content

agents hanging and get stuck in read loops #61

@demiolawunmi

Description

@demiolawunmi

Bug Description

When using cursor-acp as a provider in oh-my-opencode, agents (especially Composer 2 / deep agents) frequently hang and get stuck in infinite read loops without making progress.

Steps to Reproduce

  1. Configure oh-my-opencode to use cursor-acp provider with Claude or GPT models
  2. Give the agent a multi-step task (e.g., implementing T1-T3 of a feature)
  3. Agent begins reading files but gets stuck repeating the same reads
  4. Eventually stops without implementing anything

Expected Behavior

  • Agent reads files once, understands context, and implements
  • If file content is truncated, agent should handle it gracefully
  • Agent should not loop infinitely on reads

Actual Behavior

  • Agent reads the same files repeatedly (5-10+ times)
  • Tool output shows truncated content but agent keeps re-reading
  • Eventually stops with no implementation done
  • API errors appear in Cursor dashboard

Environment

  • oh-my-opencode with cursor-acp plugin (@rama_nigg/open-cursor)
  • Cursor running locally with proxy on port 32124
  • Tried models: composer-2, claude-4.6-sonnet-medium, gpt-5.4-high

Additional Notes

  • The issue seems to be with cursor-acp proxy layer, not omO itself
  • When API errors occur, they show up in Cursor dashboard (not OpenCode)
  • Using GitHub Copilot models directly works without this hanging issue
  • This may be related to rate limiting or context issues on Cursor's side

Suggested Investigation

  1. Is there a way to add timeout/retry limits to cursor-acp requests?
  2. Could omO detect when an agent is stuck in a read loop and recover?
  3. Consider documenting cursor-acp as an experimental/unreliable provider

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions