Hi everyone,
Has anyone else run into issues where the Codex extension in Cursor for Mac gets stuck in an infinite read/search loop during complex agentic tasks?
My agent has been running for over 3 hours across multiple model selections (including 5.6 Sol Medium and 5.6 Sol Ultra). It keeps cycling through the exact same behavior:
-
It announces a plan to inspect files and run preliminary searches (
rg,git status,sed). -
It hits
Context automatically compacted. -
It forgets its previous context, repeats the exact same file-reading steps, and loops indefinitely without actually applying file edits or executing builds.
Even editing the prompt or switching models mid-session hasn’t broken the loop—it eventually gets hit with Reconnecting /5 or crashes the Cursor app when attempting to “Branch in new chat.”
Is there a known fix or setting tweak to prevent the compaction algorithm from poisoning the agent’s task state?
