AI keeps repeating failed debugging attempts
One of the most expensive context failures is not losing code. It is losing the list of things that already failed.
Why this hurts.
When the next chat lacks failed attempts and known constraints, it burns time rediscovering the same non-solution.
How ShardStitch solves it.
Record the exact failed condition
Record the exact failed command, output, and whether the same condition recurred on each attempt.
Keep the observed output
Keep the observed output with each rejected approach so the next AI knows what did not work and why.
Choose a test that separates causes
Choose one small test that would distinguish the remaining hypotheses; point it at relevant files and constraints.
Avoid replaying a destructive attempt
Mark any destructive or state-changing retry as unsafe until the checkout and prior result are reviewed.
What the next AI receives.
- Failed attempts that matter
- What not to retry
- Constraints learned from failures
- Next smallest test
What stays out.
- Full logs unless needed
- Failed branches with no lesson
- Speculation loops
- Old patch attempts
Make the next debugging attempt meaningfully different
FAQ.
Do I need to preserve every failed attempt?
Preserve attempts that rule out a cause, change the project, or constrain the next test. Omit repeated dead ends that add no evidence, but keep the reason an approach should not be retried.
Can ShardStitch diagnose the underlying bug?
No. It helps carry project evidence and prior attempts into a new session; diagnosis still requires inspecting the code and validating a new test.