Inter-office memo

To
Everyone using Claude Code or Codex
From
Mo, Chief Executive
Date
November 27, 2026, 5:43 PM CST
Re
Claude Code and Codex loops

What to do when Claude Code or Codex is stuck in a loop: 10 ways to break it in 2026

As of November 27, 2026: press Esc in Claude Code or steer Codex with Enter, and ask for a diagnosis, not another fix. After two failed corrections, Anthropic says /clear and one better prompt “works better almost every time,” and /rewind takes back Claude’s edits. If one lab’s model can’t crack it, OpenAI’s free plugin hands the task to Codex, and Enjoy, T3 Code and Paradev move the conversation to another agent.

Disclosure: Enjoy is our product. We checked every command, app and price below against its maker’s own pages on November 27, 2026, and we say where another way is the better pick, including the free ones built into Claude Code and Codex.

Ways out of a loop, compared

A coding agent in a loop tries the same kind of fix again, says it’s fixed when it isn’t, or undoes an earlier fix with each new one. Pushing on rarely helps. Anthropic’s best practices put it this way: “a third correction mostly adds to a conversation that already contains two failed attempts for Claude to keep re-reading.”

A loop also spends your plan. On OpenAI’s forum, one Codex user reported on August 25, 2026 that Codex kept announcing a change, compacting its context and starting over for about nine hours, and “my available weekly usage went from 100% to 0%, while the original task was still not completed.” That’s one person’s account. Here are the ways out, the free ones first.

Way Best for Cost, checked November 27, 2026 Works in
Stop and steer A loop you catch in the first minute Free Claude Code: Esc. Codex CLI: Enter while it works
Rewind Taking back the failed attempts Free Claude Code: /rewind. Codex: Esc twice to edit your last message and fork from there; Revert in the ChatGPT app
Start fresh After two failed corrections Free /clear in both; /new in the Codex CLI
Diagnose or plan first A bug nobody understands yet Free Plan mode in both: Shift+Tab, or /plan in Codex
A check and a stopping point Runs you aren’t watching Free Your tests or build; /goal with “or stop after 20 turns” in Claude Code
More effort, or another model A problem too hard for the defaults More of your plan’s usage /effort and /model in Claude Code; /model –reasoning=high in Codex
OpenAI’s Codex plugin Codex’s opinion without leaving Claude Code Free; uses your Codex allowance Claude Code, with the Codex CLI installed
Enjoy Handing the whole conversation to another lab’s agent A monthly subscription, free for 7 days (pricing), plus your AI plans Mac, Windows, Linux, your phone
T3 Code The same handoff, free and open source Free Mac, Windows, Linux
Paradev, formerly Superset Handing one stuck terminal to another agent Free for one user Mac

Claude Code comes with Claude’s paid plans: Pro at $20 a month, or $17 billed yearly, Max at $100 and Ultra at $200, by Anthropic’s pricing. Codex comes with ChatGPT plans from Free, though Codex’s pricing lists the CLI from Plus, which is “$20/month (billed monthly),” per OpenAI’s help center. The apps at the bottom run your agents on those plans.

Stop it, and steer

Best for: a loop you catch in the first minute.

Anthropic’s advice for steering a session is one line: “Watch the first minute, press Esc the moment Claude drifts, and after two failed corrections run /clear and write a better prompt instead of a third.” Esc “stops Claude mid-action and keeps everything up to that point, so you can redirect without losing work.”

In the Codex CLI, you steer without stopping: its command reference says “Press Enter while Codex is working to inject new instructions into the current turn,” and Tab queues a follow-up for the next turn. Say what you saw this time and how it differs from last time. “Still broken” gives the agent nothing new.

Price: free.

Watch for: stopping keeps the changes, including half-finished ones. Rewind them, or go back to your last commit.

Rewind to before the loop

Best for: taking back the failed attempts so they stop steering the next one.

