Fix the auth bug in auth.ts

Debug and resolve authentication failures in auth.ts until the issue is resolved.

prompt
→ Claude
/ralph-loop "Fix the auth bug in auth.ts" --max-iterations 10
claude-code

Use this when

You have a reproducible authentication failure isolated to one file and a test or manual check that proves when it is fixed. Best for a known-bad symptom (a failing login, a rejected token) rather than open-ended "make auth better" work.

Done when

Exit on the specific auth test or reproduction case passing, not on the agent asserting the fix. Re-run the full suite before merging — auth changes routinely break session and middleware tests that the loop never looked at. If the cap is hit, treat the run as a failed diagnosis and read the diff before rerunning.

Why it works

A ralph-style loop re-reads the file and its failure output on every pass, so each attempt starts from the current state rather than a stale plan. The --max-iterations 10 cap is what makes it safe to leave running: a bug that resists ten passes is a design problem, not a typo, and it should surface to you instead of burning more turns.

Source: pedromeneres

More debugging loops

Memory leak hunt

Loop/goallooprepo

Drive a suspected memory leak to ground: reproduce growth under a repeated workload, capture heap snapshots, and fix the retention until memory stays flat.

prompt
→ Claude
/goal heap usage stays flat (within 5%) across 500 repetitions of the failing workload in the leak-repro script — capture heap snapshots before and after, identify what is being retained and by which reference chain, fix the leak, and re-run the repro to confirm; stop after 10 turns
debuggingmedium riskclaude-codecodex

Take a ticket to reviewer-ready

Turn a ticket or bug report into a proven root cause, a minimal patch, and a clean handoff a reviewer can trust.

prompt
→ Claude
Take a ticket, bug report, failing behavior, or customer complaint and turn it into a review-ready patch. Reproduce the failure in the smallest representative environment, prove the root cause, make the smallest credible fix, and rerun the original reproduction plus relevant regression tests. If the issue cannot be reproduced after two serious attempts, say so. Do not fold unrelated refactors into the patch. Finish with the cause, changed files, before-and-after proof, risks, and pull-request summary.
debugginghigh riskclaude-codecodex

Ralph the bug backlog

Work a triaged bug list one fix per fresh-context iteration: reproduce first, fix minimally, prove it with a regression test, and log root-cause patterns to guardrails.

prompt
→ Claude
/loop fresh context each iteration: read bugs.json and .ralph/guardrails.md, take the top open bug, write a failing test that reproduces it before touching any code, then apply the smallest fix that makes the test pass with the rest of the suite green, and mark the bug fixed; if you cannot reproduce it, mark it needs-info with your findings instead; append recurring root-cause patterns to .ralph/guardrails.md; stop when bugs.json is clear or after 25 turns
debugginghigh riskclaude-codecodex