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.

From @sujee on X · Jan 2026

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

What the source did

  • 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.

Copy the prompt

Ours Our version, based on what @sujee described. Not their wording. Fill in the [BRACKETS].

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 rule

🛡
Revert 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

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

Variations

  • Ask both for hypotheses in parallel and compare.

Get the 10 best agent setups. Free.

Plus new recipes every week. One email, no spam.

Unsubscribe anytime. Privacy

Related recipes

Read original ↗