In Claude Code, /rewind, its alias /undo, or Esc twice on an empty prompt opens a list of your prompts. Pick the one before things went wrong and choose Restore code and conversation, Restore conversation or Restore code, by its checkpointing page. Anthropic says that “makes it low-risk to try the bolder approach first and rewind if it doesn’t work out.”

In the Codex CLI, “Press Escape twice with an empty composer to edit the previous user message and fork the chat from that point,” which rewinds the conversation, not your files. For files, the ChatGPT app’s review pane can revert the “Entire diff,” one file or one hunk, and OpenAI’s CLI guide says to “Create Git checkpoints before and after a task so you can revert changes.”

Price: free.

Watch for: Claude’s checkpoints don’t cover everything. “A file that only Bash commands changed isn’t tracked and stays as it is,” and Anthropic says checkpoints “work alongside git rather than replacing it.”

Start fresh with what you learned

Best for: the moment you’d type “still broken” a third time.

Anthropic’s rule: “If you’ve corrected the same thing twice and it’s still wrong,” then “/clear plus one new prompt that folds in what you learned works better almost every time.” Codex has the same reset: /clear will “Clear the terminal and start a fresh chat,” and /new resets “the chat context without leaving the CLI.” OpenAI’s best practices warn that one chat for a whole project “leads to bloated context and worse results over time.”

Write the new prompt the way Anthropic’s example does: the symptom, where to look, and a test that proves it’s fixed, as in “users report login fails after the session times out. look at token refresh in src/auth/, write a failing test that reproduces it, then fix it.” Add what you’ve already ruled out.

Price: free, and a fresh session stops paying for the old one’s history.

Watch for: you lose the trail. In Claude Code, the rewind menu can still bring back the conversation from before /clear with an entry labeled /resume <session-id> (previous session), but only until you exit Claude Code.

Ask for a diagnosis, or a plan

Best for: a bug nobody understands yet.

A wrong explanation is easier to spot than a wrong fix. Ask: “Don’t change anything yet. List what could cause this, what you’ve tried for each, and how we’d prove which it is.” Plan mode enforces it. In Claude Code, “Plan mode tells Claude to research and propose changes without making them,” and Shift+Tab cycles to it, by its permission modes page. In Codex, “Plan mode lets Codex gather context, ask clarifying questions, and build a stronger plan before implementation. Toggle with /plan or Shift+Tab.”

Price: free.

Watch for: you have to stop Codex first: “While Codex is already working, /plan is temporarily unavailable.”

Give it a check, and a stopping point

Best for: runs you aren’t watching, where a loop can burn hours.

An agent that can run a test knows when it’s done. “If you give it something that comes back pass or fail, Claude can close that loop itself,” Anthropic says, and OpenAI says Codex can run that loop “but only if it knows what ‘good’ looks like.” For runs you leave alone, add a stopping point: Claude Code’s goals page says “To bound how long a goal runs, include a turn or time clause in the condition, such as or stop after 20 turns.” Codex’s /goal pause and /goal clear stop a goal by hand.

Price: free, but unattended turns still use your plan: “a /loop, a goal’s check after every turn, and Claude’s own subagents all keep sending requests while you aren’t typing.”

Watch for: Claude Code’s goal checker “doesn’t run commands or read files independently,” so write the condition as something Claude’s own output can show, such as a test run.

Raise the effort, or change the model

Best for: a problem the default settings are too shallow for.

Claude Code’s newest models think less by default: “Fable 5.2, Opus 5.5, Sonnet 5.5, and Haiku 5.5 default to medium,” by its model configuration, and “higher effort provides deeper reasoning for complex problems.” Run /effort and press s to raise it for this session only. In Codex, “/model --reasoning=high keeps the current model and sets its reasoning effort to high if the model supports it,” and OpenAI suggests GPT-6.2 Astra “For a change that spans packages.” Our memo on Opus 5.5 covers why it can feel lazier than Opus 5.

