Recipes / Dev & code
Multi-agentWorkflowDev & code

Route stuck bugs to the other agent

When one agent loops on a bug for hours, hand it to a different agent; this developer settled on Claude Code for features and Codex for bug fixes and review.

Setup time2 min
CostTwo subscriptions
RunsWhen stuck
NeedsClaude Code, Codex
Last updated2026-10-15
XSource

Codex did it again

by Sujee (@sujee) · 2026-01-28

✓ Opened via the X API on 2026-10-15

Read the original ↗
Part 1 · What the source did

When one agent loops on a bug for hours, hand it to a different agent; this developer settled on Claude Code for features and Codex for bug fixes and review.

  • Saw Codex fix a SwiftUI bug Claude Code had struggled with for hours.
  • Adopted a split: features in Claude Code, bug fixes and review in Codex.

Summary written by Agent Cookbook. See the original for the full context.

Part 2 · Our copy-paste version

Adapted by us from what the source described. Fill in the [BRACKETS].

The prompt

Fresh eyes: another agent has tried to fix this for a while without success. Bug: [SYMPTOM]. Repro: [STEPS]. What was tried: [SUMMARY OF ATTEMPTS]. Don't repeat those approaches. State 3 different hypotheses, test the cheapest first, and show evidence before changing code.
🛡
Approval ruleRevert the stuck agent's partial edits before the second agent starts.

Set it up

  1. Set a rule: after 30 minutes of looping, switch agents.
  2. Summarize what was tried (the stuck agent can write it).
  3. Paste into the other agent.

Common failures

⚠
What usually goes wrong
  • Passing along a wrong diagnosis biases the second agent; list attempts, not conclusions.

Variations

  • Ask both for hypotheses in parallel and compare.

Related recipes