Price: included in your plan, but “Lower effort is faster and cheaper,” in Anthropic’s words, so higher levels use your limit faster.

Watch for: a stronger setting on a cluttered conversation still re-reads the failed attempts. Clear or rewind first.

Bring in Codex with OpenAI’s plugin

Best for: a second opinion from the other lab, without leaving Claude Code.

OpenAI’s Codex plugin for Claude Code, free under Apache 2.0, lets you “Use Codex from inside Claude Code for code reviews or to delegate tasks to Codex.” /codex:rescue “Hands a task to Codex,” for when you want it to “investigate a bug” or “try a fix,” and /codex:adversarial-review “questions the chosen implementation and design.” To move the whole conversation, /codex:transfer “Creates a persistent Codex thread from the current Claude Code session and prints a codex resume <session-id> command.” Install it with /plugin marketplace add openai/codex-plugin-cc, then /plugin install codex@openai-codex and /codex:setup.

Codex can also pull the conversation in itself: in the CLI, /import brings over Claude Code’s setup and chats, and “Codex CLI imports up to 50 chats from the last 30 days,” by its import page. Going the other way, Sendbird’s cc-plugin-codex runs Claude Code “for review, rescue, and tracked background workflows” from inside Codex. It’s a smaller community project, also under Apache 2.0.

Price: free, but “Usage will contribute to your Codex usage limits.” Its README asks for a “ChatGPT subscription (incl. Free) or OpenAI API key” and Node.js 18.18 or later, and the plugin runs through the Codex CLI, which Codex’s pricing page lists from Plus.

Watch for: hard tasks take time. The README says “these tasks might take a long time and it’s generally recommended to force the task to be in the background.”

Enjoy

Best for: handing the whole conversation, with everything that was tried, to another lab’s agent.

Enjoy is a desktop app for Mac, Windows and Linux that runs Claude Code, Codex, Grok Build, Antigravity, Muse Code, and local models through OpenCode, on the plans you already have. When one agent goes in circles, choose another in the message box and send: “The new agent gets the conversation so far, including replies from other agents, before it works on your message.” If the first agent is still working, select Stop and move to and the new agent’s name (how). What else helps in a loop:

  • Switch back later. “Each agent keeps its own place in a conversation,” so the first agent continues where it left off.
  • Fork from before the loop. Fork from here on an earlier message starts a new conversation that “copies the messages up to and including that one” (how).
  • Retry with new settings. “After a failure or a stop, change the agent, model, or effort, and a Retry with button appears beside Retry.”

Price: Enjoy is one monthly subscription, and the first seven days are free, with a card to start. It includes your phone and any browser and one computer; each other computer costs extra each month, and each teammate you invite needs a subscription of their own. See pricing. The agent you hand over to needs its own plan.

Watch for: “Enjoy doesn’t have a button that undoes an agent’s changes to your project files” (undoing changes), so commit before a hard bug, or work in a worktree. A fork “works in your project’s main folder, so both conversations can change the same files.” Enjoy isn’t open source, and it’s a subscription on top of your AI plans once the free week ends, where /clear and /rewind cost nothing. Your phone, other computers and teammates connect through Enjoy’s servers, and scheduled workflows run only while your computer is awake with Enjoy open.

T3 Code

Best for: the same handoff, free and open source.

T3 Code is a free, MIT-licensed app for Windows, Mac and Linux that runs “Claude Code, Codex, Cursor, Grok Build, OpenCode, Google Antigravity, Kiro, Pi, Muse Code, fx, or any ACP agent,” by its FAQ. “When you switch providers mid-thread,” it “transfers a budgeted selection of conversation history to the new provider session,” says its handoff page.

Price: free. “You pay your own model/agent providers.”

Watch for: the handoff is a selection. “Reasoning traces, raw tool-call state, and attachments are not copied,” and T3 Code suggests you “repeat any critical constraint in your next message if you want to be sure.” It sends “basic product usage events” unless you set T3CODE_TELEMETRY_ENABLED=false.

Paradev, formerly Superset

Best for: handing one stuck terminal to another agent, on a Mac.

“Superset is now Paradev,” its homepage says. Its Continue with another agent “Starts a fresh session of the agent you pick, seeded with this terminal’s recent context. Use it when a session is stuck, out of context, or the wrong tool for the job,” by its agent sessions page. The new session gets “the last 36,000 characters of this terminal’s context,” and is told “to check git status and the files first, because the workspace, not the transcript, is the source of truth.” It’s open source under the MIT License.

Price: “Free covers individuals with 1 user, local workspaces, the desktop app, and the CLI,” by its pricing; Pro is from $16 a user a month and Team from $54.

Watch for: the handoff copies terminal output as it is. “Paradev removes terminal control codes but does not redact anything, so tokens, keys, or connection strings that a command printed go with it.” Its homepage offers a download for macOS.

When to stay in the same conversation

Not every long session is a loop. If each attempt gets further, keep going: OpenAI’s Codex guide says that when the work is still part of the same problem, “staying in the same chat is often better because it preserves the reasoning trail. Fork only when the work truly branches.”

Stay with the same agent, too, when you only have one plan. /clear, /rewind, plan mode and a better prompt cost nothing, and they fix most loops before a second lab’s agent is worth paying for. And when the loop is the tool itself, such as the same plan repeating after every compaction, as in the forum report above, switching apps won’t fix it: update the agent and report it, with /feedback in Codex.

How we compared

We read each maker’s documentation, pricing and README on November 27, 2026, and every page is linked below. We quote their own words for each command and limit, and we don’t count a feature a maker hasn’t documented. The one user report here is named as one person’s account, not a measured result. Claude Code and Codex change their commands often, so we recheck this guide against its sources at least once a month, and the date at the foot of the page says when we last did.

14.Questions.

What should I do when Claude Code is stuck in a loop?

Press Esc to stop it, then ask what it thinks the cause is instead of asking for another fix. If you’ve corrected the same thing twice, run /clear and write one new prompt with what you learned, which Anthropic says “works better almost every time” than a third correction. /rewind, or Esc twice on an empty prompt, rolls the code and the conversation back to before the loop.

Why does Claude Code keep suggesting the same broken fix?

Because the failed attempts are still in the conversation. Anthropic says a third correction “mostly adds to a conversation that already contains two failed attempts for Claude to keep re-reading.” Clearing or rewinding removes them; so does handing the problem to a different agent with a short summary of what was tried.

Can a loop use up my Codex or Claude limit?

Yes, because every turn counts against your plan. One Codex user reported on OpenAI’s forum on August 25, 2026 that a loop ran for about nine hours and took their weekly usage “from 100% to 0%, while the original task was still not completed.” Stop loops early, and when you leave a Claude Code goal running, add a limit such as “or stop after 20 turns.”

How do I undo what a looping agent changed?

In Claude Code, /rewind and choose Restore code, though “a file that only Bash commands changed isn’t tracked and stays as it is.” In the ChatGPT app, Codex’s review pane has Revert all, and revert by file or hunk. Either way, Git is the safe record, so commit before you hand an agent a hard bug.

Can I hand a stuck Claude Code session to Codex?

Yes. OpenAI’s Codex plugin for Claude Code has /codex:rescue, which hands Codex a task, and /codex:transfer, which turns the Claude Code session into a Codex thread you resume with codex resume. Codex’s own /import brings in up to 50 recent Claude Code chats. Enjoy, T3 Code and Paradev hand the conversation over from inside one app.

Should I start a new chat or keep going?

Start fresh after two failed corrections; keep going while each attempt gets further. OpenAI’s Codex guide says that when the work is still part of the same problem, “staying in the same chat is often better because it preserves the reasoning trail.”

Enjoy Agentic Industries · Checked against its sources on